> 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
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));
>
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,
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
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
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