From 80ea46ae6771a0bad681f2229e78d8213c9201ca Mon Sep 17 00:00:00 2001 From: irox Date: Thu, 13 Sep 2001 18:27:52 +0000 Subject: [PATCH] * generic/tclStubInit.tcl: Export tclAlloc functions if __MINGW32__ is defined. * generic/tclAlloc.c: Revert changes from 2001-09-12. * generic/tcl.h: Use tclAlloc function if __WIN32__ is defined. * win/tclWinPort.h: Fixed typer __MWIN32 should read __WIN32__. --- tcl/ChangeLog | 10 ++++++++++ tcl/generic/tcl.h | 2 +- tcl/generic/tclAlloc.c | 4 ---- tcl/generic/tclStubInit.c | 6 +++--- tcl/win/tclWinPort.h | 2 +- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/tcl/ChangeLog b/tcl/ChangeLog index 09794d77d5..0ae29d4664 100644 --- a/tcl/ChangeLog +++ b/tcl/ChangeLog @@ -1,3 +1,13 @@ +2001-09-13 Ian Roxborough + + * generic/tclStubInit.tcl: Export tclAlloc functions + if __MINGW32__ is defined. + * generic/tclAlloc.c: Revert changes from 2001-09-12. + * generic/tcl.h: Use tclAlloc function if __WIN32__ + is defined. + * win/tclWinPort.h: Fixed typer __MWIN32 should read + __WIN32__. + 2001-09-12 Ian Roxborough * Makefile.in: Add 'cygwin' subdirectory to 'make all' diff --git a/tcl/generic/tcl.h b/tcl/generic/tcl.h index 6e404a4ce6..094f7d5022 100644 --- a/tcl/generic/tcl.h +++ b/tcl/generic/tcl.h @@ -94,7 +94,7 @@ extern "C" { * C run-time library issues. */ -# ifndef __CYGWIN__ +# if !defined(__CYGWIN__) || defined(__WIN32__) # ifndef USE_TCLALLOC # define USE_TCLALLOC 1 # endif diff --git a/tcl/generic/tclAlloc.c b/tcl/generic/tclAlloc.c index 1c55983ef1..44c4e94b2c 100644 --- a/tcl/generic/tclAlloc.c +++ b/tcl/generic/tclAlloc.c @@ -21,8 +21,6 @@ #include "tclInt.h" #include "tclPort.h" -#if !defined(__CYGWIN__) || defined(__TCL_UNIX_VARIANT) - #if USE_TCLALLOC #ifdef TCL_DEBUG @@ -726,5 +724,3 @@ TclpRealloc(cp, nbytes) #endif /* !USE_TCLALLOC */ -#endif /* !__CYGWIN__ OR __TCL_UNIX_VARIANT */ - diff --git a/tcl/generic/tclStubInit.c b/tcl/generic/tclStubInit.c index c689e4cf00..930d294e1d 100644 --- a/tcl/generic/tclStubInit.c +++ b/tcl/generic/tclStubInit.c @@ -128,14 +128,14 @@ TclIntStubs tclIntStubs = { TclOpenFileChannelDeleteProc, /* 66 */ TclOpenFileChannelInsertProc, /* 67 */ TclpAccess, /* 68 */ -#ifndef __CYGWIN__ +#if !defined(__CYGWIN__) || defined(__MINGW32__) TclpAlloc, /* 69 */ #endif TclpCopyFile, /* 70 */ TclpCopyDirectory, /* 71 */ TclpCreateDirectory, /* 72 */ TclpDeleteFile, /* 73 */ -#ifndef __CYGWIN__ +#if !defined(__CYGWIN__) || defined(__MINGW32__) TclpFree, /* 74 */ #endif TclpGetClicks, /* 75 */ @@ -144,7 +144,7 @@ TclIntStubs tclIntStubs = { TclpGetTimeZone, /* 78 */ TclpListVolumes, /* 79 */ TclpOpenFileChannel, /* 80 */ -#ifndef __CYGWIN__ +#if !defined(__CYGWIN__) || defined(__MINGW32__) TclpRealloc, /* 81 */ #endif TclpRemoveDirectory, /* 82 */ diff --git a/tcl/win/tclWinPort.h b/tcl/win/tclWinPort.h index 6b2c7842f3..e4a73a25b9 100644 --- a/tcl/win/tclWinPort.h +++ b/tcl/win/tclWinPort.h @@ -209,7 +209,7 @@ typedef float *TCHAR; /* On cygwin, we just use the supplied malloc and free, rather than using tclAlloc.c. The cygwin32 malloc is derived from the same sources as tclAlloc.c, anyhow. */ -#if defined(__CYGWIN__) && !defined(__MWIN32__) +#if defined(__CYGWIN__) && !defined(__WIN32__) #define TclpAlloc(size) malloc(size) #define TclpFree(ptr) free(ptr) #define TclpRealloc(ptr, size) realloc(ptr, size) -- 2.11.0