summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclAlloc.c20
-rwxr-xr-xgeneric/tclEnv.c4
-rw-r--r--generic/tclIOUtil.c20
-rw-r--r--generic/tclStubInit.c2
4 files changed, 8 insertions, 38 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c
index 5022618..7b9c807 100644
--- a/generic/tclAlloc.c
+++ b/generic/tclAlloc.c
@@ -28,12 +28,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.
@@ -71,7 +65,7 @@ union overhead {
unsigned char ovu_index; /* bucket # */
unsigned char ovu_unused; /* unused */
unsigned char ovu_magic1; /* other magic number */
-#ifdef RCHECK
+#ifndef NDEBUG
unsigned short ovu_rmagic; /* range magic number */
unsigned long ovu_size; /* actual block size */
unsigned short ovu_unused2; /* padding to 8-byte align */
@@ -88,7 +82,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
@@ -148,7 +142,7 @@ static unsigned int nmalloc[NBUCKETS+1];
#include <stdio.h>
#endif
-#if defined(DEBUG) || defined(RCHECK)
+#if !defined(NDEBUG)
#define ASSERT(p) if (!(p)) panic(# p)
#define RANGE_ASSERT(p) if (!(p)) panic(# p)
#else
@@ -304,7 +298,7 @@ TclpAlloc(nbytes)
#ifdef MSTATS
nmalloc[NBUCKETS]++;
#endif
-#ifdef RCHECK
+#ifndef NDEBUG
/*
* Record allocated size of block and
* bound space with magic numbers.
@@ -355,7 +349,7 @@ TclpAlloc(nbytes)
#ifdef MSTATS
nmalloc[bucket]++;
#endif
-#ifdef RCHECK
+#ifndef NDEBUG
/*
* Record allocated size of block and
* bound space with magic numbers.
@@ -567,7 +561,7 @@ TclpRealloc(cp, nbytes)
#ifdef MSTATS
nmalloc[NBUCKETS]++;
#endif
-#ifdef RCHECK
+#ifndef NDEBUG
/*
* Record allocated size of block and update magic number bounds.
*/
@@ -606,7 +600,7 @@ TclpRealloc(cp, nbytes)
/*
* Ok, we don't have to copy, it fits as-is
*/
-#ifdef RCHECK
+#ifndef NDEBUG
op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1);
*(unsigned short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
#endif
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index deb5dcd..7108436 100755
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.c
@@ -48,10 +48,6 @@ static void ReplaceString _ANSI_ARGS_((CONST char *oldStr,
void TclSetEnv _ANSI_ARGS_((CONST char *name,
CONST char *value));
void TclUnsetEnv _ANSI_ARGS_((CONST char *name));
-
-#if defined (__CYGWIN__) && defined(__WIN32__)
-static void TclCygwinPutenv _ANSI_ARGS_((CONST char *string));
-#endif
/*
*----------------------------------------------------------------------
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index da0eb46..1dfd4ba 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -6290,26 +6290,6 @@ SetFsPathFromAny(interp, objPtr)
transPtr = Tcl_FSJoinToPath(objPtr,0,NULL);
}
-#if defined(__CYGWIN__) && defined(__WIN32__)
- {
- extern int cygwin_conv_to_win32_path
- _ANSI_ARGS_((CONST char *, char *));
- char winbuf[MAX_PATH+1];
-
- /*
- * In the Cygwin world, call conv_to_win32_path in order to use the
- * mount table to translate the file name into something Windows will
- * understand. Take care when converting empty strings!
- */
- name = Tcl_GetStringFromObj(transPtr, &len);
- if (len > 0) {
- cygwin_conv_to_win32_path(name, winbuf);
- TclWinNoBackslash(winbuf);
- Tcl_SetStringObj(transPtr, winbuf, -1);
- }
- }
-#endif /* __CYGWIN__ && __WIN32__ */
-
/*
* Now we have a translated filename in 'transPtr'. This will have
* forward slashes on Windows, and will not contain any ~user
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c
index 7d24d69..ce3b952 100644
--- a/generic/tclStubInit.c
+++ b/generic/tclStubInit.c
@@ -32,6 +32,7 @@
#undef Tcl_FindHashEntry
#undef Tcl_CreateHashEntry
#undef TclpGetPid
+#undef TclSockMinimumBuffers
/*
* Keep a record of the original Notifier procedures, created in the
@@ -60,7 +61,6 @@ Tcl_NotifierProcs tclOriginalNotifier = {
#ifdef _WIN64
# define TclSockMinimumBuffersOld 0
#else
-#undef TclSockMinimumBuffers
int TclSockMinimumBuffersOld(sock, size)
int sock;
int size;