summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-12-12 21:43:35 (GMT)
committernijtmans <nijtmans>2008-12-12 21:43:35 (GMT)
commit0e20b42f4918cc0b87663f858ce500d659b340e0 (patch)
tree58264c6897b8f144f465b481d9d7a3316bb92785
parent5e59751a50b0e27533ef93600fe6c7e84d6e25bf (diff)
downloadtcl-0e20b42f4918cc0b87663f858ce500d659b340e0.zip
tcl-0e20b42f4918cc0b87663f858ce500d659b340e0.tar.gz
tcl-0e20b42f4918cc0b87663f858ce500d659b340e0.tar.bz2
change PATH_MAX to MAXPATHLEN (msvc doesn't have PATH_MAX)
-rw-r--r--ChangeLog1
-rw-r--r--generic/tclZlib.c10
2 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 796d294..a322c94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
2008-12-12 Jan Nijtmans <nijtmans@users.sf.net>
+ * generic/tclZlib.c change PATH_MAX to MAXPATHLEN (msvc doesn't have PATH_MAX)
* doc/clock.n: Document new DST fallback rules.
* library/clock.tcl (ProcessPosixTimeZone): Fix time change
in Eastern Europe (not 3:00 but 4:00 local time) [Bug 2207436]
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index ab38696..75aea90 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclZlib.c,v 1.7 2008/12/12 16:18:09 dkf Exp $
+ * RCS: @(#) $Id: tclZlib.c,v 1.8 2008/12/12 21:43:35 nijtmans Exp $
*/
#include "tclInt.h"
@@ -1090,7 +1090,7 @@ Tcl_ZlibDeflate(
* byte of string that we add. Note that over-allocation is not a
* problem. [Bug 2419061]
*/
-
+
extraSize = 32;
if (gzipHeaderDictObj) {
headerPtr = &header;
@@ -1245,9 +1245,9 @@ Tcl_ZlibInflate(
if (gzipHeaderDictObj) {
headerPtr = &header;
memset(headerPtr, 0, sizeof(gz_header));
- nameBuf = ckalloc(PATH_MAX);
+ nameBuf = ckalloc(MAXPATHLEN);
header.name = (void *) nameBuf;
- header.name_max = PATH_MAX;
+ header.name_max = MAXPATHLEN;
commentBuf = ckalloc(256);
header.comment = (void *) commentBuf;
header.comm_max = 256;
@@ -1286,7 +1286,7 @@ Tcl_ZlibInflate(
goto error;
}
if (headerPtr) {
- inflateGetHeader(&stream, headerPtr);
+ e = inflateGetHeader(&stream, headerPtr);
if (e != Z_OK) {
goto error;
}