From 0e20b42f4918cc0b87663f858ce500d659b340e0 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 12 Dec 2008 21:43:35 +0000 Subject: change PATH_MAX to MAXPATHLEN (msvc doesn't have PATH_MAX) --- ChangeLog | 1 + generic/tclZlib.c | 10 +++++----- 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 + * 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; } -- cgit v0.12