On Wed, 19 Feb 2003 13:55:51 -0700, "Jason R. Mastaler"
<[EMAIL PROTECTED]> wrote:
> setenv() is not a standard UNIX function. Use putenv() instead.
It isn't?!? Oh... um... yeah... I knew that! Of course it isn't!
Yeah. That's the ticket.
For those of you who can't compile the released version, feel free to
grab the latest version of compile and tmda-cgi.c out of CVS, or apply
the following patches to the released code:
Index: compile
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/compile,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- compile 1 Feb 2003 17:09:57 -0000 1.6
+++ compile 19 Feb 2003 21:26:15 -0000 1.7
@@ -138,8 +138,8 @@
F = open("dirs.h", "w")
F.write("""#define PYTHON "%s"
#define INSTALL "%s"
-#define MODE "%s"
-#define DISP_DIR "%s"
+#define MODE "TMDA_CGI_MODE=%s"
+#define DISP_DIR "TMDA_CGI_DISP_DIR=%s"
""" % (sys.executable, Path, Mode, DispDir))
if os.environ.has_key("TMDARC"):
TMDARC = os.environ["TMDARC"]
@@ -149,7 +149,7 @@
tmda-cgi will look for config files at: %s
Where <user> will be replaced by the user's login name.
""" % string.replace(TMDARC, "/~/", "/<user>/")
- F.write("""#define TMDARC "%s"
+ F.write("""#define TMDARC "TMDARC=%s"
""" % TMDARC)
F.close()
Index: tmda-cgi.c
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/tmda-cgi.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- tmda-cgi.c 1 Feb 2003 17:09:57 -0000 1.5
+++ tmda-cgi.c 19 Feb 2003 21:26:16 -0000 1.6
@@ -26,10 +26,10 @@
int main(int argc, char *argv[])
{
#ifdef TMDARC
- setenv("TMDARC", TMDARC, 1);
+ putenv(TMDARC);
#endif
- setenv("TMDA_CGI_MODE", MODE, 1);
- setenv("TMDA_CGI_DISP_DIR", DISP_DIR, 1);
+ putenv(MODE);
+ putenv(DISP_DIR);
if (!chdir(INSTALL))
{
With luck that will make Solaris happy.
Gre7g.
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users