[Zlib-devel] zlib 1.2.4 released!
John Bowler
jbowler at frontiernet.net
Wed Mar 17 15:27:30 EDT 2010
From: John Bowler [mailto:jbowler at frontiernet.net]
>sprintf(path, "<fd:%d>", fd);
>gz = gz_open(path, fd, mode);
Sorry, I misread that code (the informative 'for debugging' comment on the sprintf in 1.2.3 has been removed in 1.2.4).
The semantics of 'fd' have changed in a subtle way:
1.2.3: 'fd' must be a valid argument to the CRT API 'fdopen', which is a POSIX function deprecated from Visual C 2005. 1003.1 says that 'fd' is a 'file descriptor', which is defined as a 'per process unique, non-negative integer ...'. That means it cannot be a C Runtime object on Windows, because a C Runtime object is not 'per process' (as we have been discussing), it's per runtime.
1.2.4: 'fd' is passed directly to POSIX low level IO (read()/write()) functions and stdio is not used.
So in 1.2.4 details of how the CRT handles stdio are moot.
John Bowler <jbowler at acm.org>
More information about the Zlib-devel
mailing list