[Zlib-devel] zlib 1.2.4.1 beta

William A. Rowe Jr. wrowe at rowe-clan.net
Sun Mar 28 20:53:09 EDT 2010


On 3/28/2010 3:59 PM, Mark Adler wrote:
> On Mar 28, 2010, at 1:16 PM, Vincent Torri wrote:
> 
>> b) with mingw32ce (didn't try with mingw):
>>
>> minigzip.c: In function 'main':
>> minigzip.c:389: warning: implicit declaration of function 'setmode'
> 
> 
> In minigzip.c is this:
> 
> #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
> #  include <fcntl.h>
> #  include <io.h>
> #  define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
> #else
> #  define SET_BINARY_MODE(file)
> #endif

Is there any reason for this at all?  We begin the entire exercise with
fopen(file, "rb") / fopen(outfile, "wb") etc.  The underlying pseudo-fd
handle should similarly be 'binary', no?




More information about the Zlib-devel mailing list