aboutsummaryrefslogtreecommitdiff
path: root/zconf.h.in
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2012-03-13 23:19:38 -0700
committerMark Adler <madler@alumni.caltech.edu>2012-03-13 23:19:38 -0700
commit8dc21b17a626f4b0fb99c017fcbdf3ac20b35b32 (patch)
tree79416d76723aed9a33652794767b725f17bc30b8 /zconf.h.in
parent9c08a822463664c204ff57a0a91abe727d7987c1 (diff)
downloadzlib-8dc21b17a626f4b0fb99c017fcbdf3ac20b35b32.tar.gz
zlib-8dc21b17a626f4b0fb99c017fcbdf3ac20b35b32.tar.bz2
zlib-8dc21b17a626f4b0fb99c017fcbdf3ac20b35b32.zip
Allow the use of -Wundef when compiling or using zlib.
Diffstat (limited to 'zconf.h.in')
-rw-r--r--zconf.h.in20
1 files changed, 14 insertions, 6 deletions
diff --git a/zconf.h.in b/zconf.h.in
index 57f25ad..0154955 100644
--- a/zconf.h.in
+++ b/zconf.h.in
@@ -399,24 +399,32 @@ typedef uLong FAR uLongf;
399# endif 399# endif
400#endif 400#endif
401 401
402/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and 402/* accommodate both "#define _LARGEFILE64_SOURCE" and
403 * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even 403 * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
404 * though the former does not conform to the LFS document), but considering 404 * though the former does not conform to the LFS document), but consider
405 * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as 405 * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
406 * equivalently requesting no 64-bit operations 406 * equivalently requesting no 64-bit operations
407 */ 407 */
408#if -_LARGEFILE64_SOURCE - -1 == 1 408#if defined(LARGEFILE64_SOURCE) && _LARGEFILE64_SOURCE == 0
409# undef _LARGEFILE64_SOURCE 409# undef _LARGEFILE64_SOURCE
410#endif 410#endif
411 411
412#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 412#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE == 1
413# define Z_LARGE 413# define Z_LFS64
414#endif
415
416#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
417# define Z_LARGE64
418#endif
419
420#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined(Z_LFS64)
421# define Z_WANT64
414#endif 422#endif
415 423
416#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) 424#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
417# define Z_HAVE_UNISTD_H 425# define Z_HAVE_UNISTD_H
418#endif 426#endif
419#if (defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE)) && !defined(Z_SOLO) 427#if (defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE64)) && !defined(Z_SOLO)
420# include <unistd.h> /* for SEEK_* and off_t */ 428# include <unistd.h> /* for SEEK_* and off_t */
421# ifdef VMS 429# ifdef VMS
422# include <unixio.h> /* for off_t */ 430# include <unixio.h> /* for off_t */