Skip to content

Commit

Permalink
Make build switchable by defining (or not) TCL_LOAD_FROM_MEMORY
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Nov 26, 2024
1 parent 0a8c626 commit d5f2977
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 0 additions & 4 deletions win/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ TOMMATH_OBJS = \


WIN_OBJS = \
MemoryModule.$(OBJEXT) \
tclWin32Dll.$(OBJEXT) \
tclWinChan.$(OBJEXT) \
tclWinConsole.$(OBJEXT) \
Expand Down Expand Up @@ -703,9 +702,6 @@ tclZipfs.${OBJEXT}: $(GENERIC_DIR)/tclZipfs.c
$(CC) -c $(CC_SWITCHES) -DBUILD_tcl \
$(ZLIB_INCLUDE) -I$(MINIZIP_DIR_NATIVE) @DEPARG@ $(CC_OBJNAME)

MemoryModule.${OBJEXT}: $(WIN_DIR)/MemoryModule.c
$(CC) -c $(CC_SWITCHES) -DUNICODE -D_UNICODE @DEPARG@ $(CC_OBJNAME)


# TIP #59, embedding of configuration information into the binary library.
#
Expand Down
4 changes: 0 additions & 4 deletions win/makefile.vc
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ TOMMATHOBJS = $(OUT_DIR)\tommath.lib
!endif

PLATFORMOBJS = \
$(TMP_DIR)\MemoryModule.obj \
$(TMP_DIR)\tclWin32Dll.obj \
$(TMP_DIR)\tclWinChan.obj \
$(TMP_DIR)\tclWinConsole.obj \
Expand Down Expand Up @@ -915,9 +914,6 @@ $(TMP_DIR)\tclZipfs.obj: $(GENERICDIR)\tclZipfs.c
$(TMP_DIR)\tclZlib.obj: $(GENERICDIR)\tclZlib.c
$(cc32) $(pkgcflags) -I$(COMPATDIR)\zlib -Fo$@ $?

$(TMP_DIR)\MemoryModule.obj: $(WIN_DIR)\MemoryModule.c
$(cc32) $(pkgcflags) /DUNICODE /D_UNICODE -Fo$@ $?

# Following the lead of the autoconf based make, we define the
# CFG_RUNTIME_*DIR flags specifically for tclPkgConfig
# and not as part of the global defines. These are all defined
Expand Down
4 changes: 3 additions & 1 deletion win/tclWinLoad.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@

#include "tclWinInt.h"
#ifdef TCL_LOAD_FROM_MEMORY
#undef UNICODE
#undef _UNICODE
#define UNICODE
#define _UNICODE
#include "MemoryModule.h"
#include "MemoryModule.c"
#endif

/*
Expand Down

0 comments on commit d5f2977

Please sign in to comment.