From 6d3a66a11a9d98c80d5b6a36d489263a389c6b90 Mon Sep 17 00:00:00 2001 From: AlexisWilke Date: Sun, 13 Oct 2024 08:46:47 -0700 Subject: [PATCH] Avoid attempting to redefine z_const in zconf.h. --- zconf.h | 10 ++++++---- zconf.h.cmakein | 10 ++++++---- zconf.h.in | 10 ++++++---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/zconf.h b/zconf.h index 4a52aed..d6c159a 100644 --- a/zconf.h +++ b/zconf.h @@ -235,10 +235,12 @@ # endif #endif -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const +#ifndef z_const +# ifdef ZLIB_CONST +# define z_const const +# else +# define z_const +# endif #endif #ifdef Z_SOLO diff --git a/zconf.h.cmakein b/zconf.h.cmakein index 7a35e8f..f43a904 100644 --- a/zconf.h.cmakein +++ b/zconf.h.cmakein @@ -237,10 +237,12 @@ # endif #endif -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const +#ifndef z_const +# ifdef ZLIB_CONST +# define z_const const +# else +# define z_const +# endif #endif #ifdef Z_SOLO diff --git a/zconf.h.in b/zconf.h.in index 4a52aed..d6c159a 100644 --- a/zconf.h.in +++ b/zconf.h.in @@ -235,10 +235,12 @@ # endif #endif -#if defined(ZLIB_CONST) && !defined(z_const) -# define z_const const -#else -# define z_const +#ifndef z_const +# ifdef ZLIB_CONST +# define z_const const +# else +# define z_const +# endif #endif #ifdef Z_SOLO