summaryrefslogtreecommitdiffstats
path: root/generic/tclEnv.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-02-10 11:59:22 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-02-10 11:59:22 (GMT)
commit0258413bde6ef149dba024baac68f1fc66170293 (patch)
treeb43d62bfa44e3f58c1b9a9ad754ce530100ddb13 /generic/tclEnv.c
parentb6ae0212a194c6c55a0c05a0f2194213da433583 (diff)
downloadtcl-0258413bde6ef149dba024baac68f1fc66170293.zip
tcl-0258413bde6ef149dba024baac68f1fc66170293.tar.gz
tcl-0258413bde6ef149dba024baac68f1fc66170293.tar.bz2
Eliminate all usage of WIN32 and __WIN32__ macros: Some compilers (e.g. Clang/LLVM) don't define it, and _WIN32 is much more portable anyway.
See: [http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#WindowsCygwinnonPOSIXandMinGW]
Diffstat (limited to 'generic/tclEnv.c')
-rw-r--r--generic/tclEnv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index 8f51c1b..cd1a954 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.c
@@ -444,7 +444,7 @@ TclUnsetEnv(
* that no = should be included, and Windows requires it.
*/
-#if defined(__WIN32__) || defined(__CYGWIN__)
+#if defined(_WIN32) || defined(__CYGWIN__)
string = ckalloc(length + 2);
memcpy(string, name, (size_t) length);
string[length] = '=';
@@ -453,7 +453,7 @@ TclUnsetEnv(
string = ckalloc(length + 1);
memcpy(string, name, (size_t) length);
string[length] = '\0';
-#endif /* WIN32 */
+#endif /* _WIN32 */
Tcl_UtfToExternalDString(NULL, string, -1, &envString);
string = ckrealloc(string, Tcl_DStringLength(&envString) + 1);