diff options
author | nijtmans <nijtmans@noemail.net> | 2010-01-13 06:46:56 (GMT) |
---|---|---|
committer | nijtmans <nijtmans@noemail.net> | 2010-01-13 06:46:56 (GMT) |
commit | 58043ae82cd091b9ef9367e372d2d493ee392cbc (patch) | |
tree | b75b8bc167a7e17a11d9b03e2f9f37e3ff845fde /generic/tclEnv.c | |
parent | 89c7aa8b733984578720951c6cb6d356714f669c (diff) | |
download | tcl-58043ae82cd091b9ef9367e372d2d493ee392cbc.zip tcl-58043ae82cd091b9ef9367e372d2d493ee392cbc.tar.gz tcl-58043ae82cd091b9ef9367e372d2d493ee392cbc.tar.bz2 |
Fix TCL_LL_MODIFIER for Cygwin
and various other minor CYGWIN
compilation problems
FossilOrigin-Name: 2be0f4173bb95bdd0859100b31a205998b6152bb
Diffstat (limited to 'generic/tclEnv.c')
-rw-r--r-- | generic/tclEnv.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tclEnv.c b/generic/tclEnv.c index 40650de..f89ca41 100644 --- a/generic/tclEnv.c +++ b/generic/tclEnv.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEnv.c,v 1.40 2009/12/21 23:25:40 nijtmans Exp $ + * RCS: @(#) $Id: tclEnv.c,v 1.41 2010/01/13 06:46:56 nijtmans Exp $ */ #include "tclInt.h" @@ -695,8 +695,6 @@ TclFinalizeEnvironment(void) #if defined(__CYGWIN__) -#include <windows.h> - /* * When using cygwin, when an environment variable changes, we need to synch * with both the cygwin environment (in case the application C code calls @@ -757,11 +755,15 @@ TclCygwinPutenv( */ if (strcmp(name, "Path") == 0) { +#ifdef __WIN32__ SetEnvironmentVariable("PATH", NULL); +#endif unsetenv("PATH"); } +#ifdef __WIN32__ SetEnvironmentVariable(name, value); +#endif } else { char *buf; @@ -769,7 +771,9 @@ TclCygwinPutenv( * Eliminate any Path variable, to prevent any confusion. */ +#ifdef __WIN32__ SetEnvironmentVariable("Path", NULL); +#endif unsetenv("Path"); if (value == NULL) { @@ -782,7 +786,9 @@ TclCygwinPutenv( cygwin_posix_to_win32_path_list(value, buf); } +#ifdef __WIN32__ SetEnvironmentVariable(name, buf); +#endif } } #endif /* __CYGWIN__ */ |