diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-05-25 12:19:47 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-05-25 12:19:47 (GMT) |
commit | d7e1d66497a877b980042968a57edd01d2840818 (patch) | |
tree | c70ccc1c14fdf986ba8530e11b5a1a69b08de298 /generic/tkWindow.c | |
parent | c6f6c74ebb2092a8b0b4b2e5c805d22253d19e33 (diff) | |
download | tk-d7e1d66497a877b980042968a57edd01d2840818.zip tk-d7e1d66497a877b980042968a57edd01d2840818.tar.gz tk-d7e1d66497a877b980042968a57edd01d2840818.tar.bz2 |
Simpify determination whether we are running on cygwin.
Export Tk_GetHINSTANCE, TkSetPixmapColormap and TkpPrintWindowId on the Cygwin dll.
Fix "make genstubs" when cross-compiling on UNIX
Diffstat (limited to 'generic/tkWindow.c')
-rw-r--r-- | generic/tkWindow.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 67db10c..21675d0 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -16,7 +16,9 @@ #include "tkPort.h" #include "tkInt.h" -#if !( defined(__WIN32__) || defined(MAC_TCL) || defined(MAC_OSX_TK)) +#ifdef __WIN32__ +#include "tkWinInt.h" +#elif !(defined(MAC_TCL) || defined(MAC_OSX_TK)) #include "tkUnixInt.h" #endif @@ -852,9 +854,6 @@ TkCreateMainWindow(interp, screenName, baseName) Tk_Window tkwin; int dummy; int isSafe; -#if defined(__WIN32__) && !defined(STATIC_BUILD) - int isWin32 = 0; -#endif Tcl_HashEntry *hPtr; register TkMainInfo *mainPtr; register TkWindow *winPtr; @@ -862,14 +861,6 @@ TkCreateMainWindow(interp, screenName, baseName) ClientData clientData; ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); -#if defined(__WIN32__) && !defined(STATIC_BUILD) - Tcl_Obj *stringObjPtr = Tcl_GetVar2Ex(interp, "::tcl_platform", "platform", 0); - - if (stringObjPtr - && !strcmp(Tcl_GetString(stringObjPtr), "windows")) { - isWin32 = 1; - } -#endif /* * Panic if someone updated the TkWindow structure without @@ -954,7 +945,8 @@ TkCreateMainWindow(interp, screenName, baseName) Tcl_Panic("TkCreateMainWindow: builtin command with NULL string and object procs"); } #if defined(__WIN32__) && !defined(STATIC_BUILD) - if (!isWin32 && (cmdPtr->flags & WINMACONLY)) { + if ((cmdPtr->flags & WINMACONLY) && tclStubsPtr->reserved9) { + /* We are running on Cygwin, so don't use the win32 dialogs */ continue; } #endif @@ -3209,9 +3201,7 @@ Initialize(interp) Tcl_SetMainLoop(Tk_MainLoop); } -#ifdef Tk_InitStubs #undef Tk_InitStubs -#endif Tk_InitStubs(interp, TK_VERSION, 1); |