|
| 1 | +From 7108497fda9d4536a1afade7f42266e06dca4488 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Mark Adler < [email protected]> |
| 3 | +Date: Thu, 13 Feb 2025 22:44:48 -0800 |
| 4 | +Subject: [PATCH] Check that HAVE_UNISTD_H and HAVE_STDARG_H are not defined as |
| 5 | + 0. |
| 6 | + |
| 7 | +--- |
| 8 | + configure | 4 ++-- |
| 9 | + zconf.h | 4 ++-- |
| 10 | + zconf.h.in | 4 ++-- |
| 11 | + 3 files changed, 6 insertions(+), 6 deletions(-) |
| 12 | + |
| 13 | +diff --git a/configure b/configure |
| 14 | +index 393c23c94..1834659fd 100755 |
| 15 | +--- a/configure |
| 16 | ++++ b/configure |
| 17 | +@@ -611,7 +611,7 @@ cat > $test.c <<EOF |
| 18 | + int main() { return 0; } |
| 19 | + EOF |
| 20 | + if try $CC -c $CFLAGS $test.c; then |
| 21 | +- sed < zconf.h "/^#ifdef HAVE_UNISTD_H.* may be/s/def HAVE_UNISTD_H\(.*\) may be/ 1\1 was/" > zconf.temp.h |
| 22 | ++ sed < zconf.h "/^#if HAVE_UNISTD_H-0.* may be/s/ HAVE_UNISTD_H-0\(.*\) may be/ 1\1 was/" > zconf.temp.h |
| 23 | + mv zconf.temp.h zconf.h |
| 24 | + echo "Checking for unistd.h... Yes." | tee -a configure.log |
| 25 | + else |
| 26 | +@@ -626,7 +626,7 @@ cat > $test.c <<EOF |
| 27 | + int main() { return 0; } |
| 28 | + EOF |
| 29 | + if try $CC -c $CFLAGS $test.c; then |
| 30 | +- sed < zconf.h "/^#ifdef HAVE_STDARG_H.* may be/s/def HAVE_STDARG_H\(.*\) may be/ 1\1 was/" > zconf.temp.h |
| 31 | ++ sed < zconf.h "/^#if HAVE_STDARG_H-0.* may be/s/ HAVE_STDARG_H-0\(.*\) may be/ 1\1 was/" > zconf.temp.h |
| 32 | + mv zconf.temp.h zconf.h |
| 33 | + echo "Checking for stdarg.h... Yes." | tee -a configure.log |
| 34 | + else |
| 35 | +diff --git a/zconf.h b/zconf.h |
| 36 | +index d6c159a1e..bc3ef079b 100644 |
| 37 | +--- a/zconf.h |
| 38 | ++++ b/zconf.h |
| 39 | +@@ -436,11 +436,11 @@ typedef uLong FAR uLongf; |
| 40 | + typedef unsigned long z_crc_t; |
| 41 | + #endif |
| 42 | + |
| 43 | +-#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ |
| 44 | ++#if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ |
| 45 | + # define Z_HAVE_UNISTD_H |
| 46 | + #endif |
| 47 | + |
| 48 | +-#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ |
| 49 | ++#if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ |
| 50 | + # define Z_HAVE_STDARG_H |
| 51 | + #endif |
| 52 | + |
| 53 | +diff --git a/zconf.h.in b/zconf.h.in |
| 54 | +index d6c159a1e..bc3ef079b 100644 |
| 55 | +--- a/zconf.h.in |
| 56 | ++++ b/zconf.h.in |
| 57 | +@@ -436,11 +436,11 @@ typedef uLong FAR uLongf; |
| 58 | + typedef unsigned long z_crc_t; |
| 59 | + #endif |
| 60 | + |
| 61 | +-#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ |
| 62 | ++#if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ |
| 63 | + # define Z_HAVE_UNISTD_H |
| 64 | + #endif |
| 65 | + |
| 66 | +-#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ |
| 67 | ++#if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ |
| 68 | + # define Z_HAVE_STDARG_H |
| 69 | + #endif |
| 70 | + |
0 commit comments