Skip to content

Commit 6d3a66a

Browse files
AlexisWilkemadler
authored andcommitted
Avoid attempting to redefine z_const in zconf.h.
1 parent 6419111 commit 6d3a66a

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

zconf.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,12 @@
235235
# endif
236236
#endif
237237

238-
#if defined(ZLIB_CONST) && !defined(z_const)
239-
# define z_const const
240-
#else
241-
# define z_const
238+
#ifndef z_const
239+
# ifdef ZLIB_CONST
240+
# define z_const const
241+
# else
242+
# define z_const
243+
# endif
242244
#endif
243245

244246
#ifdef Z_SOLO

zconf.h.cmakein

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,12 @@
237237
# endif
238238
#endif
239239

240-
#if defined(ZLIB_CONST) && !defined(z_const)
241-
# define z_const const
242-
#else
243-
# define z_const
240+
#ifndef z_const
241+
# ifdef ZLIB_CONST
242+
# define z_const const
243+
# else
244+
# define z_const
245+
# endif
244246
#endif
245247

246248
#ifdef Z_SOLO

zconf.h.in

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,12 @@
235235
# endif
236236
#endif
237237

238-
#if defined(ZLIB_CONST) && !defined(z_const)
239-
# define z_const const
240-
#else
241-
# define z_const
238+
#ifndef z_const
239+
# ifdef ZLIB_CONST
240+
# define z_const const
241+
# else
242+
# define z_const
243+
# endif
242244
#endif
243245

244246
#ifdef Z_SOLO

0 commit comments

Comments
 (0)