diff options
author | Brad King <brad.king@kitware.com> | 2022-06-10 20:37:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-06-11 09:10:27 (GMT) |
commit | 29c578c8fbfadd148e4d7219413526830b054321 (patch) | |
tree | a2564fa94caf56418f3f81bc631a0792d2e676b0 /Utilities/cmzlib/zlib.h | |
parent | efbbae9705d89719804387056c8d592545710487 (diff) | |
download | CMake-29c578c8fbfadd148e4d7219413526830b054321.zip CMake-29c578c8fbfadd148e4d7219413526830b054321.tar.gz CMake-29c578c8fbfadd148e4d7219413526830b054321.tar.bz2 |
zlib: Mangle symbols to avoid conflict with external transitive dependencies
Mangling was dropped by commit fc22ac115e (zlib: Drop old sources to
make room for a fresh import, 2022-05-26). Restore it for the new
import of upstream zlib.
Diffstat (limited to 'Utilities/cmzlib/zlib.h')
-rw-r--r-- | Utilities/cmzlib/zlib.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Utilities/cmzlib/zlib.h b/Utilities/cmzlib/zlib.h index 4a98e38..3764e85 100644 --- a/Utilities/cmzlib/zlib.h +++ b/Utilities/cmzlib/zlib.h @@ -1806,6 +1806,20 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, # define z_inflateBackInit(strm, windowBits, window) \ inflateBackInit_((strm), (windowBits), (window), \ ZLIB_VERSION, (int)sizeof(z_stream)) +#elif 1 /* Hook for mangling inside CMake. */ +# define cm_zlib_deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define cm_zlib_inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define cm_zlib_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define cm_zlib_inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define cm_zlib_inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) #else # define deflateInit(strm, level) \ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) @@ -1841,6 +1855,10 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ # undef z_gzgetc # define z_gzgetc(g) \ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#elif 1 /* Hook for mangling inside CMake. */ +# undef cm_zlib_gzgetc +# define cm_zlib_gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) #else # define gzgetc(g) \ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) |