zlib-ng / minizip-ng

Fork of the popular zip manipulation library found in the zlib distribution.
Other
1.24k stars 434 forks source link

Ambiguous expansion of macro 'ZEXPORT' #824

Closed Coeur closed 1 week ago

Coeur commented 1 week ago

I get this warning: Capture d’écran 2024-11-11 à 23 42 20

One definition from zlib's zconf.h: https://github.com/madler/zlib/blob/ef24c4c7502169f016dcd2a26923dbaf3216748c/zconf.h#L384-L386

#ifndef ZEXPORT
#  define ZEXPORT
#endif

Same definition from zlib-ng: https://github.com/zlib-ng/zlib-ng/blob/94aacd8bd69b7bfafce14fbe7639274e11d92d51/zconf.h.in#L98-L115

But a different definition from ioapi.h: https://github.com/zlib-ng/minizip-ng/blob/32b66976a716ec8f7a9469bc6be55d3d9db85fe4/compat/ioapi.h#L9-L11

I see two possible ways to resolve that: A. Either we align ioapi.h definition with zlib/zlib-ng by removing extern B. Or we change ZEXPORT to ZEXTERN in the code