summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-07-19 09:50:08 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-07-19 09:50:08 (GMT)
commit5d45d73b29afd5a9bb5df459ede7055b3e97ba5d (patch)
tree860a17de26aa6a8d1c68ddbfc192c62e79d07ca9 /win
parent6f094ddde17be4284f76f82a83b5d5f2cba10db6 (diff)
parent004fe2d35203d7d11d592e8808c83f8a04dfeb31 (diff)
downloadtcl-5d45d73b29afd5a9bb5df459ede7055b3e97ba5d.zip
tcl-5d45d73b29afd5a9bb5df459ede7055b3e97ba5d.tar.gz
tcl-5d45d73b29afd5a9bb5df459ede7055b3e97ba5d.tar.bz2
Make sure that tclAppInit.c is never built with -DUSE_TCL_STUBS, so we don't need those dirty tricks in it any more.
Diffstat (limited to 'win')
-rw-r--r--win/tclAppInit.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/win/tclAppInit.c b/win/tclAppInit.c
index eaa4fb3..27eb164 100644
--- a/win/tclAppInit.c
+++ b/win/tclAppInit.c
@@ -15,17 +15,14 @@
*/
#include "tcl.h"
-#define WIN32_LEAN_AND_MEAN
-#define STRICT /* See MSDN Article Q83456 */
-#include <windows.h>
-#undef STRICT
-#undef WIN32_LEAN_AND_MEAN
-#include <locale.h>
-#include <stdlib.h>
-#include <tchar.h>
-#if TCL_MAJOR_VERSION < 9 && TCL_MINOR_VERSION < 7
+#if TCL_MAJOR_VERSION < 9
+# if defined(USE_TCL_STUBS)
+# error "Don't build with USE_TCL_STUBS!"
+# endif
+# if TCL_MINOR_VERSION < 7
# define Tcl_LibraryInitProc Tcl_PackageInitProc
# define Tcl_StaticLibrary Tcl_StaticPackage
+# endif
#endif
#ifdef TCL_TEST
@@ -39,6 +36,14 @@ extern Tcl_LibraryInitProc Dde_Init;
extern Tcl_LibraryInitProc Dde_SafeInit;
#endif
+#define WIN32_LEAN_AND_MEAN
+#define STRICT /* See MSDN Article Q83456 */
+#include <windows.h>
+#undef STRICT
+#undef WIN32_LEAN_AND_MEAN
+#include <locale.h>
+#include <stdlib.h>
+#include <tchar.h>
#if defined(__GNUC__) || defined(TCL_BROKEN_MAINARGS)
int _CRT_glob = 0;
#endif /* __GNUC__ || TCL_BROKEN_MAINARGS */
@@ -163,7 +168,7 @@ int
Tcl_AppInit(
Tcl_Interp *interp) /* Interpreter for application. */
{
- if ((Tcl_Init)(interp) == TCL_ERROR) {
+ if (Tcl_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
}