summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2025-01-17 12:31:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2025-01-17 12:31:05 (GMT)
commit7efbca8bb1f0b71be7fc54cad0a60256cae86c7d (patch)
tree23c41f357a4b47e8da5db74edad726289c13a5b3
parentb5270c6e6c5aaf3acae369b2a4c95e128274c753 (diff)
parenteb701e1cec48b99353df102dad18ae701e957633 (diff)
downloadtcl-7efbca8bb1f0b71be7fc54cad0a60256cae86c7d.zip
tcl-7efbca8bb1f0b71be7fc54cad0a60256cae86c7d.tar.gz
tcl-7efbca8bb1f0b71be7fc54cad0a60256cae86c7d.tar.bz2
Add dummy TclpLoadMemoryGetBuffer/TclpLoadMemory for Windows and UNIX, so compiling with TCL_LOAD_FROM_MEMORY succeeds (but fallbacks normally at runtime)
-rw-r--r--generic/tclTest.c3
-rw-r--r--unix/Makefile.in2
-rw-r--r--unix/tclLoadDl.c30
-rw-r--r--win/tclWinLoad.c29
4 files changed, 63 insertions, 1 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 38c3355..b616825 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -482,6 +482,9 @@ static const char version[] = TCL_PATCH_LEVEL "+" STRINGIFY(TCL_VERSION_UUID)
#ifdef USE_NMAKE
".nmake"
#endif
+#ifdef TCL_NO_DEPRECATED
+ ".no-deprecate"
+#endif
#if !TCL_THREADS
".no-thread"
#endif
diff --git a/unix/Makefile.in b/unix/Makefile.in
index b72b0da..c312fcd 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -1001,7 +1001,7 @@ INSTALL_DOC_TARGETS = install-doc
INSTALL_PACKAGE_TARGETS = install-packages
INSTALL_DEV_TARGETS = install-headers
INSTALL_EXTRA_TARGETS = @EXTRA_INSTALL@
-INSTALL_TARGETS = $(INSTALL_BASE_TARGETS) $(INSTALL_DOC_TARGETS) $(INSTALL_DEV_TARGETS) \
+INSTALL_TARGETS = $(INSTALL_BASE_TARGETS) $(INSTALL_DEV_TARGETS) $(INSTALL_DOC_TARGETS) \
$(INSTALL_PACKAGE_TARGETS) $(INSTALL_EXTRA_TARGETS)
install: $(INSTALL_TARGETS)
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c
index 07bbc16..eabf387 100644
--- a/unix/tclLoadDl.c
+++ b/unix/tclLoadDl.c
@@ -268,6 +268,36 @@ UnloadFile(
}
/*
+ * These functions are fallbacks if we somehow determine that the platform can
+ * do loading from memory but the user wishes to disable it. They just report
+ * (gracefully) that they fail.
+ */
+
+#ifdef TCL_LOAD_FROM_MEMORY
+
+MODULE_SCOPE void *
+TclpLoadMemoryGetBuffer(
+ TCL_UNUSED(size_t))
+{
+ return NULL;
+}
+
+MODULE_SCOPE int
+TclpLoadMemory(
+ TCL_UNUSED(void *),
+ TCL_UNUSED(size_t),
+ TCL_UNUSED(Tcl_Size),
+ TCL_UNUSED(const char *),
+ TCL_UNUSED(Tcl_LoadHandle *),
+ TCL_UNUSED(Tcl_FSUnloadFileProc **),
+ TCL_UNUSED(int))
+{
+ return TCL_ERROR;
+}
+
+#endif /* TCL_LOAD_FROM_MEMORY */
+
+/*
* Local Variables:
* mode: c
* c-basic-offset: 4
diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c
index b0c4c3b..335e5bc 100644
--- a/win/tclWinLoad.c
+++ b/win/tclWinLoad.c
@@ -396,6 +396,35 @@ InitDLLDirectoryName(void)
}
/*
+ * These functions are fallbacks if we somehow determine that the platform can
+ * do loading from memory but the user wishes to disable it. They just report
+ * (gracefully) that they fail.
+ */
+
+#ifdef TCL_LOAD_FROM_MEMORY
+
+MODULE_SCOPE void *
+TclpLoadMemoryGetBuffer(
+ TCL_UNUSED(size_t))
+{
+ return NULL;
+}
+
+MODULE_SCOPE int
+TclpLoadMemory(
+ TCL_UNUSED(void *),
+ TCL_UNUSED(size_t),
+ TCL_UNUSED(Tcl_Size),
+ TCL_UNUSED(const char *),
+ TCL_UNUSED(Tcl_LoadHandle *),
+ TCL_UNUSED(Tcl_FSUnloadFileProc **),
+ TCL_UNUSED(int))
+{
+ return TCL_ERROR;
+}
+
+#endif /* TCL_LOAD_FROM_MEMORY */
+/*
* Local Variables:
* mode: c
* c-basic-offset: 4