From 43b49460b2d171ac9c9fd20e1af9ceb0266f288c Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 19 Sep 2007 17:28:37 +0000 Subject: merge updates from HEAD --- ChangeLog | 21 +++++++++++++++++++++ changes | 21 ++++++++++++++++++++- generic/tclPkg.c | 14 +++++--------- generic/tclStubLib.c | 21 ++++++++++++++++++--- unix/configure | 18 ++++++------------ unix/tcl.m4 | 18 ++++++------------ 6 files changed, 76 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74f954f..7afedb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2007-09-19 Pat Thoyts + + * generic/tclStubLib.: Replaced isdigit with internal implementation. + +2007-09-18 Don Porter + + * generic/tclStubLib.c: Remove C library calls from Tcl_InitStubs() + * win/makefile.vc: so that we don't need the C library linked + in to libtclStub. + +2007-09-17 Pat Thoyts + + * win/makefile.vc: Add crt flags for tclStubLib now it uses + C-library functions + +2007-09-17 Joe English + + * tcl.m4: use '${CC} -shared' instead of 'ld -Bshareable' + to build shared libraries on current NetBSDs [#1749251]. + * unix/configure: regenerated (autoconf-2.59). + 2007-09-17 Don Porter * unix/Makefile.in: Update `make dist` so that tclDTrace.d is diff --git a/changes b/changes index 0bf8b0f..4bfe05b 100644 --- a/changes +++ b/changes @@ -1,6 +1,6 @@ Recent user-visible changes to Tcl: -RCS: @(#) $Id: changes,v 1.116 2007/05/16 22:14:55 das Exp $ +RCS: @(#) $Id: changes,v 1.116.2.1 2007/09/19 17:28:37 dgp Exp $ 1. No more [command1] [command2] construct for grouping multiple commands on a single command line. @@ -6921,3 +6921,22 @@ upvar and namespace upvar. 2007-04-23 (bug fix) Workaround crashing bug in fts_open() on 64bit Darawin. --- Released 8.5a6, April 25, 2007 --- See ChangeLog for details --- + +2007-06-06 (platform support) Darwin: add plist to tclsh. + +2007-06-23 (bug fix) Darwin: prevent post-fork() abort(). + +2007-06-29 (enhancement) Tcl_Alloc alignment on Darwin. + +2007-08-14 (platform support) Darwin: [load] from VFS on intel & 64bit. + +2007-09-03 (compat support) Restore registration of "wideInt" Tcl_ObjType. + +2007-09-06 (platform support) Darwin: drop support for Xcode 1.5 project, add +project for Xcode 3.0. + +2007-09-14 (enhancement)[1793984] DTrace provider for Tcl. + +2007-09-15 (platform support) SunOS-5.1x link with cc, not ld. + +--- Released 8.5b1, September ??, 2007 --- See ChangeLog for details --- 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 { diff --git a/unix/configure b/unix/configure index 81e04bd..7a5702e 100755 --- a/unix/configure +++ b/unix/configure @@ -7383,8 +7383,7 @@ _ACEOF CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; - NetBSD-*|FreeBSD-[1-2].*) - # NetBSD/SPARC needs -fPIC, -fpic will not do. + NetBSD-1.*|FreeBSD-[1-2].*) SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS='${LIBS}' @@ -7434,13 +7433,7 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6 TCL_LIB_VERSIONS_OK=nodots ;; OpenBSD-*) - # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do. - case `machine` in - sparc|sparc64) - SHLIB_CFLAGS="-fPIC";; - *) - SHLIB_CFLAGS="-fpic";; - esac + SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" @@ -7488,17 +7481,18 @@ echo "${ECHO_T}$tcl_cv_ld_elf" >&6 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; - FreeBSD-*) + NetBSD-*|FreeBSD-*) # FreeBSD 3.* and greater have ELF. + # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs SHLIB_CFLAGS="-fPIC" - SHLIB_LD="ld -Bshareable -x" + SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} if test "${TCL_THREADS}" = "1" ; then # The -pthread needs to go in the CFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 6844843..73c1606 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1507,8 +1507,7 @@ dnl AC_CHECK_TOOL(AR, ar) CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; - NetBSD-*|FreeBSD-[[1-2]].*) - # NetBSD/SPARC needs -fPIC, -fpic will not do. + NetBSD-1.*|FreeBSD-[[1-2]].*) SHLIB_CFLAGS="-fPIC" SHLIB_LD="ld -Bshareable -x" SHLIB_LD_LIBS='${LIBS}' @@ -1535,13 +1534,7 @@ dnl AC_CHECK_TOOL(AR, ar) TCL_LIB_VERSIONS_OK=nodots ;; OpenBSD-*) - # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do. - case `machine` in - sparc|sparc64) - SHLIB_CFLAGS="-fPIC";; - *) - SHLIB_CFLAGS="-fpic";; - esac + SHLIB_CFLAGS="-fPIC" SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" @@ -1566,17 +1559,18 @@ dnl AC_CHECK_TOOL(AR, ar) UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; - FreeBSD-*) + NetBSD-*|FreeBSD-*) # FreeBSD 3.* and greater have ELF. + # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs SHLIB_CFLAGS="-fPIC" - SHLIB_LD="ld -Bshareable -x" + SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_LD_LIBS='${LIBS}' SHLIB_SUFFIX=".so" DL_OBJS="tclLoadDl.o" DL_LIBS="" LDFLAGS="$LDFLAGS -export-dynamic" CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' - LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}' + LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} if test "${TCL_THREADS}" = "1" ; then # The -pthread needs to go in the CFLAGS, not LIBS LIBS=`echo $LIBS | sed s/-pthread//` -- cgit v0.12