summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tcl.decls6
-rw-r--r--generic/tcl.h3
-rw-r--r--generic/tclBasic.c14
-rw-r--r--generic/tclDecls.h12
-rw-r--r--generic/tclInt.h23
-rw-r--r--generic/tclLoad.c11
-rw-r--r--generic/tclStringObj.c22
-rw-r--r--generic/tclStubInit.c12
-rw-r--r--generic/tclStubLib.c96
-rw-r--r--generic/tclTest.c4
-rw-r--r--library/dde/pkgIndex.tcl6
-rwxr-xr-xlibrary/reg/pkgIndex.tcl10
-rw-r--r--tools/tsdPerf.c2
-rw-r--r--unix/Makefile.in5
-rwxr-xr-xunix/configure13
-rw-r--r--unix/configure.in11
-rw-r--r--unix/dltest/pkga.c2
-rw-r--r--unix/dltest/pkgc.c4
-rw-r--r--unix/dltest/pkgd.c4
-rw-r--r--unix/dltest/pkge.c2
-rw-r--r--unix/dltest/pkgua.c2
-rw-r--r--unix/tcl.m42
-rw-r--r--unix/tclXtTest.c2
-rw-r--r--win/Makefile.in8
-rwxr-xr-xwin/configure4
-rw-r--r--win/configure.in4
-rw-r--r--win/makefile.vc6
-rw-r--r--win/rules.vc26
-rw-r--r--win/tclWinDde.c2
-rw-r--r--win/tclWinReg.c2
30 files changed, 166 insertions, 154 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index c7686a1..5a3c9ce 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -126,7 +126,7 @@ declare 27 {
Tcl_Obj *Tcl_DbNewObj(const char *file, int line)
}
declare 28 {
- Tcl_Obj *Tcl_DbNewStringObj(const char *bytes, int length,
+ Tcl_Obj *Tcl_DbNewStringObj(const char *bytes, size_t length,
const char *file, int line)
}
declare 29 {
@@ -221,7 +221,7 @@ declare 55 {
Tcl_Obj *Tcl_NewObj(void)
}
declare 56 {
- Tcl_Obj *Tcl_NewStringObj(const char *bytes, int length)
+ Tcl_Obj *Tcl_NewStringObj(const char *bytes, size_t length)
}
declare 57 {
void Tcl_SetBooleanObj(Tcl_Obj *objPtr, int boolValue)
@@ -1060,7 +1060,7 @@ declare 290 {
void Tcl_DiscardResult(Tcl_SavedResult *statePtr)
}
declare 291 {
- int Tcl_EvalEx(Tcl_Interp *interp, const char *script, int numBytes,
+ int Tcl_EvalEx(Tcl_Interp *interp, const char *script, size_t numBytes,
int flags)
}
declare 292 {
diff --git a/generic/tcl.h b/generic/tcl.h
index cf0b2728a..31eb193 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -2203,7 +2203,8 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp,
const char *version, int epoch, int revision);
#ifdef USE_TCL_STUBS
-#if TCL_RELEASE_LEVEL == TCL_FINAL_RELEASE
+/* TODO: when merging to "novem", change != to == in the next line. */
+#if TCL_RELEASE_LEVEL != TCL_FINAL_RELEASE
# define Tcl_InitStubs(interp, version, exact) \
(Tcl_InitStubs)((interp), (version), (exact)|(int)sizeof(size_t), \
TCL_VERSION, TCL_STUB_MAGIC)
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 3427dff..4daece7 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -482,13 +482,9 @@ Tcl_CreateInterp(void)
iPtr = ckalloc(sizeof(Interp));
interp = (Tcl_Interp *) iPtr;
- iPtr->legacyResult = NULL;
- /* Special invalid value: Any attempt to free the legacy result
- * will cause a crash. */
- iPtr->legacyFreeProc = (void (*) (void))-1;
+ iPtr->objResultPtr = Tcl_NewObj();
iPtr->errorLine = 0;
iPtr->stubTable = &tclStubs;
- iPtr->objResultPtr = Tcl_NewObj();
Tcl_IncrRefCount(iPtr->objResultPtr);
iPtr->handle = TclHandleCreate(iPtr);
iPtr->globalNsPtr = NULL;
@@ -4442,14 +4438,18 @@ Tcl_EvalEx(
Tcl_Interp *interp, /* Interpreter in which to evaluate the
* script. Also used for error reporting. */
const char *script, /* First character of script to evaluate. */
- int numBytes, /* Number of bytes in script. If < 0, the
+ size_t numBytes, /* Number of bytes in script. If < 0, the
* script consists of all bytes up to the
* first null character. */
int flags) /* Collection of OR-ed bits that control the
* evaluation of the script. Only
* TCL_EVAL_GLOBAL is currently supported. */
{
- return TclEvalEx(interp, script, numBytes, flags, 1, NULL, script);
+ /* TODO: remove in final implementation */
+ if ((numBytes + 1) >= INT_MAX) {
+ Tcl_Panic("Tcl_EvalEx: overflow in numBytes");
+ }
+ return TclEvalEx(interp, script, (int)numBytes, flags, 1, NULL, script);
}
int
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index d7b2324..35cdf9d 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -112,7 +112,7 @@ TCLAPI Tcl_Obj * Tcl_DbNewLongObj(long longValue, const char *file,
/* 27 */
TCLAPI Tcl_Obj * Tcl_DbNewObj(const char *file, int line);
/* 28 */
-TCLAPI Tcl_Obj * Tcl_DbNewStringObj(const char *bytes, int length,
+TCLAPI Tcl_Obj * Tcl_DbNewStringObj(const char *bytes, size_t length,
const char *file, int line);
/* 29 */
TCLAPI Tcl_Obj * Tcl_DuplicateObj(Tcl_Obj *objPtr);
@@ -186,7 +186,7 @@ TCLAPI Tcl_Obj * Tcl_NewLongObj(long longValue);
/* 55 */
TCLAPI Tcl_Obj * Tcl_NewObj(void);
/* 56 */
-TCLAPI Tcl_Obj * Tcl_NewStringObj(const char *bytes, int length);
+TCLAPI Tcl_Obj * Tcl_NewStringObj(const char *bytes, size_t length);
/* 57 */
TCLAPI void Tcl_SetBooleanObj(Tcl_Obj *objPtr, int boolValue);
/* 58 */
@@ -823,7 +823,7 @@ TCLAPI void Tcl_DeleteThreadExitHandler(Tcl_ExitProc *proc,
TCLAPI void Tcl_DiscardResult(Tcl_SavedResult *statePtr);
/* 291 */
TCLAPI int Tcl_EvalEx(Tcl_Interp *interp, const char *script,
- int numBytes, int flags);
+ size_t numBytes, int flags);
/* 292 */
TCLAPI int Tcl_EvalObjv(Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[], int flags);
@@ -1812,7 +1812,7 @@ typedef struct TclStubs {
Tcl_Obj * (*tcl_DbNewListObj) (int objc, Tcl_Obj *const *objv, const char *file, int line); /* 25 */
Tcl_Obj * (*tcl_DbNewLongObj) (long longValue, const char *file, int line); /* 26 */
Tcl_Obj * (*tcl_DbNewObj) (const char *file, int line); /* 27 */
- Tcl_Obj * (*tcl_DbNewStringObj) (const char *bytes, int length, const char *file, int line); /* 28 */
+ Tcl_Obj * (*tcl_DbNewStringObj) (const char *bytes, size_t length, const char *file, int line); /* 28 */
Tcl_Obj * (*tcl_DuplicateObj) (Tcl_Obj *objPtr); /* 29 */
void (*tclFreeObj) (Tcl_Obj *objPtr); /* 30 */
int (*tcl_GetBoolean) (Tcl_Interp *interp, const char *src, int *boolPtr); /* 31 */
@@ -1840,7 +1840,7 @@ typedef struct TclStubs {
Tcl_Obj * (*tcl_NewListObj) (int objc, Tcl_Obj *const objv[]); /* 53 */
Tcl_Obj * (*tcl_NewLongObj) (long longValue); /* 54 */
Tcl_Obj * (*tcl_NewObj) (void); /* 55 */
- Tcl_Obj * (*tcl_NewStringObj) (const char *bytes, int length); /* 56 */
+ Tcl_Obj * (*tcl_NewStringObj) (const char *bytes, size_t length); /* 56 */
void (*tcl_SetBooleanObj) (Tcl_Obj *objPtr, int boolValue); /* 57 */
unsigned char * (*tcl_SetByteArrayLength) (Tcl_Obj *objPtr, int length); /* 58 */
void (*tcl_SetByteArrayObj) (Tcl_Obj *objPtr, const unsigned char *bytes, int length); /* 59 */
@@ -2083,7 +2083,7 @@ typedef struct TclStubs {
void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc *proc, ClientData clientData); /* 288 */
void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc *proc, ClientData clientData); /* 289 */
void (*tcl_DiscardResult) (Tcl_SavedResult *statePtr); /* 290 */
- int (*tcl_EvalEx) (Tcl_Interp *interp, const char *script, int numBytes, int flags); /* 291 */
+ int (*tcl_EvalEx) (Tcl_Interp *interp, const char *script, size_t numBytes, int flags); /* 291 */
int (*tcl_EvalObjv) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); /* 292 */
int (*tcl_EvalObjEx) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 293 */
void (*tcl_ExitThread) (int status); /* 294 */
diff --git a/generic/tclInt.h b/generic/tclInt.h
index df1507d..0c039ea 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -1802,17 +1802,15 @@ typedef struct Interp {
/*
* The first two fields were named "result" and "freeProc" in earlier
- * versions of Tcl. They are no longer used within Tcl, and are no
- * longer available to be accessed by extensions. However, they cannot
- * be removed. Why? There is a deployed base of stub-enabled extensions
- * that query the value of iPtr->stubTable. For them to continue to work,
- * the location of the field "stubTable" within the Interp struct cannot
- * change. The most robust way to assure that is to leave all fields up to
- * that one undisturbed.
+ * versions of Tcl. They are re-used for another purpose now, but
+ * the offset of the "errorLine" and "stubTable" fields is maintained.
*/
- const char *legacyResult;
- void (*legacyFreeProc) (void);
+ Tcl_Obj *objResultPtr; /* Interpreter result object. */
+ Tcl_Obj *emptyObjPtr; /* Points to an object holding an empty
+ * string. Returned by Tcl_ObjSetVar2 when
+ * variable traces change a variable in a
+ * gross way. */
int errorLine; /* When TCL_ERROR is returned, this gives the
* line number in the command where the error
* occurred (1 means first line). */
@@ -1921,13 +1919,6 @@ typedef struct Interp {
struct ExecEnv *execEnvPtr; /* Execution environment for Tcl bytecode
* execution. Contains a pointer to the Tcl
* evaluation stack. */
- Tcl_Obj *emptyObjPtr; /* Points to an object holding an empty
- * string. Returned by Tcl_ObjSetVar2 when
- * variable traces change a variable in a
- * gross way. */
- Tcl_Obj *objResultPtr; /* If the last command returned an object
- * result, this points to it. Should not be
- * accessed directly; see comment above. */
Tcl_ThreadId threadId; /* ID of thread that owns the interpreter. */
ActiveCommandTrace *activeCmdTracePtr;
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 75e513d..ee80f0d 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -469,17 +469,6 @@ Tcl_LoadObjCmd(
*/
if (code != TCL_OK) {
- Interp *iPtr = (Interp *) target;
- if (iPtr->legacyResult && !iPtr->legacyFreeProc) {
- /*
- * A call to Tcl_InitStubs() determined the caller extension and
- * this interp are incompatible in their stubs mechanisms, and
- * recorded the error in the oldest legacy place we have to do so.
- */
- Tcl_SetObjResult(target, Tcl_NewStringObj(iPtr->legacyResult, -1));
- iPtr->legacyResult = NULL;
- iPtr->legacyFreeProc = (void (*) (void))-1;
- }
Tcl_TransferResult(target, code, interp);
goto done;
}
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 64c661b..511ffb4 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -327,17 +327,21 @@ Tcl_Obj *
Tcl_NewStringObj(
const char *bytes, /* Points to the first of the length bytes
* used to initialize the new object. */
- int length) /* The number of bytes to copy from "bytes"
+ size_t length) /* The number of bytes to copy from "bytes"
* when initializing the new object. If
* negative, use bytes up to the first NUL
* byte. */
{
Tcl_Obj *objPtr;
- if (length < 0) {
+ /* TODO: remove in final implementation */
+ if ((length + 1) >= INT_MAX) {
+ Tcl_Panic("Tcl_NewStringObj: overflow in length");
+ }
+ if (length == (size_t)-1) {
length = (bytes? strlen(bytes) : 0);
}
- TclNewStringObj(objPtr, bytes, length);
+ TclNewStringObj(objPtr, bytes, (int)length);
return objPtr;
}
#endif /* TCL_MEM_DEBUG */
@@ -376,7 +380,7 @@ Tcl_Obj *
Tcl_DbNewStringObj(
const char *bytes, /* Points to the first of the length bytes
* used to initialize the new object. */
- int length, /* The number of bytes to copy from "bytes"
+ size_t length, /* The number of bytes to copy from "bytes"
* when initializing the new object. If
* negative, use bytes up to the first NUL
* byte. */
@@ -387,11 +391,15 @@ Tcl_DbNewStringObj(
{
Tcl_Obj *objPtr;
- if (length < 0) {
+ /* TODO: remove in final implementation */
+ if ((length + 1) >= INT_MAX) {
+ Tcl_Panic("Tcl_NewStringObj: overflow in length");
+ }
+ if (length == (size_t)-1) {
length = (bytes? strlen(bytes) : 0);
}
TclDbNewObj(objPtr, file, line);
- TclInitStringRep(objPtr, bytes, length);
+ TclInitStringRep(objPtr, bytes, (int)length);
return objPtr;
}
#else /* if not TCL_MEM_DEBUG */
@@ -399,7 +407,7 @@ Tcl_Obj *
Tcl_DbNewStringObj(
const char *bytes, /* Points to the first of the length bytes
* used to initialize the new object. */
- int length, /* The number of bytes to copy from "bytes"
+ size_t length, /* The number of bytes to copy from "bytes"
* when initializing the new object. If
* negative, use bytes up to the first NUL
* byte. */
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 7a4b0c0..da25ce0 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -45,10 +45,10 @@
#define TclPkgProvide pkgProvide
static int TclPkgProvide(
- Tcl_Interp *interp, /* Interpreter in which package is now
- * available. */
- const char *name, /* Name of package. */
- const char *version) /* Version string for package. */
+ Tcl_Interp *interp, /* Interpreter in which package is now
+ * available. */
+ const char *name, /* Name of package. */
+ const char *version) /* Version string for package. */
{
/* In Tcl 9, Tcl_PkgProvide is a macro calling Tcl_PkgProvideEx.
* The only way this stub can be called is by an extension compiled
@@ -62,8 +62,8 @@ static int TclPkgProvide(
* extension originally called:
* Tcl_StubsInit(interp, "8", 0)
*/
- Tcl_PkgRequireEx(interp, "Tcl", "8", 0, NULL);
- return TCL_ERROR;
+ Tcl_PkgRequireEx(interp, "Tcl", "8", 0, NULL);
+ return TCL_ERROR;
}
#ifdef __WIN32__
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index cadb7b9..6c89562 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -60,57 +60,91 @@ Tcl_InitStubs(
ClientData pkgData = NULL;
const TclStubs *stubsPtr = iPtr->stubTable;
+ /* Compatibility with Tcl8. If "exact" has the value 0 or 1, then parameters
+ * tclversion and magic are not used, so fill in the right Tcl8 values. */
+ if ((exact|1) == 1) {
+ tclversion = "8";
+ magic = TCL_STUB_MAGIC;
+ exact |= (int)sizeof(int);
+ }
/*
* We can't optimize this check by caching tclStubsPtr because that
* prevents apps from being able to load/unload Tcl dynamically multiple
* times. [Bug 615304]
*/
- if (!stubsPtr || (stubsPtr->magic != TCL_STUB_MAGIC)) {
- iPtr->legacyResult = "interpreter uses an incompatible stubs mechanism";
- iPtr->legacyFreeProc = 0; /* TCL_STATIC */
- return NULL;
- }
-
- actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, &pkgData);
- if (actualVersion == NULL) {
+ if (!stubsPtr || (stubsPtr->magic != magic)) {
+ /* This can only be executed in a Tcl < 8.1 interpreter, because
+ * the magic values are kept the same in later versions. */
+ iPtr->objResultPtr = (Tcl_Obj *)
+ "interpreter uses an incompatible stubs mechanism";
+ iPtr->emptyObjPtr = 0; /* TCL_STATIC */
return NULL;
}
- if (exact&1) {
- const char *p = version;
- int count = 0;
- while (*p) {
- count += !ISDIGIT(*p++);
+ if(iPtr->errorLine == TCL_STUB_MAGIC) {
+ actualVersion = (const char *)iPtr->objResultPtr;
+ tclStubsPtr = stubsPtr;
+ } else {
+ actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, &pkgData);
+ if (actualVersion == NULL) {
+ return NULL;
}
- if (count == 1) {
- const char *q = actualVersion;
+ if (exact&1) {
+ const char *p = version;
+ int count = 0;
+
+ while (*p) {
+ count += !ISDIGIT(*p++);
+ }
+ if (count == 1) {
+ const char *q = actualVersion;
- p = version;
- while (*p && (*p == *q)) {
- p++; q++;
+ p = version;
+ while (*p && (*p == *q)) {
+ p++; q++;
+ }
+ if (*p || ISDIGIT(*q)) {
+ /* Construct error message */
+ stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL);
+ return NULL;
+ }
+ } else {
+ actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL);
+ if (actualVersion == NULL) {
+ return NULL;
+ }
}
- if (*p || ISDIGIT(*q)) {
- /* Construct error message */
- stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL);
+ }
+
+#define MASK (4+8+16) /* possible values of sizeof(size_t) */
+
+ if (stubsPtr->reserved77) {
+ /* We are running Tcl 8. */
+ if ((exact & MASK) != (int)sizeof(int)) {
+ char msg[32], *p = msg;
+
+ /* Take "version", but strip off everything after '-' */
+ while (*version && *version != '-') {
+ *p++ = *version++;
+ }
+ *p = '\0';
+ stubsPtr->tcl_AppendResult(interp, "incompatible stub library: have ",
+ tclversion, ", need ", msg, NULL);
return NULL;
}
+ tclStubsPtr = (TclStubs *)pkgData;
} else {
- actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL);
- if (actualVersion == NULL) {
+ /* We are running Tcl 9. */
+ if ((exact & MASK) != (int)sizeof(size_t)) {
+ stubsPtr->tcl_AppendResult(interp, "incompatible stub library: have ",
+ tclversion, ", need 9", NULL);
return NULL;
}
+ tclStubsPtr = stubsPtr;
}
}
- if (stubsPtr->reserved77) {
- /* We are running Tcl 8. Do some additional checks here. */
- tclStubsPtr = (TclStubs *)pkgData;
- } else {
- /* We are running Tcl 9. Do some additional checks here. */
- tclStubsPtr = stubsPtr;
- }
-
if (tclStubsPtr->hooks) {
tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;
tclIntStubsPtr = tclStubsPtr->hooks->tclIntStubs;
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 54862f1..e07c5c1 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -510,7 +510,7 @@ Tcltest_Init(
"-appinitprocclosestderr", "-appinitprocsetrcfile", NULL
};
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
if (Tcl_TomMath_InitStubs(interp, TCL_VERSION) == NULL) {
@@ -734,7 +734,7 @@ int
Tcltest_SafeInit(
Tcl_Interp *interp) /* Interpreter for application. */
{
- if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
return Procbodytest_SafeInit(interp);
diff --git a/library/dde/pkgIndex.tcl b/library/dde/pkgIndex.tcl
index 4cf73d0..109fe0d 100644
--- a/library/dde/pkgIndex.tcl
+++ b/library/dde/pkgIndex.tcl
@@ -1,7 +1,9 @@
if {([info commands ::tcl::pkgconfig] eq "")
|| ([info sharedlibextension] ne ".dll")} return
-if {[::tcl::pkgconfig get debug]} {
- package ifneeded dde 1.4.0 [list load [file join $dir tcldde14g.dll] dde]
+if {[package vsatisfies [package provide Tcl] 9.0]} {
+ package ifneeded dde 1.4.0 [list load [file join $dir dde.dll] dde]
+} elseif {[::tcl::pkgconfig get debug]} {
+ package ifneeded dde 1.4.0 [list load [file join $dir tcldde14g.dll] dde]
} else {
package ifneeded dde 1.4.0 [list load [file join $dir tcldde14.dll] dde]
}
diff --git a/library/reg/pkgIndex.tcl b/library/reg/pkgIndex.tcl
index 55af4b3..d590404 100755
--- a/library/reg/pkgIndex.tcl
+++ b/library/reg/pkgIndex.tcl
@@ -1,9 +1,9 @@
if {([info commands ::tcl::pkgconfig] eq "")
|| ([info sharedlibextension] ne ".dll")} return
-if {[::tcl::pkgconfig get debug]} {
- package ifneeded registry 1.3.0 \
- [list load [file join $dir tclreg13g.dll] registry]
+if {[package vsatisfies [package provide Tcl] 9.0]} {
+ package ifneeded registry 1.3.0 [list load [file join $dir reg.dll] registry]
+} elseif {[::tcl::pkgconfig get debug]} {
+ package ifneeded registry 1.3.0 [list load [file join $dir tclreg13g.dll] registry]
} else {
- package ifneeded registry 1.3.0 \
- [list load [file join $dir tclreg13.dll] registry]
+ package ifneeded registry 1.3.0 [list load [file join $dir tclreg13.dll] registry]
}
diff --git a/tools/tsdPerf.c b/tools/tsdPerf.c
index 40004b1..a75e962 100644
--- a/tools/tsdPerf.c
+++ b/tools/tsdPerf.c
@@ -40,7 +40,7 @@ tsdPerfGetObjCmd(ClientData cdata, Tcl_Interp *interp, int objc, Tcl_Obj *const
int
Tsdperf_Init(Tcl_Interp *interp) {
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
diff --git a/unix/Makefile.in b/unix/Makefile.in
index f57d0ce..d016d5d 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -335,7 +335,10 @@ TOMMATH_OBJS = bncore.o bn_reverse.o bn_fast_s_mp_mul_digs.o \
bn_mp_unsigned_bin_size.o bn_mp_xor.o bn_mp_zero.o bn_s_mp_add.o \
bn_s_mp_mul_digs.o bn_s_mp_sqr.o bn_s_mp_sub.o
-STUB_LIB_OBJS = tclStubLib.o tclTomMathStubLib.o tclOOStubLib.o ${COMPAT_OBJS}
+STUB_LIB_OBJS = tclStubLib.o \
+ tclTomMathStubLib.o \
+ tclOOStubLib.o \
+ ${COMPAT_OBJS}
UNIX_OBJS = tclUnixChan.o tclUnixEvent.o tclUnixFCmd.o \
tclUnixFile.o tclUnixPipe.o tclUnixSock.o \
diff --git a/unix/configure b/unix/configure
index 82ca9df..087cdcb 100755
--- a/unix/configure
+++ b/unix/configure
@@ -7138,7 +7138,7 @@ echo "$as_me: error: ${CC} is not a cygwin compiler." >&2;}
echo "$as_me: error: CYGWIN compile is only supported with --enable-threads" >&2;}
{ (exit 1); exit 1; }; }
fi
- if test "x${SHARED_BUILD}" = "x1" -a ! -f "../win/tcldde14.dll" -a ! -f "../win/tk86.dll"; then
+ if test "x${SHARED_BUILD}" = "x1" -a ! -f "../win/dde.dll" -a ! -f "../win/tk86.dll"; then
{ { echo "$as_me:$LINENO: error: Please configure and make the ../win directory first." >&5
echo "$as_me: error: Please configure and make the ../win directory first." >&2;}
{ (exit 1); exit 1; }; }
@@ -19464,6 +19464,9 @@ fi
VERSION='${VERSION}'
eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
+VERSION=''
+eval "TCL_STUB_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
+
VERSION=${TCL_VERSION}
#--------------------------------------------------------------------
@@ -19492,15 +19495,11 @@ fi
# Replace ${VERSION} with contents of ${TCL_VERSION}
# double-eval to account for TCL_TRIM_DOTS.
#
-eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
+eval "TCL_STUB_LIB_FILE=libtclstub${TCL_STUB_LIB_SUFFIX}"
eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
eval "TCL_STUB_LIB_DIR=${libdir}"
-if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
- TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}"
-else
- TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`"
-fi
+TCL_STUB_LIB_FLAG="-ltclstub"
TCL_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
diff --git a/unix/configure.in b/unix/configure.in
index 4ebf1af..e9a9485 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -868,6 +868,9 @@ fi
VERSION='${VERSION}'
eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
+VERSION=''
+eval "TCL_STUB_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
+
VERSION=${TCL_VERSION}
#--------------------------------------------------------------------
@@ -896,15 +899,11 @@ fi
# Replace ${VERSION} with contents of ${TCL_VERSION}
# double-eval to account for TCL_TRIM_DOTS.
#
-eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
+eval "TCL_STUB_LIB_FILE=libtclstub${TCL_STUB_LIB_SUFFIX}"
eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
eval "TCL_STUB_LIB_DIR=${libdir}"
-if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
- TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}"
-else
- TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`"
-fi
+TCL_STUB_LIB_FLAG="-ltclstub"
TCL_BUILD_STUB_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
TCL_STUB_LIB_SPEC="-L${TCL_STUB_LIB_DIR} ${TCL_STUB_LIB_FLAG}"
diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c
index afa346a..d2f0fdc 100644
--- a/unix/dltest/pkga.c
+++ b/unix/dltest/pkga.c
@@ -122,7 +122,7 @@ Pkga_Init(
{
int code;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
code = Tcl_PkgProvideEx(interp, "Pkga", "1.0", NULL);
diff --git a/unix/dltest/pkgc.c b/unix/dltest/pkgc.c
index c76c2d2..9478de9 100644
--- a/unix/dltest/pkgc.c
+++ b/unix/dltest/pkgc.c
@@ -112,7 +112,7 @@ Pkgc_Init(
{
int code;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
code = Tcl_PkgProvideEx(interp, "Pkgc", "1.7.2", NULL);
@@ -149,7 +149,7 @@ Pkgc_SafeInit(
{
int code;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
code = Tcl_PkgProvideEx(interp, "Pkgc", "1.7.2", NULL);
diff --git a/unix/dltest/pkgd.c b/unix/dltest/pkgd.c
index ae9ff93..47489e7 100644
--- a/unix/dltest/pkgd.c
+++ b/unix/dltest/pkgd.c
@@ -112,7 +112,7 @@ Pkgd_Init(
{
int code;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
code = Tcl_PkgProvideEx(interp, "Pkgd", "7.3", NULL);
@@ -149,7 +149,7 @@ Pkgd_SafeInit(
{
int code;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
code = Tcl_PkgProvideEx(interp, "Pkgd", "7.3", NULL);
diff --git a/unix/dltest/pkge.c b/unix/dltest/pkge.c
index c3380a7..336dd50 100644
--- a/unix/dltest/pkge.c
+++ b/unix/dltest/pkge.c
@@ -38,7 +38,7 @@ Pkge_Init(
{
static const char script[] = "if 44 {open non_existent}";
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
return Tcl_EvalEx(interp, script, -1, 0);
diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c
index b92b320..849fdbb 100644
--- a/unix/dltest/pkgua.c
+++ b/unix/dltest/pkgua.c
@@ -199,7 +199,7 @@ Pkgua_Init(
int code, cmdIndex = 0;
Tcl_Command *cmdTokens;
- if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index b13fddd..e969178 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1246,7 +1246,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
if test "x${TCL_THREADS}" = "x0"; then
AC_MSG_ERROR([CYGWIN compile is only supported with --enable-threads])
fi
- if test "x${SHARED_BUILD}" = "x1" -a ! -f "../win/tcldde14.dll" -a ! -f "../win/tk86.dll"; then
+ if test "x${SHARED_BUILD}" = "x1" -a ! -f "../win/dde.dll" -a ! -f "../win/tk86.dll"; then
AC_MSG_ERROR([Please configure and make the ../win directory first.])
fi
;;
diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c
index fcb0773..223b7cb 100644
--- a/unix/tclXtTest.c
+++ b/unix/tclXtTest.c
@@ -48,7 +48,7 @@ int
Tclxttest_Init(
Tcl_Interp *interp) /* Interpreter for application. */
{
- if (Tcl_InitStubs(interp, "8.1", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
XtToolkitInitialize();
diff --git a/win/Makefile.in b/win/Makefile.in
index d061df2..bd6877e 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -133,10 +133,10 @@ REGDOTVER = @TCL_REG_MAJOR_VERSION@.@TCL_REG_MINOR_VERSION@
TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
TCL_DLL_FILE = @TCL_DLL_FILE@
TCL_LIB_FILE = @TCL_LIB_FILE@
-DDE_DLL_FILE = tcldde$(DDEVER)${DLLSUFFIX}
-DDE_LIB_FILE = @LIBPREFIX@tcldde$(DDEVER)${LIBSUFFIX}
-REG_DLL_FILE = tclreg$(REGVER)${DLLSUFFIX}
-REG_LIB_FILE = @LIBPREFIX@tclreg$(REGVER)${LIBSUFFIX}
+DDE_DLL_FILE = dde.dll
+DDE_LIB_FILE = @LIBPREFIX@dde.a
+REG_DLL_FILE = reg.dll
+REG_LIB_FILE = @LIBPREFIX@reg.a
TEST_DLL_FILE = tcltest$(VER)${DLLSUFFIX}
TEST_LIB_FILE = @LIBPREFIX@tcltest$(VER)${LIBSUFFIX}
ZLIB_DLL_FILE = zlib1.dll
diff --git a/win/configure b/win/configure
index ba10113..7fc7e22 100755
--- a/win/configure
+++ b/win/configure
@@ -5105,8 +5105,8 @@ eval "TCL_SRC_DIR=\"`cd $srcdir/..; pwd`\""
eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}"
-eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${VER}${LIBSUFFIX}\""
-eval "TCL_STUB_LIB_FLAG=\"-ltclstub${VER}${LIBFLAGSUFFIX}\""
+eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${LIBSUFFIX}\""
+eval "TCL_STUB_LIB_FLAG=\"-ltclstub\""
eval "TCL_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TCL_STUB_LIB_FLAG}\""
eval "TCL_STUB_LIB_SPEC=\"-L${libdir} ${TCL_STUB_LIB_FLAG}\""
eval "TCL_BUILD_STUB_LIB_PATH=\"`pwd`/${TCL_STUB_LIB_FILE}\""
diff --git a/win/configure.in b/win/configure.in
index e74a745..f89b18a 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -291,8 +291,8 @@ eval "TCL_SRC_DIR=\"`cd $srcdir/..; pwd`\""
eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}"
-eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${VER}${LIBSUFFIX}\""
-eval "TCL_STUB_LIB_FLAG=\"-ltclstub${VER}${LIBFLAGSUFFIX}\""
+eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${LIBSUFFIX}\""
+eval "TCL_STUB_LIB_FLAG=\"-ltclstub\""
eval "TCL_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TCL_STUB_LIB_FLAG}\""
eval "TCL_STUB_LIB_SPEC=\"-L${libdir} ${TCL_STUB_LIB_FLAG}\""
eval "TCL_BUILD_STUB_LIB_PATH=\"`pwd`/${TCL_STUB_LIB_FILE}\""
diff --git a/win/makefile.vc b/win/makefile.vc
index 2784140..d562751 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -203,16 +203,16 @@ TCLIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
TCLLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT)
TCLLIB = $(OUT_DIR)\$(TCLLIBNAME)
-TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib
+TCLSTUBLIBNAME = $(STUBPREFIX).lib
TCLSTUBLIB = $(OUT_DIR)\$(TCLSTUBLIBNAME)
TCLSHNAME = $(PROJECT)sh$(VERSION)$(SUFX).exe
TCLSH = $(OUT_DIR)\$(TCLSHNAME)
-TCLREGLIBNAME = $(PROJECT)reg$(REGVERSION)$(SUFX:t=).$(EXT)
+TCLREGLIBNAME = reg.dll
TCLREGLIB = $(OUT_DIR)\$(TCLREGLIBNAME)
-TCLDDELIBNAME = $(PROJECT)dde$(DDEVERSION)$(SUFX:t=).$(EXT)
+TCLDDELIBNAME = dde.dll
TCLDDELIB = $(OUT_DIR)\$(TCLDDELIBNAME)
TCLTEST = $(OUT_DIR)\$(PROJECT)test.exe
diff --git a/win/rules.vc b/win/rules.vc
index 1513198..efcdf25 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -311,15 +311,12 @@ UNCHECKED = 0
#----------------------------------------
# Naming convention:
-# t = full thread support.
# s = static library (as opposed to an
# import library)
# g = linked to the debug enabled C
# run-time.
-# x = special static build when it
-# links to the dynamic C run-time.
#----------------------------------------
-SUFX = tsgx
+SUFX = sg
!if $(DEBUG)
BUILDDIRTOP = Debug
@@ -338,26 +335,15 @@ BUILDDIRTOP =$(BUILDDIRTOP)_VC$(VCVER)
SUFX = $(SUFX:g=)
!endif
-TMP_DIRFULL = .\$(BUILDDIRTOP)\$(PROJECT)_ThreadedDynamicStaticX
+TMP_DIRFULL = .\$(BUILDDIRTOP)\$(PROJECT)_DynamicStatic
!if !$(STATIC_BUILD)
TMP_DIRFULL = $(TMP_DIRFULL:Static=)
SUFX = $(SUFX:s=)
EXT = dll
-TMP_DIRFULL = $(TMP_DIRFULL:X=)
-SUFX = $(SUFX:x=)
!else
TMP_DIRFULL = $(TMP_DIRFULL:Dynamic=)
EXT = lib
-!if !$(MSVCRT)
-TMP_DIRFULL = $(TMP_DIRFULL:X=)
-SUFX = $(SUFX:x=)
-!endif
-!endif
-
-!if !$(TCL_THREADS)
-TMP_DIRFULL = $(TMP_DIRFULL:Threaded=)
-SUFX = $(SUFX:t=)
!endif
!ifndef TMP_DIR
@@ -585,8 +571,8 @@ TCLSH = "$(_TCLDIR)\bin\tclsh$(TCL_VERSION)t$(SUFX).exe"
TCLSTUBLIB = "$(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib"
TCLIMPLIB = "$(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX).lib"
TCL_LIBRARY = $(_TCLDIR)\lib
-TCLREGLIB = "$(_TCLDIR)\lib\tclreg13$(SUFX:t=).lib"
-TCLDDELIB = "$(_TCLDIR)\lib\tcldde14$(SUFX:t=).lib"
+TCLREGLIB = "$(_TCLDIR)\lib\reg.lib"
+TCLDDELIB = "$(_TCLDIR)\lib\dde.lib"
COFFBASE = \must\have\tcl\sources\to\build\this\target
TCLTOOLSDIR = \must\have\tcl\sources\to\build\this\target
TCL_INCLUDES = -I"$(_TCLDIR)\include"
@@ -598,8 +584,8 @@ TCLSH = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)t$(SUFX).exe"
TCLSTUBLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib"
TCLIMPLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX).lib"
TCL_LIBRARY = $(_TCLDIR)\library
-TCLREGLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tclreg13$(SUFX:t=).lib"
-TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\tcldde14$(SUFX:t=).lib"
+TCLREGLIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\reg.lib"
+TCLDDELIB = "$(_TCLDIR)\win\$(BUILDDIRTOP)\dde.lib"
COFFBASE = "$(_TCLDIR)\win\coffbase.txt"
TCLTOOLSDIR = $(_TCLDIR)\tools
TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win"
diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index 013b320..b7de115 100644
--- a/win/tclWinDde.c
+++ b/win/tclWinDde.c
@@ -147,7 +147,7 @@ int
Dde_Init(
Tcl_Interp *interp)
{
- if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}
diff --git a/win/tclWinReg.c b/win/tclWinReg.c
index 643bd06..7d6b012 100644
--- a/win/tclWinReg.c
+++ b/win/tclWinReg.c
@@ -156,7 +156,7 @@ Registry_Init(
{
Tcl_Command cmd;
- if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5-", 0) == NULL) {
return TCL_ERROR;
}