From: Andreas Metzler Date: Sat, 24 Aug 2024 10:58:15 +0000 (+0200) Subject: Use HAVE_ZLIB for both automake and autoconf X-Git-Tag: 3.8.8~12^2~5 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=18ba7ace96fbd025b6e4c514b0d465c45501ed96;p=thirdparty%2Fgnutls.git Use HAVE_ZLIB for both automake and autoconf Do not mix HAVE_LIBZ and HAVE_ZLIB Signed-off-by: Andreas Metzler --- diff --git a/configure.ac b/configure.ac index 68d7adb0c8..2413b079c8 100644 --- a/configure.ac +++ b/configure.ac @@ -1125,7 +1125,7 @@ AS_IF([test x$ac_zlib != xno], ])]) if test x$ac_zlib != xno; then - AC_DEFINE([HAVE_LIBZ], 1, [Define if ZLIB compression is enabled.]) + AC_DEFINE([HAVE_ZLIB], 1, [Define if ZLIB compression is enabled.]) need_ltlibdl=yes fi AM_CONDITIONAL(HAVE_ZLIB, test "$ac_zlib" != "no") diff --git a/lib/compress.c b/lib/compress.c index 936a459532..a6d91e6d10 100644 --- a/lib/compress.c +++ b/lib/compress.c @@ -48,7 +48,7 @@ #define ZSTD_LIBRARY_SONAME "none" #endif -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB #include "dlwrap/zlib.h" #endif @@ -61,7 +61,7 @@ #include "dlwrap/zstd.h" #endif -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB static void zlib_deinit(void) { gnutls_zlib_unload_library(); @@ -74,7 +74,7 @@ static int zlib_init(void) return gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR); return 0; } -#endif /* HAVE_LIBZ */ +#endif /* HAVE_ZLIB */ #ifdef HAVE_LIBBROTLI @@ -122,7 +122,7 @@ typedef struct { static comp_entry comp_algs[] = { { GNUTLS_COMP_NULL, "NULL", NULL, NULL }, -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB { GNUTLS_COMP_ZLIB, "ZLIB", zlib_init, zlib_deinit }, #endif #ifdef HAVE_LIBBROTLI @@ -135,7 +135,7 @@ static comp_entry comp_algs[] = { }; static const gnutls_compression_method_t alg_list[] = { GNUTLS_COMP_NULL, -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB GNUTLS_COMP_ZLIB, #endif #ifdef HAVE_LIBBROTLI @@ -236,7 +236,7 @@ const gnutls_compression_method_t *gnutls_compression_list(void) size_t _gnutls_compress_bound(gnutls_compression_method_t alg, size_t src_len) { switch (alg) { -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB case GNUTLS_COMP_ZLIB: return GNUTLS_ZLIB_FUNC(compressBound)(src_len); #endif @@ -261,7 +261,7 @@ int _gnutls_compress(gnutls_compression_method_t alg, uint8_t *dst, int ret = GNUTLS_E_COMPRESSION_FAILED; switch (alg) { -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB case GNUTLS_COMP_ZLIB: { int err; uLongf comp_len = dst_len; @@ -314,7 +314,7 @@ int _gnutls_decompress(gnutls_compression_method_t alg, uint8_t *dst, int ret = GNUTLS_E_DECOMPRESSION_FAILED; switch (alg) { -#ifdef HAVE_LIBZ +#ifdef HAVE_ZLIB case GNUTLS_COMP_ZLIB: { int err; uLongf plain_len = dst_len; diff --git a/tests/tls13/compress-cert-cli.c b/tests/tls13/compress-cert-cli.c index cc7065c7dd..ada7d3abac 100644 --- a/tests/tls13/compress-cert-cli.c +++ b/tests/tls13/compress-cert-cli.c @@ -26,7 +26,7 @@ #include #include -#if defined(_WIN32) || !defined(HAVE_LIBZ) || !defined(HAVE_LIBBROTLI) || \ +#if defined(_WIN32) || !defined(HAVE_ZLIB) || !defined(HAVE_LIBBROTLI) || \ !defined(HAVE_LIBZSTD) int main(int argc, char **argv) diff --git a/tests/tls13/compress-cert-neg.c b/tests/tls13/compress-cert-neg.c index 56c53d5cd4..02e7775dda 100644 --- a/tests/tls13/compress-cert-neg.c +++ b/tests/tls13/compress-cert-neg.c @@ -26,7 +26,7 @@ #include #include -#if defined(_WIN32) || !defined(HAVE_LIBZ) || !defined(HAVE_LIBBROTLI) || \ +#if defined(_WIN32) || !defined(HAVE_ZLIB) || !defined(HAVE_LIBBROTLI) || \ !defined(HAVE_LIBZSTD) int main(int argc, char **argv) diff --git a/tests/tls13/compress-cert-neg2.c b/tests/tls13/compress-cert-neg2.c index 2d8bf07003..04191c35d0 100644 --- a/tests/tls13/compress-cert-neg2.c +++ b/tests/tls13/compress-cert-neg2.c @@ -26,7 +26,7 @@ #include #include -#if defined(_WIN32) || !defined(HAVE_LIBZ) +#if defined(_WIN32) || !defined(HAVE_ZLIB) int main(int argc, char **argv) { diff --git a/tests/tls13/compress-cert.c b/tests/tls13/compress-cert.c index c578dceeda..17564c145b 100644 --- a/tests/tls13/compress-cert.c +++ b/tests/tls13/compress-cert.c @@ -26,7 +26,7 @@ #include #include -#if defined(_WIN32) || !defined(HAVE_LIBZ) || !defined(HAVE_LIBBROTLI) || \ +#if defined(_WIN32) || !defined(HAVE_ZLIB) || !defined(HAVE_LIBBROTLI) || \ !defined(HAVE_LIBZSTD) int main(int argc, char **argv)