[Zlib-devel] [PATCH] Avoid inclusion of unistd.h in all source files
Mark Adler
madler at alumni.caltech.edu
Sun Mar 28 01:00:03 EDT 2010
On Mar 18, 2010, at 2:34 PM, Xin LI wrote:
> It seems that zconf.h would include unistd.h if HAVE_UNISTD_H is set.
> However, only the gzlib.c, gzread.c and gzwrite.c really needs that
> (gzlib.c needs SEEK_* while the others needs standard Unix system
> calls).
The users of gzseek() need SEEK_*, so those need to be defined somehow by the inclusion of zlib.h/zconf.h. For systems with unistd.h, that is best done by including unistd.h.
Mark
More information about the Zlib-devel
mailing list