Re: waf checking - fail on warnings?

2019-08-26 Thread Hal Murray via devel
> A relatively quick search suggests mandatory=True as an argument. That makes waf fail if the code chunk doesn't work. I'm trying to make the code chunk not-work if it gets a warning, but then let waf put a comment in config.h to indicate that a feature test didn't work rather than put a

Re: waf checking - fail on warnings?

2019-08-26 Thread James Browning via devel
On Mon, Aug 26, 2019, 8:02 PM Hal Murray via devel wrote: > > How do I tell waf to fail on warnings? > > I'm trying to use this to detect which API I'm getting. > > STRERROR_FRAG = """ > #include > int main(void) { > char buf [100]; > const char *foo = strerror_r(6, buf, sizeof(buf)); >

waf checking - fail on warnings?

2019-08-26 Thread Hal Murray via devel
How do I tell waf to fail on warnings? I'm trying to use this to detect which API I'm getting. STRERROR_FRAG = """ #include int main(void) { char buf [100]; const char *foo = strerror_r(6, buf, sizeof(buf)); return foo == NULL; } """ ctx.check_cc( fragment=STRERROR_FRAG,

Re: %m, #614

2019-08-26 Thread Matthew Selsky via devel
On Mon, Aug 26, 2019 at 04:55:48PM -0700, Gary E. Miller via devel wrote: > _GNU_SOURCE should not always be defined, but it does need to be defined > in certain cases. For example, on glibc < 2.10, you need to define > it to get strnlen() and struct ifreq. > > From glibc 2.10, you instead need

Re: %m, #614

2019-08-26 Thread Gary E. Miller via devel
Yo Achim! On Mon, 26 Aug 2019 21:00:18 +0200 Achim Gratz via devel wrote: > Hal Murray via devel writes: > > waf turns on _GNU_SOURCE > > There's your bug. You can't do that if you want to stay portable, > thus you must find another feature test macro for whatever feature > you are looking

Re: %m, #614

2019-08-26 Thread Achim Gratz via devel
Hal Murray via devel writes: > waf turns on _GNU_SOURCE There's your bug. You can't do that if you want to stay portable, thus you must find another feature test macro for whatever feature you are looking for. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk