Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> I'm guessing that what we need to do is -D_GNU_SOURCE somewhere in the
>> Makefiles; the $64 question is exactly where
> The simplest choice would be to just define it unconditionally in linux.h.
> Since it is not supposed to change any interfaces, just add new ones, this
> should be safe.
That works for me. The main issue in my mind is not to define it on
platforms that aren't glibc-based, but linux.h should be safe.
Any objections out there?
I see another potential problem BTW: pg_config.h has
#ifndef HAVE_INET_ATON
# include <sys/types.h>
# include <netinet/in.h>
# include <arpa/inet.h>
extern int inet_aton(const char *cp, struct in_addr * addr);
#endif
which it does *before* pulling in the port-specific config file.
While this won't break Linux since it has inet_aton(), I could see
problems arising on platforms without. I am inclined to move all
the substitute "extern" declarations in pg_config.h to the bottom
of the file.
regards, tom lane