diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-12-09 10:20:03 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-12-09 10:20:03 (GMT) |
commit | cc51cd8b376484c83fa87e30582d1c53712387d5 (patch) | |
tree | 791e17349219138479b2ac237a52de72092a924b /win/winMain.c | |
parent | f5312f21552eeb863f2d46fec33b0e4d4fc2173d (diff) | |
download | tk-cc51cd8b376484c83fa87e30582d1c53712387d5.zip tk-cc51cd8b376484c83fa87e30582d1c53712387d5.tar.gz tk-cc51cd8b376484c83fa87e30582d1c53712387d5.tar.bz2 |
Sync win/rules.vc with Tcl. And the use of TCL_USE_STATIC_PACKAGES as well
Diffstat (limited to 'win/winMain.c')
-rw-r--r-- | win/winMain.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/win/winMain.c b/win/winMain.c index f3dfd12..f072f78 100644 --- a/win/winMain.c +++ b/win/winMain.c @@ -29,17 +29,25 @@ int _CRT_glob = 0; extern "C" { #endif extern Tcl_PackageInitProc Tktest_Init; -#ifdef __cplusplus -} -#endif #endif /* TK_TEST */ -#if defined(STATIC_BUILD) && defined(TCL_USE_STATIC_PACKAGES) && TCL_USE_STATIC_PACKAGES +#if !defined(TCL_USE_STATIC_PACKAGES) +# if TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6 +# define TCL_USE_STATIC_PACKAGES 1 +# else +# define TCL_USE_STATIC_PACKAGES 0 +# endif +#endif + +#if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES extern Tcl_PackageInitProc Registry_Init; extern Tcl_PackageInitProc Dde_Init; extern Tcl_PackageInitProc Dde_SafeInit; #endif +#ifdef __cplusplus +} +#endif #ifdef TCL_BROKEN_MAINARGS static void setargv(int *argcPtr, TCHAR ***argvPtr); #endif @@ -60,7 +68,11 @@ static BOOL consoleRequired = TRUE; #define TK_LOCAL_APPINIT Tcl_AppInit #endif #ifndef MODULE_SCOPE -# define MODULE_SCOPE extern +# ifdef __cplusplus +# define MODULE_SCOPE extern "C" +# else +# define MODULE_SCOPE extern +# endif #endif MODULE_SCOPE int TK_LOCAL_APPINIT(Tcl_Interp *interp); @@ -202,7 +214,7 @@ Tcl_AppInit( return TCL_ERROR; } } -#if defined(STATIC_BUILD) && defined(TCL_USE_STATIC_PACKAGES) && TCL_USE_STATIC_PACKAGES +#if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES if (Registry_Init(interp) == TCL_ERROR) { return TCL_ERROR; } |