diff options
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | generic/tclInt.h | 18 | ||||
-rw-r--r-- | generic/tclTest.c | 66 | ||||
-rw-r--r-- | generic/tclTestObj.c | 7 | ||||
-rw-r--r-- | generic/tclTestProcBodyObj.c | 17 | ||||
-rw-r--r-- | generic/tclThreadTest.c | 16 | ||||
-rw-r--r-- | unix/Makefile.in | 10 | ||||
-rw-r--r-- | unix/tclAppInit.c | 15 | ||||
-rw-r--r-- | unix/tclUnixTest.c | 6 | ||||
-rw-r--r-- | unix/tclXtNotify.c | 5 | ||||
-rw-r--r-- | unix/tclXtTest.c | 21 | ||||
-rw-r--r-- | win/Makefile.in | 19 | ||||
-rwxr-xr-x | win/configure | 20 | ||||
-rw-r--r-- | win/tcl.m4 | 20 | ||||
-rw-r--r-- | win/tclWinDde.c | 7 | ||||
-rw-r--r-- | win/tclWinReg.c | 5 | ||||
-rw-r--r-- | win/tclWinTest.c | 8 |
17 files changed, 190 insertions, 89 deletions
@@ -1,3 +1,22 @@ +2009-11-19 Jan Nijtmans <nijtmans@users.sf.net> + + * generic/tclInt.h Make all internal initialization + * generic/tclTest.c routines MODULE_SCOPE + * generic/tclTestObj.c + * generic/tclTestProcBodyObj.c + * generic/tclThreadTest.c + * unix/Makefile.in Fix [Bug 2883850]: pkgIndex.tcl doesn't + * unix/tclAppInit.c get created with static Tcl build + * unix/tclXtTest.c + * unix/tclXtNotify.c + * unix/tclUnixTest.c + * win/Makefile.in + * win/tcl.m4 + * win/configure (regenerated) + * win/tclWinDde.c Always compile with Stubs. + * win/tclWinReg.c + * win/tclWinTest.c + 2009-11-18 Jan Nijtmans <nijtmans@users.sf.net> * doc/CrtChannel.3 Fix [Bug 2849797]: channel name inconsistencies diff --git a/generic/tclInt.h b/generic/tclInt.h index eefe5f6..d02df6b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.447 2009/11/16 18:00:11 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.448 2009/11/18 23:46:05 nijtmans Exp $ */ #ifndef _TCLINT @@ -4026,6 +4026,22 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, Tcl_WideUInt initVal); /* + *---------------------------------------------------------------------- + * + * External (platform specific) initialization routine, these declarations + * explicitly don't use EXTERN since this code does not get compiled into the + * library: + * + *---------------------------------------------------------------------- + */ + +MODULE_SCOPE int TclplatformtestInit(Tcl_Interp *interp); +MODULE_SCOPE int TclObjTest_Init(Tcl_Interp *interp); +MODULE_SCOPE int TclThread_Init(Tcl_Interp *interp); +MODULE_SCOPE int Procbodytest_Init(Tcl_Interp *interp); +MODULE_SCOPE int Procbodytest_SafeInit(Tcl_Interp *interp); + +/* *---------------------------------------------------------------- * Macro used by the Tcl core to check whether a pattern has any characters * special to [string match]. The ANSI C "prototype" for this macro is: diff --git a/generic/tclTest.c b/generic/tclTest.c index b089065..ca0d507 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,9 +14,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.138 2009/11/16 18:01:49 dgp Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.139 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #define TCL_TEST #include "tclInt.h" @@ -40,6 +43,17 @@ */ /* + * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the + * Tcltest_Init declaration is in the source file itself, which is only + * accessed when we are building a library. + */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT +EXTERN int Tcltest_Init(Tcl_Interp *interp); +EXTERN int Tcltest_SafeInit(Tcl_Interp *interp); + +/* * Dynamic string shared by TestdcallCmd and DelCallbackProc; used to collect * the results of the various deletion callbacks. */ @@ -494,15 +508,6 @@ static const Tcl_Filesystem simpleFilesystem = { /* - * External (platform specific) initialization routine, these declarations - * explicitly don't use EXTERN since this code does not get compiled into the - * library: - */ - -extern int TclplatformtestInit(Tcl_Interp *interp); -extern int TclThread_Init(Tcl_Interp *interp); - -/* *---------------------------------------------------------------------- * * Tcltest_Init -- @@ -535,6 +540,9 @@ Tcltest_Init( "-appinitprocclosestderr", "-appinitprocsetrcfile", NULL }; + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + return TCL_ERROR; + } /* TIP #268: Full patchlevel instead of just major.minor */ if (Tcl_PkgProvide(interp, "Tcltest", TCL_PATCH_LEVEL) == TCL_ERROR) { @@ -672,7 +680,12 @@ Tcltest_Init( Tcl_CreateObjCommand(interp, "testnrelevels", TestNRELevels, (ClientData) NULL, NULL); - + if (TclObjTest_Init(interp) != TCL_OK) { + return TCL_ERROR; + } + if (Procbodytest_Init(interp) != TCL_OK) { + return TCL_ERROR; + } #ifdef TCL_THREADS if (TclThread_Init(interp) != TCL_OK) { return TCL_ERROR; @@ -718,6 +731,35 @@ Tcltest_Init( return TclplatformtestInit(interp); } + +/* + *---------------------------------------------------------------------- + * + * Tcltest_SafeInit -- + * + * This procedure performs application-specific initialization. Most + * applications, especially those that incorporate additional packages, + * will have their own version of this procedure. + * + * Results: + * Returns a standard Tcl completion code, and leaves an error message in + * the interp's result if an error occurs. + * + * Side effects: + * Depends on the startup script. + * + *---------------------------------------------------------------------- + */ + +int +Tcltest_SafeInit( + Tcl_Interp *interp) /* Interpreter for application. */ +{ + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { + return TCL_ERROR; + } + return Procbodytest_SafeInit(interp); +} /* *---------------------------------------------------------------------- @@ -4387,7 +4429,7 @@ TestfinexitObjCmd( Tcl_Obj *const objv[]) /* Argument objects. */ { int value; - + if ((objc != 1) && (objc != 2)) { Tcl_WrongNumArgs(interp, 1, objv, "?returnCode?"); return TCL_ERROR; diff --git a/generic/tclTestObj.c b/generic/tclTestObj.c index dba06f9..43a64cd 100644 --- a/generic/tclTestObj.c +++ b/generic/tclTestObj.c @@ -13,9 +13,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestObj.c,v 1.34 2009/02/16 04:33:10 dgp Exp $ + * RCS: @(#) $Id: tclTestObj.c,v 1.35 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" #include "tommath.h" @@ -996,7 +999,7 @@ TeststringobjCmd( TestString *strPtr; static const char *const options[] = { "append", "appendstrings", "get", "get2", "length", "length2", - "set", "set2", "setlength", "maxchars", "getunicode", + "set", "set2", "setlength", "maxchars", "getunicode", "appendself", "appendself2", NULL }; diff --git a/generic/tclTestProcBodyObj.c b/generic/tclTestProcBodyObj.c index b961e3c..2d5745e 100644 --- a/generic/tclTestProcBodyObj.c +++ b/generic/tclTestProcBodyObj.c @@ -10,23 +10,26 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.9 2009/02/10 23:08:56 nijtmans Exp $ + * RCS: @(#) $Id: tclTestProcBodyObj.c,v 1.10 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" /* * name and version of this package */ -static char packageName[] = "procbodytest"; -static char packageVersion[] = "1.0"; +static const char packageName[] = "procbodytest"; +static const char packageVersion[] = "1.0"; /* * Name of the commands exported by this package */ -static char procCommand[] = "proc"; +static const char procCommand[] = "proc"; /* * this struct describes an entry in the table of command names and command @@ -34,7 +37,7 @@ static char procCommand[] = "proc"; */ typedef struct CmdTable { - char *cmdName; /* command name */ + const char *cmdName; /* command name */ Tcl_ObjCmdProc *proc; /* command proc */ int exportIt; /* if 1, export the command */ } CmdTable; @@ -47,7 +50,7 @@ static int ProcBodyTestProcObjCmd(ClientData dummy, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); static int ProcBodyTestInitInternal(Tcl_Interp *interp, int isSafe); static int RegisterCommand(Tcl_Interp* interp, - char *namespace, const CmdTable *cmdTablePtr); + const char *namespace, const CmdTable *cmdTablePtr); int Procbodytest_Init(Tcl_Interp * interp); int Procbodytest_SafeInit(Tcl_Interp * interp); @@ -135,7 +138,7 @@ static int RegisterCommand( Tcl_Interp* interp, /* the Tcl interpreter for which the operation * is performed */ - char *namespace, /* the namespace in which the command is + const char *namespace, /* the namespace in which the command is * registered */ const CmdTable *cmdTablePtr)/* the command to register */ { diff --git a/generic/tclThreadTest.c b/generic/tclThreadTest.c index 3b7c506..d4a5f92 100644 --- a/generic/tclThreadTest.c +++ b/generic/tclThreadTest.c @@ -12,13 +12,14 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThreadTest.c,v 1.31 2009/02/10 23:09:05 nijtmans Exp $ + * RCS: @(#) $Id: tclThreadTest.c,v 1.32 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" -extern int Tcltest_Init(Tcl_Interp *interp); - #ifdef TCL_THREADS /* * Each thread has an single instance of the following structure. There is one @@ -577,14 +578,19 @@ NewTestThread( tsdPtr->interp = Tcl_CreateInterp(); result = Tcl_Init(tsdPtr->interp); - result = TclThread_Init(tsdPtr->interp); + if (result != TCL_OK) { + ThreadErrorProc(tsdPtr->interp); + } /* * This is part of the test facility. Initialize _ALL_ test commands for * use by the new thread. */ - result = Tcltest_Init(tsdPtr->interp); + result = Tcl_PackageRequire(tsdPtr->interp, "Tcltest", TCL_VERSION, 1); + if (result != TCL_OK) { + ThreadErrorProc(tsdPtr->interp); + } /* * Update the list of threads. diff --git a/unix/Makefile.in b/unix/Makefile.in index a48e411..5a2e8cf 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.280 2009/11/11 06:49:05 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.281 2009/11/18 23:46:05 nijtmans Exp $ VERSION = @TCL_VERSION@ MAJOR_VERSION = @TCL_MAJOR_VERSION@ @@ -623,11 +623,11 @@ SHELL_ENV = @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@} \ TCLLIBPATH="@abs_builddir@/pkgs" \ TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}" -tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${BUILD_DLTEST} +tcltest: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLTEST} $(MAKE) tcltest-real LIB_RUNTIME_DIR="`pwd`" tcltest-real: - ${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${LIBS} @EXTRA_TCLSH_LIBS@ \ + ${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -o tcltest # Note, in the targets below TCL_LIBRARY needs to be set or else "make test" @@ -1528,9 +1528,9 @@ $(DTRACE_OBJ): $(DTRACE_SRC) $(TCL_OBJS) # for documentation purposes so people who are interested in the Xt based # notifier can modify them to suit their own installation. -xttest: ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} \ +xttest: ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} ${TCL_STUB_LIB_FILE} \ @DL_OBJS@ ${BUILD_DLTEST} - ${CC} ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} \ + ${CC} ${XTTEST_OBJS} ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS} ${TCL_STUB_LIB_FILE} \ @DL_OBJS@ @TCL_BUILD_LIB_SPEC@ ${LIBS} \ ${CC_SEARCH_FLAGS} -L/usr/openwin/lib -lXt -o xttest diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c index 4183c7c..7d8e1c0 100644 --- a/unix/tclAppInit.c +++ b/unix/tclAppInit.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAppInit.c,v 1.18 2008/04/27 22:21:33 dkf Exp $ + * RCS: @(#) $Id: tclAppInit.c,v 1.19 2009/11/18 23:46:05 nijtmans Exp $ */ #include "tcl.h" @@ -20,9 +20,6 @@ #include "tclInt.h" -extern Tcl_PackageInitProc Procbodytest_Init; -extern Tcl_PackageInitProc Procbodytest_SafeInit; -extern Tcl_PackageInitProc TclObjTest_Init; extern Tcl_PackageInitProc Tcltest_Init; #endif /* TCL_TEST */ @@ -126,15 +123,7 @@ Tcl_AppInit( return TCL_ERROR; } Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init, - (Tcl_PackageInitProc *) NULL); - if (TclObjTest_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } - if (Procbodytest_Init(interp) == TCL_ERROR) { - return TCL_ERROR; - } - Tcl_StaticPackage(interp, "procbodytest", Procbodytest_Init, - Procbodytest_SafeInit); + (Tcl_PackageInitProc *) Tcltest_SafeInit); #endif /* TCL_TEST */ /* diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index 916a18c..05b1da9 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -9,9 +9,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixTest.c,v 1.31 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclUnixTest.c,v 1.32 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" /* @@ -74,7 +77,6 @@ static int TestgetdefencdirCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); static int TestsetdefencdirCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); -int TclplatformtestInit(Tcl_Interp *interp); static int TestalarmCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); static int TestgotsigCmd(ClientData dummy, diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c index 46f5657..c8c553d 100644 --- a/unix/tclXtNotify.c +++ b/unix/tclXtNotify.c @@ -9,9 +9,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclXtNotify.c,v 1.10 2008/10/26 12:45:04 dkf Exp $ + * RCS: @(#) $Id: tclXtNotify.c,v 1.11 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include <X11/Intrinsic.h> #include "tclInt.h" diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c index eb800fb..92f5b36 100644 --- a/unix/tclXtTest.c +++ b/unix/tclXtTest.c @@ -1,4 +1,4 @@ -/* +/* * tclXtTest.c -- * * Contains commands for Xt notifier specific tests on Unix. @@ -8,15 +8,30 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclXtTest.c,v 1.8 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclXtTest.c,v 1.9 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include <X11/Intrinsic.h> #include "tcl.h" static int TesteventloopCmd(ClientData clientData, Tcl_Interp *interp, int argc, const char **argv); extern void InitNotifier(void); + +/* + * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the + * Tcltest_Init declaration is in the source file itself, which is only + * accessed when we are building a library. + */ + +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT +EXTERN int Tclxttest_Init(Tcl_Interp *interp); + + /* *---------------------------------------------------------------------- @@ -41,7 +56,7 @@ int Tclxttest_Init( Tcl_Interp *interp) /* Interpreter for application. */ { - if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) { + if (Tcl_InitStubs(interp, "8.1", 0) == NULL) { return TCL_ERROR; } XtToolkitInitialize(); diff --git a/win/Makefile.in b/win/Makefile.in index b472cd8..120d205 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -4,7 +4,7 @@ # "./configure", which is a configuration script generated by the "autoconf" # program (constructs like "@foo@" will get replaced in the actual Makefile. # -# RCS: @(#) $Id: Makefile.in,v 1.162 2009/11/11 06:49:05 nijtmans Exp $ +# RCS: @(#) $Id: Makefile.in,v 1.163 2009/11/18 23:46:05 nijtmans Exp $ VERSION = @TCL_VERSION@ @@ -145,7 +145,8 @@ PIPE_DLL_FILE = tclpip$(VER)${DLLSUFFIX} SHARED_LIBRARIES = $(TCL_DLL_FILE) @ZLIB_DLL_FILE@ @UNICOWS_DLL_FILE@ $(TCL_STUB_LIB_FILE) \ $(DDE_DLL_FILE) $(REG_DLL_FILE) $(PIPE_DLL_FILE) -STATIC_LIBRARIES = $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE) +STATIC_LIBRARIES = $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(REG_LIB_FILE) $(DDE_LIB_FILE) \ + $(DDE_DLL_FILE) $(REG_DLL_FILE) # TCL_EXE is the name of a tclsh executable that is available *BEFORE* running # make for the first time. Certain build targets (make genstubs) need it to be @@ -420,8 +421,8 @@ $(TCLSH): $(TCL_LIB_FILE) $(TCLSH_OBJS) tclsh.$(RES) $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) -$(TCLTEST): $(TCL_LIB_FILE) $(TCLTEST_OBJS) $(CAT32) tclsh.$(RES) - $(CC) $(CFLAGS) $(TCLTEST_OBJS) $(TCL_LIB_FILE) $(LIBS) \ +$(TCLTEST): $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(TCLTEST_OBJS) $(CAT32) tclsh.$(RES) + $(CC) $(CFLAGS) $(TCLTEST_OBJS) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) cat32.$(OBJEXT): cat.c @@ -453,17 +454,19 @@ ${DDE_DLL_FILE}: ${DDE_OBJS} ${TCL_STUB_LIB_FILE} @$(RM) ${DDE_DLL_FILE} @MAKE_DLL@ ${DDE_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) -${DDE_LIB_FILE}: ${DDE_OBJS} ${TCL_LIB_FILE} +${DDE_LIB_FILE}: ${DDE_OBJS} tclStubLib.$(OBJEXT) @$(RM) ${DDE_LIB_FILE} - @MAKE_LIB@ ${DDE_OBJS} ${TCL_LIB_FILE} + @MAKE_LIB@ ${DDE_OBJS} tclStubLib.$(OBJEXT) + @POST_MAKE_LIB@ ${REG_DLL_FILE}: ${REG_OBJS} ${TCL_STUB_LIB_FILE} @$(RM) ${REG_DLL_FILE} @MAKE_DLL@ ${REG_OBJS} $(TCL_STUB_LIB_FILE) $(SHLIB_LD_LIBS) -${REG_LIB_FILE}: ${REG_OBJS} ${TCL_LIB_FILE} +${REG_LIB_FILE}: ${REG_OBJS} tclStubLib.$(OBJEXT) @$(RM) ${REG_LIB_FILE} - @MAKE_LIB@ ${REG_OBJS} ${TCL_LIB_FILE} + @MAKE_LIB@ ${REG_OBJS} tclStubLib.$(OBJEXT) + @POST_MAKE_LIB@ # use pre-built zlib1.dll ${ZLIB_DLL_FILE}: $(ZLIB_DIR)/win32/${ZLIB_DLL_FILE} diff --git a/win/configure b/win/configure index 2dba16e..c1258fe 100755 --- a/win/configure +++ b/win/configure @@ -3954,7 +3954,6 @@ echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} echo "$as_me:$LINENO: result: using static flags" >&5 echo "${ECHO_T}using static flags" >&6 runtime= - MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.a" LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" @@ -3974,20 +3973,20 @@ echo "$as_me: error: ${CC} does not support the -shared option. fi runtime= - # Link with gcc since ld does not link to default libs like - # -luser32 and -lmsvcrt by default. Make sure CFLAGS is - # included so -mno-cygwin passed the correct libs to the linker. - SHLIB_LD='${CC} -shared ${CFLAGS}' - SHLIB_LD_LIBS='${LIBS}' # Add SHLIB_LD_LIBS to the Make rule, not here. - MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \$@ ${extra_ldflags} \ - -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)" LIBSUFFIX="\${DBGX}.a" LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" fi + # Link with gcc since ld does not link to default libs like + # -luser32 and -lmsvcrt by default. Make sure CFLAGS is + # included so -mno-cygwin passed the correct libs to the linker. + SHLIB_LD='${CC} -shared ${CFLAGS}' + SHLIB_LD_LIBS='${LIBS}' + MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \$@ ${extra_ldflags} \ + -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)" # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" @@ -4030,25 +4029,22 @@ echo "$as_me: error: ${CC} does not support the -shared option. echo "$as_me:$LINENO: result: using static flags" >&5 echo "${ECHO_T}using static flags" >&6 runtime=-MT - MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.lib" LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" - SHLIB_LD_LIBS="" else # dynamic echo "$as_me:$LINENO: result: using shared flags" >&5 echo "${ECHO_T}using shared flags" >&6 runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. - MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@" LIBSUFFIX="\${DBGX}.lib" LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" - SHLIB_LD_LIBS='${LIBS}' fi + MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@" # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" @@ -490,7 +490,6 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # static AC_MSG_RESULT([using static flags]) runtime= - MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.a" LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" @@ -506,20 +505,20 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ fi runtime= - # Link with gcc since ld does not link to default libs like - # -luser32 and -lmsvcrt by default. Make sure CFLAGS is - # included so -mno-cygwin passed the correct libs to the linker. - SHLIB_LD='${CC} -shared ${CFLAGS}' - SHLIB_LD_LIBS='${LIBS}' # Add SHLIB_LD_LIBS to the Make rule, not here. - MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \[$]@ ${extra_ldflags} \ - -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)" LIBSUFFIX="\${DBGX}.a" LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" fi + # Link with gcc since ld does not link to default libs like + # -luser32 and -lmsvcrt by default. Make sure CFLAGS is + # included so -mno-cygwin passed the correct libs to the linker. + SHLIB_LD='${CC} -shared ${CFLAGS}' + SHLIB_LD_LIBS='${LIBS}' + MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \[$]@ ${extra_ldflags} \ + -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)" # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" @@ -561,24 +560,21 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # static AC_MSG_RESULT([using static flags]) runtime=-MT - MAKE_DLL="echo " LIBSUFFIX="s\${DBGX}.lib" LIBFLAGSUFFIX="s\${DBGX}" LIBRARIES="\${STATIC_LIBRARIES}" EXESUFFIX="s\${DBGX}.exe" - SHLIB_LD_LIBS="" else # dynamic AC_MSG_RESULT([using shared flags]) runtime=-MD # Add SHLIB_LD_LIBS to the Make rule, not here. - MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\[$]@" LIBSUFFIX="\${DBGX}.lib" LIBFLAGSUFFIX="\${DBGX}" EXESUFFIX="\${DBGX}.exe" LIBRARIES="\${SHARED_LIBRARIES}" - SHLIB_LD_LIBS='${LIBS}' fi + MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\[$]@" # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 2e0c7c3..5f82d76 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -9,9 +9,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinDde.c,v 1.36 2009/11/16 06:29:16 mdejong Exp $ + * RCS: @(#) $Id: tclWinDde.c,v 1.37 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" #include <dde.h> #include <ddeml.h> @@ -140,7 +143,7 @@ Dde_Init( { ThreadSpecificData *tsdPtr; - if (!Tcl_InitStubs(interp, "8.0", 0)) { + if (!Tcl_InitStubs(interp, "8.1", 0)) { return TCL_ERROR; } diff --git a/win/tclWinReg.c b/win/tclWinReg.c index e6d5b7a..84fda68 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,9 +11,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.47 2009/11/18 22:02:58 nijtmans Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.48 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" #ifdef _MSC_VER # pragma comment (lib, "advapi32.lib") diff --git a/win/tclWinTest.c b/win/tclWinTest.c index 35e7348..33ceaf6 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -8,9 +8,12 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTest.c,v 1.25 2009/02/03 23:10:58 nijtmans Exp $ + * RCS: @(#) $Id: tclWinTest.c,v 1.26 2009/11/18 23:46:05 nijtmans Exp $ */ +#ifndef USE_TCL_STUBS +# define USE_TCL_STUBS +#endif #include "tclInt.h" /* @@ -31,7 +34,6 @@ * Forward declarations of functions defined later in this file: */ -int TclplatformtestInit(Tcl_Interp *interp); static int TesteventloopCmd(ClientData dummy, Tcl_Interp *interp, int argc, const char **argv); static int TestvolumetypeCmd(ClientData dummy, @@ -754,7 +756,7 @@ TestplatformChmod( done: if (secDesc) { - ckfree(secDesc); + ckfree((char *) secDesc); } if (newAcl) { ckfree((char *) newAcl); |