Skip to content

Commit

Permalink
merge trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
dgp committed Jun 18, 2021
2 parents 34ccd62 + fa8cb8f commit 15d9bf0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions generic/tclZipfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
#define TBLS 1
#endif

#if !defined(NO_DLFCN_H)
#include <dlfcn.h>
#endif

#ifdef HAVE_ZLIB
#include "zlib.h"
#include "crypt.h"
Expand Down Expand Up @@ -3907,6 +3911,12 @@ TclZipfs_TclLibrary(void)
if (ZipfsAppHookFindTclInit(dllName) == TCL_OK) {
return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
}
#elif !defined(NO_DLFCN_H)
Dl_info dlinfo;
if (dladdr(TclZipfs_TclLibrary, &dlinfo) && (dlinfo.dli_fname != NULL)
&& (ZipfsAppHookFindTclInit(dlinfo.dli_fname) == TCL_OK)) {
return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
}
#else
if (ZipfsAppHookFindTclInit(CFG_RUNTIME_LIBDIR "/" CFG_RUNTIME_DLLFILE) == TCL_OK) {
return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
Expand Down
2 changes: 1 addition & 1 deletion unix/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -1524,7 +1524,7 @@ tclZlib.o: $(GENERIC_DIR)/tclZlib.c
$(CC) -c $(CC_SWITCHES) $(ZLIB_INCLUDE) $(GENERIC_DIR)/tclZlib.c

tclZipfs.o: $(GENERIC_DIR)/tclZipfs.c
$(CC) -c $(CC_SWITCHES) \
$(CC) -c $(CC_SWITCHES) -D_GNU_SOURCE \
-DCFG_RUNTIME_DLLFILE="\"$(TCL_LIB_FILE)\"" \
-DCFG_RUNTIME_LIBDIR="\"$(libdir)\"" \
-I$(ZLIB_DIR) -I$(ZLIB_DIR)/contrib/minizip \
Expand Down

0 comments on commit 15d9bf0

Please sign in to comment.