From: Nathan Moinvaziri Date: Thu, 18 Mar 2021 04:19:18 +0000 (-0700) Subject: Added preprocessor error guards to ensure proper library usage. X-Git-Tag: 2.0.2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc33b26ca5391eb6b2c952cd032920033be27a53;p=thirdparty%2Fzlib-ng.git Added preprocessor error guards to ensure proper library usage. --- diff --git a/zlib-ng.h b/zlib-ng.h index 384e3e2e..b67f8c29 100644 --- a/zlib-ng.h +++ b/zlib-ng.h @@ -29,9 +29,17 @@ (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). */ +#ifdef ZLIB_H_ +# error Include zlib-ng.h for zlib-ng API or zlib.h for zlib-compat API but not both +#endif + #include #include "zconf-ng.h" +#ifndef ZCONFNG_H +# error Missing zconf-ng.h add binary output directory to include directories +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/zlib.h b/zlib.h index ce730630..a47809f8 100644 --- a/zlib.h +++ b/zlib.h @@ -30,10 +30,18 @@ (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). */ +#ifdef ZNGLIB_H_ +# error Include zlib-ng.h for zlib-ng API or zlib.h for zlib-compat API but not both +#endif + #include #include #include "zconf.h" +#ifndef ZCONF_H +# error Missing zconf.h add binary output directory to include directories +#endif + #ifdef __cplusplus extern "C" { #endif