[ccan] Can _GNU_SOURCE be conditional in TAP?

Tim Post echo at echoreply.us
Tue Mar 31 17:31:26 EST 2009


Hi Rusty,

I'm incorporating TAP into some trees that use -D_GNU_SOURCE, where
warnings are treated as errors.

How ugly would it be to wrap #define _GNU_SOURCE in #ifndef in tap.c?

tests/tap.c:26:1: warning: "_GNU_SOURCE" redefined
<command-line>: warning: this is the location of the previous definition

A lot of people using tools like automake will set that particular
constant high on the command line, if glibc is detected and extensions
are being used.

Cheers,
--Tim







More information about the ccan mailing list