[Zlib-devel] setmode vs. _setmode

Mark Adler madler at alumni.caltech.edu
Sun Mar 28 17:50:58 EDT 2010


I plan to update minigzip.c with this (and it will also go in examples/zpipe.c):

#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
#  include <fcntl.h>
#  include <io.h>
#  if something
#    define SET_BINARY_MODE(file) _setmode(_fileno(file), _O_BINARY)
#  else
#    define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
#  endif
#else
#  define SET_BINARY_MODE(file)
#endif

All I need is what to replace "something" with.

Mark





More information about the Zlib-devel mailing list