summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-11 20:34:07 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-04-11 20:34:07 (GMT)
commite975dd1380b75e0736e5737ecf73efe9129361bc (patch)
tree020db13467ebfca10c4f307cd55644e9f167a694 /generic
parent8c9ff9ac6ac043b04ecfe5593ba048130c61bcbd (diff)
parent89c110fbb0e12918bbcb59f9d1a8c5503a5fa019 (diff)
downloadtcl-e975dd1380b75e0736e5737ecf73efe9129361bc.zip
tcl-e975dd1380b75e0736e5737ecf73efe9129361bc.tar.gz
tcl-e975dd1380b75e0736e5737ecf73efe9129361bc.tar.bz2
[Bug 3448512]: clock scan "1958-01-01" fails only in debug compilation
Diffstat (limited to 'generic')
-rw-r--r--generic/tclAlloc.c20
-rw-r--r--generic/tclBasic.c11
-rw-r--r--generic/tclPkgConfig.c4
3 files changed, 9 insertions, 26 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c
index 6fff92b..ae61e85 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
@@ -142,7 +136,7 @@ static int allocInit = 0;
static unsigned int numMallocs[NBUCKETS+1];
#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
@@ -299,7 +293,7 @@ TclpAlloc(
numMallocs[NBUCKETS]++;
#endif
-#ifdef RCHECK
+#ifndef NDEBUG
/*
* Record allocated size of block and bound space with magic numbers.
*/
@@ -357,7 +351,7 @@ TclpAlloc(
numMallocs[bucket]++;
#endif
-#ifdef RCHECK
+#ifndef NDEBUG
/*
* Record allocated size of block and bound space with magic numbers.
*/
@@ -577,7 +571,7 @@ TclpRealloc(
numMallocs[NBUCKETS]++;
#endif
-#ifdef RCHECK
+#ifndef NDEBUG
/*
* Record allocated size of block and update magic number bounds.
*/
@@ -619,7 +613,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
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 280290c..8905849 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -928,17 +928,6 @@ Tcl_CreateInterp(void)
TclPrecTraceProc, NULL);
TclpSetVariables(interp);
-#ifdef TCL_THREADS
- /*
- * The existence of the "threaded" element of the tcl_platform array
- * indicates that this particular Tcl shell has been compiled with threads
- * turned on. Using "info exists tcl_platform(threaded)" a Tcl script can
- * introspect on the interpreter level of thread safety.
- */
-
- Tcl_SetVar2(interp, "tcl_platform", "threaded", "1", TCL_GLOBAL_ONLY);
-#endif
-
/*
* Register Tcl's version number.
* TIP #268: Full patchlevel instead of just major.minor
diff --git a/generic/tclPkgConfig.c b/generic/tclPkgConfig.c
index 5907a03..466d535 100644
--- a/generic/tclPkgConfig.c
+++ b/generic/tclPkgConfig.c
@@ -22,7 +22,7 @@
* - TCL_COMPILE_STATS OSCMa bytecode compiler statistics.
*
* - TCL_CFG_DO64BIT NSCMdt tcl is compiled for a 64bit system.
- * - TCL_CFG_DEBUG NSCMdt tcl is compiled with symbol info on.
+ * - NDEBUG NSCMdt tcl is compiled with symbol info off.
* - TCL_CFG_OPTIMIZED NSCMdt tcl is compiled with cc optimizations on
* - TCL_CFG_PROFILED NSCMdt tcl is compiled with profiling info.
*
@@ -70,7 +70,7 @@
# define CFG_64 "0"
#endif
-#ifdef TCL_CFG_DEBUG
+#ifndef NDEBUG
# define CFG_DEBUG "1"
#else
# define CFG_DEBUG "0"