[Zlib-devel] zlib 1.2.4 released!
John Bowler
jbowler at frontiernet.net
Wed Mar 17 18:31:14 EDT 2010
From: William A. Rowe Jr. [mailto:wrowe at rowe-clan.net]
>On 3/17/2010 11:18 AM, John Bowler wrote:
>> Zlib does *not* do this, so it's ok.
>
>As noted, gzdopen() does violate this. We should be alert for others and
>summarize them all.
gzdopen doesn't violate the constraint. It takes a 'file descriptor' (defined by POSIX) that (in 1.2.4) must be a valid argument to the POSIX low level read/write/seek IO functions and must be per-process unique. This is not allocated memory to be freed by the DLL and it is not a "CRT object" (because of the practical implications of the POSIX restrictions). Therefore gzdopen does not violate the restrictions (unless the C runtime implementation of open() is not consistent with the POSIX requirements.)
Looking at the changes from 1.2.3 it does, in fact, seem that the GZ stuff was rewritten to remove the dependency on stdio. Indeed, there are no references to the stdio type (FILE) in library code apart from an unnecessary definition of 'fdopen' in gzguts.h (fdopen is no longer used.)
John Bowler <jbowler at acm.org>
More information about the Zlib-devel
mailing list