From 6e968aa4b347f2486c5a7d0b8f72ba2bd5134495 Mon Sep 17 00:00:00 2001 From: mig Date: Sat, 7 May 2011 19:22:13 +0000 Subject: fix USE_TCLALLOC so that it can be enabled without editing the Makefile --- ChangeLog | 5 +++++ generic/tclInt.h | 7 +++++++ unix/Makefile.in | 5 +---- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c88efd1..d78c64e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-05-07 Miguel Sofer + + * generic/tclInt.h: fix USE_TCLALLOC so that it can be enabled + * unix/Makefile.in: without editing the Makefile + 2011-04-21 Don Porter * generic/tclCompile.c: Make sure SetFooFromAny routines react diff --git a/generic/tclInt.h b/generic/tclInt.h index b080fef..20c1155 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2515,6 +2515,13 @@ EXTERN void TclpFreeAllocCache _ANSI_ARGS_((void *)); #else /* not TCL_MEM_DEBUG */ +#if defined(USE_TCLALLOC) && USE_TCLALLOC + MODULE_SCOPE void TclFinalizeAllocSubsystem(); + MODULE_SCOPE void TclInitAlloc(); +#else +# define USE_TCLALLOC 0 +#endif + #ifdef TCL_THREADS /* declared in tclObj.c */ extern Tcl_Mutex tclObjMutex; diff --git a/unix/Makefile.in b/unix/Makefile.in index 8585f93..e741ea7 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -844,11 +844,8 @@ regerror.o: $(REGHDRS) $(GENERIC_DIR)/regerrs.h $(GENERIC_DIR)/regerror.c tclAppInit.o: $(UNIX_DIR)/tclAppInit.c $(CC) -c $(APP_CC_SWITCHES) $(UNIX_DIR)/tclAppInit.c -# On unix we want to use the normal malloc/free implementation, so we -# specifically set the USE_TCLALLOC flag. - tclAlloc.o: $(GENERIC_DIR)/tclAlloc.c - $(CC) -c $(CC_SWITCHES) -DUSE_TCLALLOC=0 $(GENERIC_DIR)/tclAlloc.c + $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclAlloc.c tclAsync.o: $(GENERIC_DIR)/tclAsync.c $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclAsync.c -- cgit v0.12