diff options
| author | Mark Adler <madler@alumni.caltech.edu> | 2012-03-14 10:30:41 -0700 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2012-03-14 10:30:41 -0700 |
| commit | 50a1738fcb0e5d1e84275cfe3a052c5e32449b84 (patch) | |
| tree | 85a53deff82c0748164c525735e44ce6279377f0 | |
| parent | b18595d4c6925e97ec2c0a9e49230c189ce8fe64 (diff) | |
| download | zlib-50a1738fcb0e5d1e84275cfe3a052c5e32449b84.tar.gz zlib-50a1738fcb0e5d1e84275cfe3a052c5e32449b84.tar.bz2 zlib-50a1738fcb0e5d1e84275cfe3a052c5e32449b84.zip | |
Make sure that unistd.h is included before using _LFS64_LARGEFILE.
| -rw-r--r-- | zconf.h | 30 | ||||
| -rw-r--r-- | zconf.h.cmakein | 30 | ||||
| -rw-r--r-- | zconf.h.in | 30 |
3 files changed, 48 insertions, 42 deletions
| @@ -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) |
diff --git a/zconf.h.cmakein b/zconf.h.cmakein index c08d177..81a7b7a 100644 --- a/zconf.h.cmakein +++ b/zconf.h.cmakein | |||
| @@ -411,6 +411,21 @@ typedef uLong FAR uLongf; | |||
| 411 | # undef _LARGEFILE64_SOURCE | 411 | # undef _LARGEFILE64_SOURCE |
| 412 | #endif | 412 | #endif |
| 413 | 413 | ||
| 414 | #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) | ||
| 415 | # define Z_HAVE_UNISTD_H | ||
| 416 | #endif | ||
| 417 | #ifndef Z_SOLO | ||
| 418 | # if defined(Z_HAVE_UNISTD_H) || defined(LARGEFILE64_SOURCE) | ||
| 419 | # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ | ||
| 420 | # ifdef VMS | ||
| 421 | # include <unixio.h> /* for off_t */ | ||
| 422 | # endif | ||
| 423 | # ifndef z_off_t | ||
| 424 | # define z_off_t off_t | ||
| 425 | # endif | ||
| 426 | # endif | ||
| 427 | #endif | ||
| 428 | |||
| 414 | #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 | 429 | #if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 |
| 415 | # define Z_LFS64 | 430 | # define Z_LFS64 |
| 416 | #endif | 431 | #endif |
| @@ -423,19 +438,6 @@ typedef uLong FAR uLongf; | |||
| 423 | # define Z_WANT64 | 438 | # define Z_WANT64 |
| 424 | #endif | 439 | #endif |
| 425 | 440 | ||
| 426 | #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) | ||
| 427 | # define Z_HAVE_UNISTD_H | ||
| 428 | #endif | ||
| 429 | #if (defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE64)) && !defined(Z_SOLO) | ||
| 430 | # include <unistd.h> /* for SEEK_* and off_t */ | ||
| 431 | # ifdef VMS | ||
| 432 | # include <unixio.h> /* for off_t */ | ||
| 433 | # endif | ||
| 434 | # ifndef z_off_t | ||
| 435 | # define z_off_t off_t | ||
| 436 | # endif | ||
| 437 | #endif | ||
| 438 | |||
| 439 | #if !defined(SEEK_SET) && !defined(Z_SOLO) | 441 | #if !defined(SEEK_SET) && !defined(Z_SOLO) |
| 440 | # define SEEK_SET 0 /* Seek from beginning of file. */ | 442 | # define SEEK_SET 0 /* Seek from beginning of file. */ |
| 441 | # define SEEK_CUR 1 /* Seek from current position. */ | 443 | # define SEEK_CUR 1 /* Seek from current position. */ |
| @@ -446,7 +448,7 @@ typedef uLong FAR uLongf; | |||
| 446 | # define z_off_t long | 448 | # define z_off_t long |
| 447 | #endif | 449 | #endif |
| 448 | 450 | ||
| 449 | #if !defined(_WIN32) && (defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0) | 451 | #if !defined(_WIN32) && defined(Z_LARGE64) |
| 450 | # define z_off64_t off64_t | 452 | # define z_off64_t off64_t |
| 451 | #else | 453 | #else |
| 452 | # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) | 454 | # if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO) |
| @@ -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) |
