]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Use HAVE_ZLIB for both automake and autoconf
authorAndreas Metzler <ametzler@bebt.de>
Sat, 24 Aug 2024 10:58:15 +0000 (12:58 +0200)
committerAndreas Metzler <ametzler@bebt.de>
Sat, 21 Sep 2024 09:27:05 +0000 (11:27 +0200)
Do not mix HAVE_LIBZ and HAVE_ZLIB

Signed-off-by: Andreas Metzler <ametzler@bebt.de>
configure.ac
lib/compress.c
tests/tls13/compress-cert-cli.c
tests/tls13/compress-cert-neg.c
tests/tls13/compress-cert-neg2.c
tests/tls13/compress-cert.c

index 68d7adb0c83b9ee9ca9d6d5dc3ed6304c31f8e85..2413b079c8281db818c7fcacaf361f8f1f3fa20e 100644 (file)
@@ -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")
index 936a4595329c44aa08882cbd02afb02712b5689b..a6d91e6d10dcdc5911c104714090b5aa408fb5c1 100644 (file)
@@ -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;
index cc7065c7dd6d961c2c28536c48a2bd3494bc6404..ada7d3abac9f86ad33b5466cb5f4576b165b7499 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#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)
index 56c53d5cd4241513def7d57e2371572c657a11aa..02e7775dda86ef9e0524c5c4e0e996b80144b703 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#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)
index 2d8bf070039c659c12faa8e66f771421cbcc9398..04191c35d088da242db91ed503b06ffea0505c0b 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#if defined(_WIN32) || !defined(HAVE_LIBZ)
+#if defined(_WIN32) || !defined(HAVE_ZLIB)
 
 int main(int argc, char **argv)
 {
index c578dceeda0ada32b2562f245d59d77778a9926b..17564c145ba42ef4ec4217637201745205558401 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#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)