summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2026-01-31 06:23:41 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2026-01-31 06:23:41 (GMT)
commitb48c8d0f9ac26c83f78470988eb3a4666268374d (patch)
treee4bcfc46358033e107c10d7a063581d36d3e0248
parent2b78af3517b81cd8c622cd6d9f9039bc7aae914a (diff)
downloadtcl-core-bug-602971ae.zip
tcl-core-bug-602971ae.tar.gz
tcl-core-bug-602971ae.tar.bz2
Pass CFG_{RUNTIME,INSTALL}_SCRDIR to tclInterp.ccore-bug-602971ae
-rw-r--r--generic/tclInterp.c5
-rw-r--r--unix/Makefile.in9
2 files changed, 12 insertions, 2 deletions
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 0b8d580..4a6ff51 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -407,7 +407,7 @@ LocatePreInitScript(Tcl_Interp *interp)
/*
* Need to track checked directories for error reporting. As a side
* benefit, because they are tracked here we can keep overwriting dirPtr
- * without leaking memory.
+ * without leaking memory despite not freeing up any allocated Tcl_Obj's.
*/
searchedDirs = Tcl_NewListObj(0, NULL);
@@ -454,6 +454,9 @@ LocatePreInitScript(Tcl_Interp *interp)
#ifdef CFG_RUNTIME_SCRDIR
TRY_PATH(Tcl_NewStringObj(CFG_RUNTIME_SCRDIR, -1));
#endif
+#ifdef CFG_INSTALL_SCRDIR
+ TRY_PATH(Tcl_NewStringObj(CFG_INSTALL_SCRDIR, -1));
+#endif
assert(initScriptPathPtr == NULL);
diff --git a/unix/Makefile.in b/unix/Makefile.in
index a894baf..b4206f8 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -1398,7 +1398,14 @@ tclIndexObj.o: $(GENERIC_DIR)/tclIndexObj.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclIndexObj.c
tclInterp.o: $(GENERIC_DIR)/tclInterp.c
- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclInterp.c
+ $(CC) -c $(CC_SWITCHES) \
+ -DCFG_INSTALL_LIBDIR="\"$(LIB_INSTALL_DIR)\"" \
+ -DCFG_INSTALL_BINDIR="\"$(BIN_INSTALL_DIR)\"" \
+ -DCFG_INSTALL_SCRDIR="\"$(SCRIPT_INSTALL_DIR)\"" \
+ -DCFG_RUNTIME_LIBDIR="\"$(libdir)\"" \
+ -DCFG_RUNTIME_BINDIR="\"$(bindir)\"" \
+ -DCFG_RUNTIME_SCRDIR="\"$(TCL_LIBRARY)\"" \
+ $(GENERIC_DIR)/tclInterp.c
tclIO.o: $(GENERIC_DIR)/tclIO.c $(IOHDR)
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclIO.c