From bdf4ab31796aad0cbfc4b0f02a8e84a23229ad2d Mon Sep 17 00:00:00 2001 From: hobbs Date: Fri, 21 Apr 2000 04:04:12 +0000 Subject: * generic/tclAlloc.c: wrapped caddr_t define to not be done on Unix * unix/tclUnixPort.h: added Tclp*Alloc defines to allow the use of USE_TCLALLOC on Unix. [Bug: 4731] --- ChangeLog | 8 +++++++- generic/tclAlloc.c | 7 ++++++- unix/tclUnixPort.h | 13 ++++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 62233eb..990668e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-04-20 Jeff Hobbs + + * generic/tclAlloc.c: wrapped caddr_t define to not be done on Unix + * unix/tclUnixPort.h: added Tclp*Alloc defines to allow the use of + USE_TCLALLOC on Unix. [Bug: 4731] + 2000-04-19 Jeff Hobbs * library/dde1.1/pkgIndex.tcl: @@ -6,7 +12,7 @@ * win/tclWinThrd.c: converted CRLF to LF the */tcl.hpj.in files were not converted, as it confuses hcw locally. [Bug: 5096] - * win/Makefile.in: expanded cleanup or help files + * win/Makefile.in: expanded cleanup target for help files * doc/Thread.3: minor macro cleanup diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index 0b9bace..cbeadda 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAlloc.c,v 1.8 1999/08/10 17:35:18 redman Exp $ + * RCS: @(#) $Id: tclAlloc.c,v 1.9 2000/04/21 04:04:12 hobbs Exp $ */ #include "tclInt.h" @@ -29,7 +29,12 @@ # define RCHECK #endif +/* + * On Unix this will already be defined + */ +#if defined(WIN32) || defined(MAC_TCL) typedef unsigned long caddr_t; +#endif /* * The overhead on a block is at least 8 bytes. When free, this space diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index fa6333a..cb3c777 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -19,7 +19,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPort.h,v 1.14 2000/04/19 08:32:46 hobbs Exp $ + * RCS: @(#) $Id: tclUnixPort.h,v 1.15 2000/04/21 04:04:12 hobbs Exp $ */ #ifndef _TCLUNIXPORT @@ -462,6 +462,17 @@ extern double strtod(); #define TclpReleaseFile(file) /* Nothing. */ /* + * The following defines wrap the system memory allocation routines for + * use by tclAlloc.c. By default off unused on Unix. + */ + +#if USE_TCLALLOC +# define TclpSysAlloc(size, isBin) malloc((size_t)size) +# define TclpSysFree(ptr) free((char*)ptr) +# define TclpSysRealloc(ptr, size) realloc((char*)ptr, (size_t)size) +#endif + +/* * The following macros and declaration wrap the C runtime library * functions. */ -- cgit v0.12