diff options
author | nijtmans <nijtmans> | 2010-01-13 06:46:56 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-01-13 06:46:56 (GMT) |
commit | 4823387a0b6e54dc2e2c9718e2b729224fb7260a (patch) | |
tree | b75b8bc167a7e17a11d9b03e2f9f37e3ff845fde /generic/tclEnv.c | |
parent | 56d7490c09f06016e69f254acddad4390e66e924 (diff) | |
download | tcl-4823387a0b6e54dc2e2c9718e2b729224fb7260a.zip tcl-4823387a0b6e54dc2e2c9718e2b729224fb7260a.tar.gz tcl-4823387a0b6e54dc2e2c9718e2b729224fb7260a.tar.bz2 |
Fix TCL_LL_MODIFIER for Cygwin
and various other minor CYGWIN
compilation problems
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__ */ |