-
Notifications
You must be signed in to change notification settings - Fork 245
Description
As a general rule, it's not desirable for a library's public header file(s) to try and define feature macros such as _POSIX_C_SOURCE. The place to do that is either in the compiler flags, or in a private header file.
The reason why it's a problem is that it potentially messes with the namespace/feature choices of clients of the library - but only if they happen to #include "maxminddb.h" before including any standard header. If instead they include it after some other header, that's even worse: the result is undefined.
(I've seen #158 and #267 for some context for why you're defining this, but it remains that you're doing it in the wrong place, in a way that can cause build failures for client code - an example of which I've just spent an hour or two assisting someone to fix.)