[ccan] Can _GNU_SOURCE be conditional in TAP?

Tim Post echo at echoreply.us
Tue Mar 31 18:41:55 EST 2009


Hi Rusty,

On Tue, 2009-03-31 at 17:49 +1030, Rusty Russell wrote:
> On Tuesday 31 March 2009 17:01:26 Tim Post wrote:
> > 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
> 
> Sure, I've fixed this.
> 
> Of course, the *real* fix is to create an asprintf ccan package.

What extensions to the glibc printf sub system are enabled with
_GNU_SOURCE? I think people would expect them in a replacement
implementation of asprintf() (turned on by _GNU_SOURCE), which might
entail a whole ccan printf module to replace it.

I could be wrong.

Cheers,
--Tim






More information about the ccan mailing list