Commit Graph

29 Commits

Author SHA1 Message Date
Mark Adler
25e4a3da55 Use _snprintf for snprinf in Microsoft C.
More than a decade later, Microsoft C does not support the C99
standard.  It's good that _snprintf has a different name, since it
does not guarantee that the result is null terminated, as does
snprintf.  However where _snprintf is used under Microsoft C, the
destination string is assured to be long enough, so this will not
be a problem.  This occurs in two places, both in gzlib.c.  Where
sprintf functionality is needed by gzprintf, vsnprintf is used in
the case of Microsoft C.
2012-06-03 12:45:55 -07:00
Mark Adler
a1af6e96e3 Fix gzopen_w() type and add #include for the type. 2012-03-17 21:45:01 -07:00
Mark Adler
dbe0bed739 Add gzopen_w() in Windows for wide character path names. 2012-03-16 20:53:09 -07:00
Mark Adler
dab7531ecc Simplify test and use of gcc hidden attribute. 2012-03-03 00:20:00 -08:00
Mark Adler
3f4339b61b Improve the detection of no hidden visibility attribute. 2012-02-19 23:33:10 -08:00
Mark Adler
e6d2a8471b Do not use the visibility attribute if NO_VIZ defined. 2012-02-19 22:45:10 -08:00
Mark Adler
a75d6ea070 Require gcc 4.0 or later on Mac OS X to use the hidden attribute. 2012-02-18 15:37:28 -08:00
Mark Adler
6838df9246 Test for existence of strerror.
SunOS 4.1 claims that it is __STDC__, but it does not have strerror
in string.h.  Instead of using __STDC__, this puts a direct test
for strerror in configure, and uses that information in gzguts.h.
2012-02-18 13:55:09 -08:00
Mark Adler
3fb727c34d Include io.h in gzguts.h for Microsoft compilers. 2012-01-29 21:15:24 -08:00
Mark Adler
e75de023b6 zlib 1.2.6 2012-01-29 10:13:15 -08:00
Mark Adler
b9a778a2b8 Include io.h for Turbo C / Borland C on all platforms [Truta]. 2012-01-18 19:33:02 -08:00
Mark Adler
98f5779f42 Fix gzeof() to behave just like feof() when read is not past end of file.
Before, gzeof() would return true (accurately) when the last read request
went just up to the end of the uncompressed data.  In the analogous case,
feof() would return false, only returning true when a read request goes
past the end of the file.  This patch corrects gzeof() to behave in the
same way as feof(), as noted in the zlib.h documentation.
2011-12-11 18:22:04 -08:00
Mark Adler
fb00fda903 Fix gzwrite.c to accommodate reduced memory zlib compilation.
gzwrite.c had hard-coded parameters to deflateInit2() which could
contradict compile-time options for the use of less memory and fewer
code bits.  This patch suggested by Karsten Saunte fixes that.
2011-12-10 22:33:17 -08:00
Mark Adler
0cbad869b0 Include io.h for Turbo C / Borland C++. 2011-11-21 18:38:37 -08:00
Mark Adler
15b5671b78 Facilitate compilation with Borland C++ for pragmas and vsnprintf. 2011-11-19 13:53:26 -08:00
Mark Adler
26a99cd895 Add a transparent write mode to gzopen() when 'T' is in the mode. 2011-10-02 13:34:29 -07:00
Mark Adler
00c836e325 Merge vestigial vsnprintf determination from zutil.h to gzguts.h.
This also moves some of the same from zconf.h to gzguts.h. A new
function, gzflags(), was created to pass the compilation flags
related to vsnprintf usage back to zlibCompileFlags() in zutil.c.
In the process, various compiler configuration files were updated
to include gzflags(), as well as the new gzgetc_() function added
when the gzgetc() macro was introduced in a previous patch.
2011-10-02 11:15:00 -07:00
Mark Adler
a4f7c65374 Update copyright dates on gz* source files. 2011-09-30 22:26:04 -07:00
Mark Adler
acfc85772a Change gzgetc() to a macro for speed (~40% speedup in testing). 2011-09-26 22:50:28 -07:00
Mark Adler
8e0d212910 Simplify gzseek() now that raw after gzip is ignored. 2011-09-26 18:34:07 -07:00
Mark Adler
7301420248 zlib 1.2.4.5 2011-09-09 23:34:55 -07:00
Mark Adler
f4498bea28 zlib 1.2.4.3 2011-09-09 23:34:38 -07:00
Mark Adler
7147f24cd7 zlib 1.2.4.2 2011-09-09 23:34:30 -07:00
Mark Adler
05d47d2627 zlib 1.2.4.1 2011-09-09 23:34:22 -07:00
Mark Adler
a1141160bc zlib 1.2.4 2011-09-09 23:33:59 -07:00
Mark Adler
e0ff940e1a zlib 1.2.3.8 2011-09-09 23:27:17 -07:00
Mark Adler
7df877eccd zlib 1.2.3.7 2011-09-09 23:27:08 -07:00
Mark Adler
dc5a43ebfa zlib 1.2.3.6 2011-09-09 23:26:58 -07:00
Mark Adler
d004b04783 zlib 1.2.3.5 2011-09-09 23:26:49 -07:00