diff options
| author | nijtmans <nijtmans> | 2010-01-13 06:46:56 (GMT) |
|---|---|---|
| committer | nijtmans <nijtmans> | 2010-01-13 06:46:56 (GMT) |
| commit | c7ff5624bca5c8ba57a80fae1d5327e45539d0f2 (patch) | |
| tree | b75b8bc167a7e17a11d9b03e2f9f37e3ff845fde /generic/tclEnv.c | |
| parent | ae13801052a9e55a3dcf36f4ae1f521ce1e19dc2 (diff) | |
| download | tcl-c7ff5624bca5c8ba57a80fae1d5327e45539d0f2.zip tcl-c7ff5624bca5c8ba57a80fae1d5327e45539d0f2.tar.gz tcl-c7ff5624bca5c8ba57a80fae1d5327e45539d0f2.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__ */ |
