aboutsummaryrefslogtreecommitdiff
path: root/zconf.h
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2012-03-14 10:30:41 -0700
committerMark Adler <madler@alumni.caltech.edu>2012-03-14 10:30:41 -0700
commit50a1738fcb0e5d1e84275cfe3a052c5e32449b84 (patch)
tree85a53deff82c0748164c525735e44ce6279377f0 /zconf.h
parentb18595d4c6925e97ec2c0a9e49230c189ce8fe64 (diff)
downloadzlib-50a1738fcb0e5d1e84275cfe3a052c5e32449b84.tar.gz
zlib-50a1738fcb0e5d1e84275cfe3a052c5e32449b84.tar.bz2
zlib-50a1738fcb0e5d1e84275cfe3a052c5e32449b84.zip
Make sure that unistd.h is included before using _LFS64_LARGEFILE.
Diffstat (limited to 'zconf.h')
-rw-r--r--zconf.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/zconf.h b/zconf.h
index 5338de6..af35c38 100644
--- a/zconf.h
+++ b/zconf.h
@@ -409,6 +409,21 @@ typedef uLong FAR uLongf;
409# undef _LARGEFILE64_SOURCE 409# undef _LARGEFILE64_SOURCE
410#endif 410#endif
411 411
412#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
413# define Z_HAVE_UNISTD_H
414#endif
415#ifndef Z_SOLO
416# if defined(Z_HAVE_UNISTD_H) || defined(LARGEFILE64_SOURCE)
417# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
418# ifdef VMS
419# include <unixio.h> /* for off_t */
420# endif
421# ifndef z_off_t
422# define z_off_t off_t
423# endif
424# endif
425#endif
426
412#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 427#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
413# define Z_LFS64 428# define Z_LFS64
414#endif 429#endif
@@ -421,19 +436,6 @@ typedef uLong FAR uLongf;
421# define Z_WANT64 436# define Z_WANT64
422#endif 437#endif
423 438
424#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
425# define Z_HAVE_UNISTD_H
426#endif
427#if (defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE64)) && !defined(Z_SOLO)
428# include <unistd.h> /* for SEEK_* and off_t */
429# ifdef VMS
430# include <unixio.h> /* for off_t */
431# endif
432# ifndef z_off_t
433# define z_off_t off_t
434# endif
435#endif
436
437#if !defined(SEEK_SET) && !defined(Z_SOLO) 439#if !defined(SEEK_SET) && !defined(Z_SOLO)
438# define SEEK_SET 0 /* Seek from beginning of file. */ 440# define SEEK_SET 0 /* Seek from beginning of file. */
439# define SEEK_CUR 1 /* Seek from current position. */ 441# define SEEK_CUR 1 /* Seek from current position. */
@@ -444,7 +446,7 @@ typedef uLong FAR uLongf;
444# define z_off_t long 446# define z_off_t long
445#endif 447#endif
446 448
447#if !defined(_WIN32) && (defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0) 449#if !defined(_WIN32) && defined(Z_LARGE64)
448# define z_off64_t off64_t 450# define z_off64_t off64_t
449#else 451#else
450# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) 452# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)