diff options
author | davygrvy <davygrvy@pobox.com> | 2002-08-28 22:48:10 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@pobox.com> | 2002-08-28 22:48:10 (GMT) |
commit | 278f7c88ca3a17fed8af94c6ec45b4f5dda49861 (patch) | |
tree | 9276aaf344a0938ea3d864552a3843ba199c4540 /win | |
parent | 3932d4560e1130460563ce7f09cbdc6e8e5fe204 (diff) | |
download | tcl-278f7c88ca3a17fed8af94c6ec45b4f5dda49861.zip tcl-278f7c88ca3a17fed8af94c6ec45b4f5dda49861.tar.gz tcl-278f7c88ca3a17fed8af94c6ec45b4f5dda49861.tar.bz2 |
* generic/tclEnv.c:
* unix/configure.in:
* win/tclWinPort.h: putenv() on some systems copies the buffer
rather than taking reference to it. This causes memory leaks
and is know to effect mswindows (msvcrt) and NetBSD 1.5.2 . This
patch tests for this behavior and turns on -DHAVE_PUTENV_THAT_COPIES=1
when approriate. Thanks to David Welton for assistance.
[Bug 414910]
* unix/configure: regen'd
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWinPort.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 845c217..a616f22 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.32 2002/08/01 13:05:31 rmax Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.33 2002/08/28 22:48:48 davygrvy Exp $ */ #ifndef _TCLWINPORT @@ -421,6 +421,14 @@ #define USE_PUTENV 1 /* + * Msvcrt's putenv() copies the string rather than takes ownership of it. + */ + +#if defined(_MSC_VER) || defined(__MINGW32__) +# define HAVE_PUTENV_THAT_COPIES 1 +#endif + +/* * The following defines wrap the system memory allocation routines for * use by tclAlloc.c. */ |