This is the mail archive of the
mailing list for the glibc project.
Re: Test for GNU/XSI version of strerror_r
- From: Ian Pilcher <arequipeno at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Fri, 4 Oct 2019 15:01:00 -0500
- Subject: Re: Test for GNU/XSI version of strerror_r
- References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org> <email@example.com>
On 10/4/19 2:37 PM, Florian Weimer wrote:
You could use generic selection and _Generic. But these days, that's
more restrictive than C++ in terms of compiler support.
I only care about gcc, but I do need to support 4.8.5 (in EL7), so it
looks like that isn't an option.
It's not really defined to add “#define _GNU_SOURCE” after the first
#include, so you could probably just check for _GNU_SOURCE.
I'm actually doing that as well. I just wanted to catch the (admittedly
pathological) case where Python.h includes string.h *before* defining
Here's what I've got so far. (It looks like my 100-line estimate may
have been a bit low. Gotta love C!)
Ian Pilcher firstname.lastname@example.org
-------- "I grew up before Mark Zuckerberg invented friendship" --------