summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-04 20:30:24 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-03-04 20:30:24 (GMT)
commit7fac4ee3a46390a6db3224cf9b2812206343a8cf (patch)
tree0d0feef7fa6515722bb04530c6ba7b7d72f2ba72
parent90b9964cc1fbfce0612065027cc8881f6e6ef6e5 (diff)
parentcc4159c6a8f0e151fb525f520e881b1a4489fa31 (diff)
downloadtcl-7fac4ee3a46390a6db3224cf9b2812206343a8cf.zip
tcl-7fac4ee3a46390a6db3224cf9b2812206343a8cf.tar.gz
tcl-7fac4ee3a46390a6db3224cf9b2812206343a8cf.tar.bz2
Merge 8.6
-rw-r--r--library/clock.tcl4
-rw-r--r--unix/Makefile.in2
-rwxr-xr-xunix/configure6
-rw-r--r--unix/configure.ac6
-rw-r--r--unix/tclUnixInit.c62
-rwxr-xr-xwin/configure15
-rw-r--r--win/configure.ac14
-rw-r--r--win/makefile.vc1
-rw-r--r--win/tclConfig.sh.in2
9 files changed, 38 insertions, 74 deletions
diff --git a/library/clock.tcl b/library/clock.tcl
index ee84b83..b468fea 100644
--- a/library/clock.tcl
+++ b/library/clock.tcl
@@ -31,7 +31,7 @@ uplevel \#0 {
# library code can find message catalogs and time zone definition files.
namespace eval ::tcl::clock \
- [list variable LibDir [file dirname [info script]]]
+ [list variable LibDir [info library]]
#----------------------------------------------------------------------
#
@@ -554,6 +554,8 @@ proc ::tcl::clock::Initialize {} {
pdt -0700 \
yst -0900 \
ydt -0800 \
+ akst -0900 \
+ akdt -0800 \
hst -1000 \
hdt -0900 \
cat -1000 \
diff --git a/unix/Makefile.in b/unix/Makefile.in
index f251f1d..60ae8d9 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -1095,7 +1095,7 @@ install-libraries: libraries
done
@if [ -n "$(TCL_MODULE_PATH)" -a -f $(TOP_DIR)/library/tm.tcl ] ; then \
echo "Customizing tcl module path"; \
- echo "if {![interp issafe]} { ::tcl::tm::roots {$(TCL_MODULE_PATH)} }" >> \
+ echo "if {![interp issafe]} { ::tcl::tm::roots [list $(TCL_MODULE_PATH)] }" >> \
"$(SCRIPT_INSTALL_DIR)/tm.tcl"; \
fi
diff --git a/unix/configure b/unix/configure
index 818fb46..b2410d1 100755
--- a/unix/configure
+++ b/unix/configure
@@ -11316,13 +11316,13 @@ fi
if test "$FRAMEWORK_BUILD" = "1" ; then
test -z "$TCL_PACKAGE_PATH" && \
- TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl ~/Library/Frameworks /Library/Frameworks"
+ TCL_PACKAGE_PATH="~/Library/Tcl:/Library/Tcl:~/Library/Frameworks:/Library/Frameworks"
test -z "$TCL_MODULE_PATH" && \
TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl"
elif test "$prefix/lib" != "$libdir"; then
- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${libdir}} {${prefix}/lib} ${TCL_PACKAGE_PATH}"
+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}:${prefix}/lib"
else
- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${prefix}/lib} ${TCL_PACKAGE_PATH}"
+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${prefix}/lib"
fi
#--------------------------------------------------------------------
diff --git a/unix/configure.ac b/unix/configure.ac
index 57433d8..3152942 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -891,13 +891,13 @@ AC_SUBST(TCL_BUILDTIME_LIBRARY)
if test "$FRAMEWORK_BUILD" = "1" ; then
test -z "$TCL_PACKAGE_PATH" && \
- TCL_PACKAGE_PATH="~/Library/Tcl /Library/Tcl ~/Library/Frameworks /Library/Frameworks"
+ TCL_PACKAGE_PATH="~/Library/Tcl:/Library/Tcl:~/Library/Frameworks:/Library/Frameworks"
test -z "$TCL_MODULE_PATH" && \
TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl"
elif test "$prefix/lib" != "$libdir"; then
- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${libdir}} {${prefix}/lib} ${TCL_PACKAGE_PATH}"
+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}:${prefix}/lib"
else
- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${prefix}/lib} ${TCL_PACKAGE_PATH}"
+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${prefix}/lib"
fi
#--------------------------------------------------------------------
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index ce08425..8e2dd1e 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -100,7 +100,7 @@ typedef struct {
* defined by Makefile.
*/
-static char defaultLibraryDir[sizeof(TCL_LIBRARY)+200] = TCL_LIBRARY;
+static const char defaultLibraryDir[] = TCL_LIBRARY;
/*
* Directory in which to look for packages (each package is typically
@@ -108,7 +108,7 @@ static char defaultLibraryDir[sizeof(TCL_LIBRARY)+200] = TCL_LIBRARY;
* Makefile.
*/
-static char pkgPath[sizeof(TCL_PACKAGE_PATH)+200] = TCL_PACKAGE_PATH;
+static const char pkgPath[] = TCL_PACKAGE_PATH;
/*
* The following table is used to map from Unix locale strings to encoding
@@ -783,7 +783,8 @@ TclpSetVariables(
struct utsname name;
#endif
int unameOK;
- Tcl_DString ds;
+ const char *p, *q;
+ Tcl_Obj *pkgListObj = Tcl_NewObj();
#ifdef HAVE_COREFOUNDATION
char tclLibPath[MAXPATHLEN + 1];
@@ -799,29 +800,20 @@ TclpSetVariables(
if (MacOSXGetLibraryPath(interp, MAXPATHLEN, tclLibPath) == TCL_OK) {
const char *str;
CFBundleRef bundleRef;
+ Tcl_DString ds;
Tcl_SetVar2(interp, "tclDefaultLibrary", NULL, tclLibPath, TCL_GLOBAL_ONLY);
- Tcl_SetVar2(interp, "tcl_pkgPath", NULL, tclLibPath, TCL_GLOBAL_ONLY);
- Tcl_SetVar2(interp, "tcl_pkgPath", NULL, " ",
- TCL_GLOBAL_ONLY | TCL_APPEND_VALUE);
-
+ Tcl_ListObjAppendElement(NULL, pkgListObj, Tcl_NewStringObj(tclLibPath, -1));
str = TclGetEnv("DYLD_FRAMEWORK_PATH", &ds);
if ((str != NULL) && (str[0] != '\0')) {
- char *p = Tcl_DStringValue(&ds);
-
- /*
- * Convert DYLD_FRAMEWORK_PATH from colon to space separated.
- */
-
- do {
- if (*p == ':') {
- *p = ' ';
- }
- } while (*p++);
- Tcl_SetVar2(interp, "tcl_pkgPath", NULL, Tcl_DStringValue(&ds),
- TCL_GLOBAL_ONLY | TCL_APPEND_VALUE);
- Tcl_SetVar2(interp, "tcl_pkgPath", NULL, " ",
- TCL_GLOBAL_ONLY | TCL_APPEND_VALUE);
+ p = Tcl_DStringValue(&ds);
+ while ((q = strchr(p, ':')) != NULL) {
+ Tcl_ListObjAppendElement(NULL, pkgListObj, Tcl_NewStringObj(p, q-p));
+ p = q+1;
+ }
+ if (*p) {
+ Tcl_ListObjAppendElement(NULL, pkgListObj, Tcl_NewStringObj(p, -1));
+ }
Tcl_DStringFree(&ds);
}
bundleRef = CFBundleGetMainBundle();
@@ -835,10 +827,7 @@ TclpSetVariables(
(unsigned char*) tclLibPath, MAXPATHLEN) &&
! TclOSstat(tclLibPath, &statBuf) &&
S_ISDIR(statBuf.st_mode)) {
- Tcl_SetVar2(interp, "tcl_pkgPath", NULL, tclLibPath,
- TCL_GLOBAL_ONLY | TCL_APPEND_VALUE);
- Tcl_SetVar2(interp, "tcl_pkgPath", NULL, " ",
- TCL_GLOBAL_ONLY | TCL_APPEND_VALUE);
+ Tcl_ListObjAppendElement(NULL, pkgListObj, Tcl_NewStringObj(tclLibPath, -1));
}
CFRelease(frameworksURL);
}
@@ -848,21 +837,22 @@ TclpSetVariables(
(unsigned char*) tclLibPath, MAXPATHLEN) &&
! TclOSstat(tclLibPath, &statBuf) &&
S_ISDIR(statBuf.st_mode)) {
- Tcl_SetVar2(interp, "tcl_pkgPath", NULL, tclLibPath,
- TCL_GLOBAL_ONLY | TCL_APPEND_VALUE);
- Tcl_SetVar2(interp, "tcl_pkgPath", NULL, " ",
- TCL_GLOBAL_ONLY | TCL_APPEND_VALUE);
+ Tcl_ListObjAppendElement(NULL, pkgListObj, Tcl_NewStringObj(tclLibPath, -1));
}
CFRelease(frameworksURL);
}
}
- Tcl_SetVar2(interp, "tcl_pkgPath", NULL, pkgPath,
- TCL_GLOBAL_ONLY | TCL_APPEND_VALUE);
- } else
+ }
#endif /* HAVE_COREFOUNDATION */
- {
- Tcl_SetVar2(interp, "tcl_pkgPath", NULL, pkgPath, TCL_GLOBAL_ONLY);
+ p = pkgPath;
+ while ((q = strchr(p, ':')) != NULL) {
+ Tcl_ListObjAppendElement(NULL, pkgListObj, Tcl_NewStringObj(p, q-p));
+ p = q+1;
}
+ if (*p) {
+ Tcl_ListObjAppendElement(NULL, pkgListObj, Tcl_NewStringObj(p, -1));
+ }
+ Tcl_ObjSetVar2(interp, Tcl_NewStringObj("tcl_pkgPath", -1), NULL, pkgListObj, TCL_GLOBAL_ONLY);
#ifdef DJGPP
Tcl_SetVar2(interp, "tcl_platform", "platform", "dos", TCL_GLOBAL_ONLY);
@@ -901,6 +891,7 @@ TclpSetVariables(
#elif !defined NO_UNAME
if (uname(&name) >= 0) {
const char *native;
+ Tcl_DString ds;
unameOK = 1;
@@ -962,6 +953,7 @@ TclpSetVariables(
{
struct passwd *pwEnt = TclpGetPwUid(getuid());
const char *user;
+ Tcl_DString ds;
if (pwEnt == NULL) {
user = "";
diff --git a/win/configure b/win/configure
index 75a3c38..178d6ff 100755
--- a/win/configure
+++ b/win/configure
@@ -653,7 +653,6 @@ TCL_REG_VERSION
TCL_DDE_MINOR_VERSION
TCL_DDE_MAJOR_VERSION
TCL_DDE_VERSION
-TCL_PACKAGE_PATH
TCL_EXP_FILE
TCL_BUILD_EXP_FILE
TCL_LD_SEARCH_FLAGS
@@ -5922,19 +5921,6 @@ else
RC_DEFINES=""
fi
-#--------------------------------------------------------------------
-# The statements below define the symbol TCL_PACKAGE_PATH, which
-# gives a list of directories that may contain packages. The list
-# consists of one directory for machine-dependent binaries and
-# another for platform-independent scripts.
-#--------------------------------------------------------------------
-
-if test "$prefix/lib" != "$libdir"; then
- TCL_PACKAGE_PATH="{${libdir}} {${prefix}/lib}"
-else
- TCL_PACKAGE_PATH="{${prefix}/lib}"
-fi
-
# The tclsh.exe.manifest requires these
# TCL_WIN_VERSION is the 4 dotted pair Windows version format which needs
# the release level, and must account for interim release versioning
@@ -6022,7 +6008,6 @@ TCL_WIN_VERSION="$TCL_VERSION.$TCL_RELEASE_LEVEL.`echo $TCL_PATCH_LEVEL | tr -d
-
# win only
diff --git a/win/configure.ac b/win/configure.ac
index 8391161..173efbf 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -371,19 +371,6 @@ else
RC_DEFINES=""
fi
-#--------------------------------------------------------------------
-# The statements below define the symbol TCL_PACKAGE_PATH, which
-# gives a list of directories that may contain packages. The list
-# consists of one directory for machine-dependent binaries and
-# another for platform-independent scripts.
-#--------------------------------------------------------------------
-
-if test "$prefix/lib" != "$libdir"; then
- TCL_PACKAGE_PATH="{${libdir}} {${prefix}/lib}"
-else
- TCL_PACKAGE_PATH="{${prefix}/lib}"
-fi
-
# The tclsh.exe.manifest requires these
# TCL_WIN_VERSION is the 4 dotted pair Windows version format which needs
# the release level, and must account for interim release versioning
@@ -470,7 +457,6 @@ AC_SUBST(TCL_LD_SEARCH_FLAGS)
AC_SUBST(TCL_BUILD_EXP_FILE)
AC_SUBST(TCL_EXP_FILE)
AC_SUBST(DL_LIBS)
-AC_SUBST(TCL_PACKAGE_PATH)
# win only
AC_SUBST(TCL_DDE_VERSION)
diff --git a/win/makefile.vc b/win/makefile.vc
index 3f6a7e5..9c5882e 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -821,7 +821,6 @@ $(OUT_DIR)\tclConfig.sh: $(WIN_DIR)\tclConfig.sh.in
@TCL_LIB_SPEC@ $(LIB_INSTALL_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
@TCL_INCLUDE_SPEC@ -I$(INCLUDE_INSTALL_DIR)
@TCL_SRC_DIR@ $(ROOT)
-@TCL_PACKAGE_PATH@
@TCL_STUB_LIB_FILE@ $(TCLSTUBLIBNAME)
@TCL_STUB_LIB_FLAG@ $(TCLSTUBLIBNAME)
@TCL_STUB_LIB_SPEC@ -L$(LIB_INSTALL_DIR) $(TCLSTUBLIBNAME)
diff --git a/win/tclConfig.sh.in b/win/tclConfig.sh.in
index 1c33246..7228af6 100644
--- a/win/tclConfig.sh.in
+++ b/win/tclConfig.sh.in
@@ -152,7 +152,7 @@ TCL_SRC_DIR='@TCL_SRC_DIR@'
# List of standard directories in which to look for packages during
# "package require" commands. Contains the "prefix" directory plus also
# the "exec_prefix" directory, if it is different.
-TCL_PACKAGE_PATH='@TCL_PACKAGE_PATH@'
+TCL_PACKAGE_PATH=''
# Tcl supports stub.
TCL_SUPPORTS_STUBS=1