summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-10 12:56:47 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-10 12:56:47 (GMT)
commitc0cb466a863a483140db1ffab76d806c696a4dff (patch)
tree9c39978681530a1166dcad1aab6e6606f6108a54 /generic
parentea4e2c54322fdec470e442447b66d815635851da (diff)
downloadtcl-c0cb466a863a483140db1ffab76d806c696a4dff.zip
tcl-c0cb466a863a483140db1ffab76d806c696a4dff.tar.gz
tcl-c0cb466a863a483140db1ffab76d806c696a4dff.tar.bz2
Make TIP #430 work on cygwin. Simplify some makefiles
Diffstat (limited to 'generic')
-rw-r--r--generic/tclZipfs.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index 7ee13a7..ffc382a 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -38,8 +38,6 @@
#include "zutil.h"
#include "crc32.h"
-#ifdef CFG_RUNTIME_DLLFILE
-
/*
** We are compiling as part of the core.
** TIP430 style zipfs prefix
@@ -50,22 +48,6 @@
#define ZIPFS_APP_MOUNT "//zipfs:/app"
#define ZIPFS_ZIP_MOUNT "//zipfs:/lib/tcl"
-#else /* !CFG_RUNTIME_DLLFILE */
-
-/*
-** We are compiling from the /compat folder of tclconfig
-** Pre TIP430 style zipfs prefix
-** //zipfs:/ doesn't work straight out of the box on either windows or Unix
-** without other changes made to tip 430
-*/
-
-#define ZIPFS_VOLUME "zipfs:/"
-#define ZIPFS_VOLUME_LEN 7
-#define ZIPFS_APP_MOUNT "zipfs:/app"
-#define ZIPFS_ZIP_MOUNT "zipfs:/lib/tcl"
-
-#endif /* CFG_RUNTIME_DLLFILE */
-
/*
* Various constants and offsets found in ZIP archive files
*/
@@ -3163,6 +3145,7 @@ TclZipfs_TclLibrary(void)
* that we must mount the zip file and dll before releasing to search.
*/
+#if !defined(STATIC_BUILD)
#if defined(_WIN32)
hModule = TclWinGetTclInstance();
GetModuleFileNameW(hModule, wName, MAX_PATH);
@@ -3171,12 +3154,20 @@ TclZipfs_TclLibrary(void)
if (ZipfsAppHookFindTclInit(dllName) == TCL_OK) {
return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
}
-#elif /* !_WIN32 && */ defined(CFG_RUNTIME_DLLFILE)
+#else
+# if defined(CFG_RUNTIME_LIBDIR)
if (ZipfsAppHookFindTclInit(
CFG_RUNTIME_LIBDIR "/" CFG_RUNTIME_DLLFILE) == TCL_OK) {
return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
}
-#endif /* _WIN32 || CFG_RUNTIME_DLLFILE */
+# endif
+# if defined(CFG_RUNTIME_BINDIR)
+ if (ZipfsAppHookFindTclInit(
+ CFG_RUNTIME_BINDIR "/" CFG_RUNTIME_DLLFILE) == TCL_OK) {
+ return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
+ }
+# endif
+#endif /* _WIN32 */
/*
* If anything set the cache (but subsequently failed) go with that