Skip to content

Commit bddc968

Browse files
committed
Do not force Z_CONST for C++.
Forcing Z_CONST resulted in an issue when compiling Firefox. Now if someone wants to compile zlib as C++ code (which it isn't), now they will need to #define Z_CONST themselves.
1 parent 5481269 commit bddc968

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

zconf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
# endif
219219
#endif
220220

221-
#if ( defined(ZLIB_CONST) || defined(__cplusplus) ) && !defined(z_const)
221+
#if defined(ZLIB_CONST) && !defined(z_const)
222222
# define z_const const
223223
#else
224224
# define z_const

zconf.h.cmakein

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
# endif
221221
#endif
222222

223-
#if ( defined(ZLIB_CONST) || defined(__cplusplus) ) && !defined(z_const)
223+
#if defined(ZLIB_CONST) && !defined(z_const)
224224
# define z_const const
225225
#else
226226
# define z_const

zconf.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
# endif
219219
#endif
220220

221-
#if ( defined(ZLIB_CONST) || defined(__cplusplus) ) && !defined(z_const)
221+
#if defined(ZLIB_CONST) && !defined(z_const)
222222
# define z_const const
223223
#else
224224
# define z_const

0 commit comments

Comments
 (0)