summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2020-10-20 17:41:43 (GMT)
committermarc_culler <marc.culler@gmail.com>2020-10-20 17:41:43 (GMT)
commit4c940e28df4d5740b0ab2904ed4c673e5678ddf0 (patch)
tree1acc38a9886517dbeceecaffa3915c4257942705 /unix
parent6453a55538a3e3af1fbf3ae0b905988967a2200a (diff)
downloadtk-4c940e28df4d5740b0ab2904ed4c673e5678ddf0.zip
tk-4c940e28df4d5740b0ab2904ed4c673e5678ddf0.tar.gz
tk-4c940e28df4d5740b0ab2904ed4c673e5678ddf0.tar.bz2
Avoid platform-specific conditional compilation where possible.
Diffstat (limited to 'unix')
-rw-r--r--unix/tkAppInit.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/unix/tkAppInit.c b/unix/tkAppInit.c
index aa9315c..ecd9dfe 100644
--- a/unix/tkAppInit.c
+++ b/unix/tkAppInit.c
@@ -15,9 +15,7 @@
#undef BUILD_tk
#undef STATIC_BUILD
#include "tk.h"
-#if !defined(USE_SYSTEM_EXIT) && defined(MAC_OSX_TK)
-# include "tkMacOSX.h"
-#endif
+#include "tkPort.h"
#ifdef TK_TEST
extern Tcl_PackageInitProc Tktest_Init;
@@ -113,9 +111,11 @@ Tcl_AppInit(
return TCL_ERROR;
}
Tcl_StaticPackage(interp, "Tk", Tk_Init, Tk_SafeInit);
-#if !defined(USE_SYSTEM_EXIT) && defined(MAC_OSX_TK)
- if (TkMacOSXIsLaunched()) {
- Tcl_SetExitProc(TkMacOSXExitProc);
+
+#if defined(USE_CUSTOM_EXIT_PROC)
+ if (TkpWantsExitProc()) {
+ /* The cast below avoids warnings from old gcc compilers. */
+ Tcl_SetExitProc((void *)TkpExitProc);
}
#endif