diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-02-10 11:06:19 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-02-10 11:06:19 (GMT) |
commit | d015e4d8b48ad76acce178827f3ab114c330308c (patch) | |
tree | 75ae24370f3056d16427e5a17c5a9aaf6e1351e6 /generic/tkMain.c | |
parent | 3655db8b8d9c31f3253d97a9ea250b07641c24d9 (diff) | |
download | tk-d015e4d8b48ad76acce178827f3ab114c330308c.zip tk-d015e4d8b48ad76acce178827f3ab114c330308c.tar.gz tk-d015e4d8b48ad76acce178827f3ab114c330308c.tar.bz2 |
Eliminate all usage of __WIN32__ macro: 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/tkMain.c')
-rw-r--r-- | generic/tkMain.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkMain.c b/generic/tkMain.c index 9d12693..f6f4013 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -54,7 +54,7 @@ extern int TkCygwinMainEx(int, char **, Tcl_AppInitProc *, Tcl_Interp *); * platforms which don't have <tchar.h> we have to translate that * to strcmp here. */ -#ifdef __WIN32__ +#ifdef _WIN32 # include "tclInt.h" # include "tkWinInt.h" #else @@ -95,7 +95,7 @@ extern int TkCygwinMainEx(int, char **, Tcl_AppInitProc *, Tcl_Interp *); * it will conflict with a declaration elsewhere on some systems. */ -#if defined(__WIN32__) || defined(_WIN32) +#if defined(_WIN32) #define isatty WinIsTty static int WinIsTty(int fd) { HANDLE handle; @@ -195,7 +195,7 @@ Tk_MainEx( } } -#if defined(__WIN32__) && !defined(UNICODE) && !defined(STATIC_BUILD) +#if defined(_WIN32) && !defined(UNICODE) && !defined(STATIC_BUILD) if (tclStubsPtr->reserved9) { /* We are running win32 Tk under Cygwin, so let's check @@ -226,7 +226,7 @@ Tk_MainEx( is.gotPartial = 0; Tcl_Preserve(interp); -#if defined(__WIN32__) && !defined(__CYGWIN__) +#if defined(_WIN32) && !defined(__CYGWIN__) Tk_InitConsoleChannels(interp); #endif |