diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2012-03-13 23:19:38 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2012-03-13 23:19:38 -0700 |
commit | 8dc21b17a626f4b0fb99c017fcbdf3ac20b35b32 (patch) | |
tree | 79416d76723aed9a33652794767b725f17bc30b8 /zconf.h.cmakein | |
parent | 9c08a822463664c204ff57a0a91abe727d7987c1 (diff) | |
download | zlib-8dc21b17a626f4b0fb99c017fcbdf3ac20b35b32.tar.gz |
Allow the use of -Wundef when compiling or using zlib.
Diffstat (limited to 'zconf.h.cmakein')
-rw-r--r-- | zconf.h.cmakein | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/zconf.h.cmakein b/zconf.h.cmakein index dd2d28a..af4e92e 100644 --- a/zconf.h.cmakein +++ b/zconf.h.cmakein @@ -401,24 +401,32 @@ typedef uLong FAR uLongf; # endif #endif -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and +/* accommodate both "#define _LARGEFILE64_SOURCE" and * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering + * though the former does not conform to the LFS document), but consider * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as * equivalently requesting no 64-bit operations */ -#if -_LARGEFILE64_SOURCE - -1 == 1 +#if defined(LARGEFILE64_SOURCE) && _LARGEFILE64_SOURCE == 0 # undef _LARGEFILE64_SOURCE #endif -#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 -# define Z_LARGE +#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE == 1 +# define Z_LFS64 +#endif + +#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) +# define Z_LARGE64 +#endif + +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined(Z_LFS64) +# define Z_WANT64 #endif #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) # define Z_HAVE_UNISTD_H #endif -#if (defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE)) && !defined(Z_SOLO) +#if (defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE64)) && !defined(Z_SOLO) # include <unistd.h> /* for SEEK_* and off_t */ # ifdef VMS # include <unixio.h> /* for off_t */ |