diff options
| author | Mark Adler <fork@madler.net> | 2022-10-09 17:32:50 -0700 |
|---|---|---|
| committer | Mark Adler <fork@madler.net> | 2022-10-09 17:32:50 -0700 |
| commit | 19f8551627d2a89b910d961fc9c7f626f3af7b21 (patch) | |
| tree | 6f81735aa5590d921c3534a62cfc83e061913f21 | |
| parent | 013c0ca0f4a0601c21705405d6493129444ce64c (diff) | |
| download | zlib-19f8551627d2a89b910d961fc9c7f626f3af7b21.tar.gz zlib-19f8551627d2a89b910d961fc9c7f626f3af7b21.tar.bz2 zlib-19f8551627d2a89b910d961fc9c7f626f3af7b21.zip | |
Don't try to include unistd.h on Windows with LLVM.
| -rw-r--r-- | zconf.h | 13 | ||||
| -rw-r--r-- | zconf.h.cmakein | 13 | ||||
| -rw-r--r-- | zconf.h.in | 13 |
3 files changed, 30 insertions, 9 deletions
| @@ -473,11 +473,18 @@ typedef uLong FAR uLongf; | |||
| 473 | # undef _LARGEFILE64_SOURCE | 473 | # undef _LARGEFILE64_SOURCE |
| 474 | #endif | 474 | #endif |
| 475 | 475 | ||
| 476 | #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) | 476 | #ifndef Z_HAVE_UNISTD_H |
| 477 | # define Z_HAVE_UNISTD_H | 477 | # ifdef __WATCOMC__ |
| 478 | # define Z_HAVE_UNISTD_H | ||
| 479 | # endif | ||
| 480 | #endif | ||
| 481 | #ifndef Z_HAVE_UNISTD_H | ||
| 482 | # if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32) | ||
| 483 | # define Z_HAVE_UNISTD_H | ||
| 484 | # endif | ||
| 478 | #endif | 485 | #endif |
| 479 | #ifndef Z_SOLO | 486 | #ifndef Z_SOLO |
| 480 | # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) | 487 | # if defined(Z_HAVE_UNISTD_H) |
| 481 | # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ | 488 | # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ |
| 482 | # ifdef VMS | 489 | # ifdef VMS |
| 483 | # include <unixio.h> /* for off_t */ | 490 | # include <unixio.h> /* for off_t */ |
diff --git a/zconf.h.cmakein b/zconf.h.cmakein index 8e4b5bd..247ba24 100644 --- a/zconf.h.cmakein +++ b/zconf.h.cmakein | |||
| @@ -475,11 +475,18 @@ typedef uLong FAR uLongf; | |||
| 475 | # undef _LARGEFILE64_SOURCE | 475 | # undef _LARGEFILE64_SOURCE |
| 476 | #endif | 476 | #endif |
| 477 | 477 | ||
| 478 | #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) | 478 | #ifndef Z_HAVE_UNISTD_H |
| 479 | # define Z_HAVE_UNISTD_H | 479 | # ifdef __WATCOMC__ |
| 480 | # define Z_HAVE_UNISTD_H | ||
| 481 | # endif | ||
| 482 | #endif | ||
| 483 | #ifndef Z_HAVE_UNISTD_H | ||
| 484 | # if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32) | ||
| 485 | # define Z_HAVE_UNISTD_H | ||
| 486 | # endif | ||
| 480 | #endif | 487 | #endif |
| 481 | #ifndef Z_SOLO | 488 | #ifndef Z_SOLO |
| 482 | # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) | 489 | # if defined(Z_HAVE_UNISTD_H) |
| 483 | # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ | 490 | # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ |
| 484 | # ifdef VMS | 491 | # ifdef VMS |
| 485 | # include <unixio.h> /* for off_t */ | 492 | # include <unixio.h> /* for off_t */ |
| @@ -473,11 +473,18 @@ typedef uLong FAR uLongf; | |||
| 473 | # undef _LARGEFILE64_SOURCE | 473 | # undef _LARGEFILE64_SOURCE |
| 474 | #endif | 474 | #endif |
| 475 | 475 | ||
| 476 | #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) | 476 | #ifndef Z_HAVE_UNISTD_H |
| 477 | # define Z_HAVE_UNISTD_H | 477 | # ifdef __WATCOMC__ |
| 478 | # define Z_HAVE_UNISTD_H | ||
| 479 | # endif | ||
| 480 | #endif | ||
| 481 | #ifndef Z_HAVE_UNISTD_H | ||
| 482 | # if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32) | ||
| 483 | # define Z_HAVE_UNISTD_H | ||
| 484 | # endif | ||
| 478 | #endif | 485 | #endif |
| 479 | #ifndef Z_SOLO | 486 | #ifndef Z_SOLO |
| 480 | # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) | 487 | # if defined(Z_HAVE_UNISTD_H) |
| 481 | # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ | 488 | # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ |
| 482 | # ifdef VMS | 489 | # ifdef VMS |
| 483 | # include <unixio.h> /* for off_t */ | 490 | # include <unixio.h> /* for off_t */ |
