diff options
author | patthoyts <patthoyts@noemail.net> | 2007-09-19 10:53:23 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@noemail.net> | 2007-09-19 10:53:23 (GMT) |
commit | bac88a84595e64d28664fd905e172ad878610aa7 (patch) | |
tree | 71d22dfd8dccecc2fa9b11b25afb0c5dfa05fc52 | |
parent | b602e4828f291371cbf9fbffb2b7103470af2311 (diff) | |
download | tcl-bac88a84595e64d28664fd905e172ad878610aa7.zip tcl-bac88a84595e64d28664fd905e172ad878610aa7.tar.gz tcl-bac88a84595e64d28664fd905e172ad878610aa7.tar.bz2 |
Replace isdigit call with an internal implementation to avoid libc linkage on windows
FossilOrigin-Name: be4a3534b4cd6b43458ff2b19861c783e97d000b
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | generic/tclStubLib.c | 13 |
2 files changed, 15 insertions, 2 deletions
@@ -1,3 +1,7 @@ +2007-09-19 Pat Thoyts <patthoyts@users.sourceforge.net> + + * generic/tclStubLib.: Replaced isdigit with internal implementation. + 2007-09-18 Don Porter <dgp@users.sourceforge.net> * generic/tclStubLib.c: Remove C library calls from Tcl_InitStubs() diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 9fbd848..f674687 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.17 2007/09/18 16:07:50 dgp Exp $ + * RCS: @(#) $Id: tclStubLib.c,v 1.18 2007/09/19 10:53:25 patthoyts 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,7 +113,7 @@ Tcl_InitStubs( int count = 0; while (*p) { - count += !isdigit(*p++); + count += !isDigit(*p++); } if (count == 1) { CONST char *q = actualVersion; |