diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-04-11 19:50:35 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-04-11 19:50:35 (GMT) |
commit | 89c110fbb0e12918bbcb59f9d1a8c5503a5fa019 (patch) | |
tree | a46fc6a0815d0b37139d0ca94a595e95c2d0dfdc /generic/tclAlloc.c | |
parent | 32dda4af9bc7d9e23f8dc6722d26609e4714a470 (diff) | |
parent | f05db2499a1f26791588140d9c283f7ee8e7c23a (diff) | |
download | tcl-89c110fbb0e12918bbcb59f9d1a8c5503a5fa019.zip tcl-89c110fbb0e12918bbcb59f9d1a8c5503a5fa019.tar.gz tcl-89c110fbb0e12918bbcb59f9d1a8c5503a5fa019.tar.bz2 |
[Bug 3448512]: clock scan "1958-01-01" fails only in debug compilation
Diffstat (limited to 'generic/tclAlloc.c')
-rw-r--r-- | generic/tclAlloc.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index 7647b4d..8d0a2cc 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -26,12 +26,6 @@ #if USE_TCLALLOC -#ifdef TCL_DEBUG -# define DEBUG -/* #define MSTATS */ -# define RCHECK -#endif - /* * We should really make use of AC_CHECK_TYPE(caddr_t) here, but it can wait * until Tcl uses config.h properly. @@ -60,7 +54,7 @@ union overhead { unsigned char index; /* bucket # */ unsigned char unused; /* unused */ unsigned char magic1; /* other magic number */ -#ifdef RCHECK +#ifndef NDEBUG unsigned short rmagic; /* range magic number */ unsigned long size; /* actual block size */ unsigned short unused2; /* padding to 8-byte align */ @@ -77,7 +71,7 @@ union overhead { #define MAGIC 0xef /* magic # on accounting info */ #define RMAGIC 0x5555 /* magic # on range info */ -#ifdef RCHECK +#ifndef NDEBUG #define RSLOP sizeof (unsigned short) #else #define RSLOP 0 @@ -143,7 +137,7 @@ static unsigned int numMallocs[NBUCKETS+1]; #include <stdio.h> #endif -#if defined(DEBUG) || defined(RCHECK) +#if !defined(NDEBUG) #define ASSERT(p) if (!(p)) Tcl_Panic(# p) #define RANGE_ASSERT(p) if (!(p)) Tcl_Panic(# p) #else @@ -300,7 +294,7 @@ TclpAlloc( numMallocs[NBUCKETS]++; #endif -#ifdef RCHECK +#ifndef NDEBUG /* * Record allocated size of block and bound space with magic numbers. */ @@ -358,7 +352,7 @@ TclpAlloc( numMallocs[bucket]++; #endif -#ifdef RCHECK +#ifndef NDEBUG /* * Record allocated size of block and bound space with magic numbers. */ @@ -578,7 +572,7 @@ TclpRealloc( numMallocs[NBUCKETS]++; #endif -#ifdef RCHECK +#ifndef NDEBUG /* * Record allocated size of block and update magic number bounds. */ @@ -620,7 +614,7 @@ TclpRealloc( * Ok, we don't have to copy, it fits as-is */ -#ifdef RCHECK +#ifndef NDEBUG overPtr->realBlockSize = (numBytes + RSLOP - 1) & ~(RSLOP - 1); BLOCK_END(overPtr) = RMAGIC; #endif |