summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclPkg.c14
-rw-r--r--generic/tclStubLib.c21
2 files changed, 23 insertions, 12 deletions
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index b44b228..5830174 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPkg.c,v 1.27.2.2 2007/09/17 15:03:45 dgp Exp $
+ * RCS: @(#) $Id: tclPkg.c,v 1.27.2.3 2007/09/19 17:28:37 dgp Exp $
*
* TIP #268.
* Heavily rewritten to handle the extend version numbers, and extended
@@ -397,7 +397,7 @@ PkgRequireCore(
if (CheckVersionAndConvert(interp, availPtr->version,
&availVersion, &availStable) != TCL_OK) {
/*
- * The provided version number is has invalid syntax. This
+ * The provided version number has invalid syntax. This
* should not happen. This should have been caught by the
* 'package ifneeded' registering the package.
*/
@@ -421,16 +421,12 @@ PkgRequireCore(
}
}
- /*
- * We have found a version which is better than our max.
- */
+ /* We have found a version which is better than our max. */
if (reqc > 0) {
- /*
- * Check satisfaction of requirements.
- */
+ /* Check satisfaction of requirements. */
- satisfies = SomeRequirementSatisfied(availVersion,reqc,reqv);
+ satisfies = SomeRequirementSatisfied(availVersion, reqc, reqv);
if (!satisfies) {
ckfree(availVersion);
availVersion = NULL;
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index 4594997..9f5d325 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStubLib.c,v 1.15.2.1 2007/09/17 15:03:45 dgp Exp $
+ * RCS: @(#) $Id: tclStubLib.c,v 1.15.2.2 2007/09/19 17:28:37 dgp Exp $
*/
/*
@@ -54,6 +54,15 @@ HasStubSupport(
}
/*
+ * Use our own isdigit to avoid linking to libc on windows
+ */
+
+static int isDigit(const int c)
+{
+ return (c >= '0' && c <= '9');
+}
+
+/*
*----------------------------------------------------------------------
*
* Tcl_InitStubs --
@@ -104,10 +113,16 @@ Tcl_InitStubs(
int count = 0;
while (*p) {
- count += !isdigit(*p++);
+ count += !isDigit(*p++);
}
if (count == 1) {
- if (0 != strncmp(version, actualVersion, strlen(version))) {
+ CONST char *q = actualVersion;
+
+ p = version;
+ while (*p && (*p == *q)) {
+ p++; q++;
+ }
+ if (*p) {
return NULL;
}
} else {