Do not force Z_CONST for C++.
authorMark Adler <madler@alumni.caltech.edu>
Sun, 14 Apr 2013 17:31:31 +0000 (10:31 -0700)
committerMark Adler <madler@alumni.caltech.edu>
Sun, 28 Apr 2013 22:57:11 +0000 (15:57 -0700)
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.

zconf.h
zconf.h.cmakein
zconf.h.in

diff --git a/zconf.h b/zconf.h
index 7a9d8f2..9987a77 100644 (file)
--- a/zconf.h
+++ b/zconf.h
 #  endif
 #endif
 
-#if ( defined(ZLIB_CONST) || defined(__cplusplus) ) && !defined(z_const)
+#if defined(ZLIB_CONST) && !defined(z_const)
 #  define z_const const
 #else
 #  define z_const
index 10e445f..043019c 100644 (file)
 #  endif
 #endif
 
-#if ( defined(ZLIB_CONST) || defined(__cplusplus) ) && !defined(z_const)
+#if defined(ZLIB_CONST) && !defined(z_const)
 #  define z_const const
 #else
 #  define z_const
index 7a9d8f2..9987a77 100644 (file)
 #  endif
 #endif
 
-#if ( defined(ZLIB_CONST) || defined(__cplusplus) ) && !defined(z_const)
+#if defined(ZLIB_CONST) && !defined(z_const)
 #  define z_const const
 #else
 #  define z_const