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