I have come across this code in the source of CMake:
https://fossies.org/windows/misc/cmake-3.17.0.zip/cmake-3.17.0/Utilities/cmzlib/compress.c
int ZEXPORT compress (dest, destLen, source, sourceLen) Bytef *dest; uLongf *destLen; const Bytef *source; uLong sourceLen; { return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); } Why is ZEXPORT used in the function, and how does it even compile?
If I change ZEXPORT to a random integer, like 5:
int 5 compress (dest, destLen, source, sourceLen) code won't even compile anymore.
Here are possible expansions:
define ZEXPORT WINAPI define ZEXPORT __declspec(dllexport)
ZEXPORTexpand to?zlib.h(which is#included in your link)#define ZEXPORT? It is unlikely to be#define ZEXPORT 5ZEXPORTis defined inzconf.hto a compiler-specific way to "export" functions.