[Bug libfortran/46267] strerror() is not necessarily thread-safe
jb at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 2 13:20:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46267
--- Comment #3 from Janne Blomqvist <jb at gcc dot gnu.org> 2010-11-02 13:20:48 UTC ---
Well, if we want to use strerror_r() we'd have to either first undef
_GNU_SOURCE before we include string.h so that we get the POSIX version (but,
might this cause some other weird breakage?) or then we need to have versions
both for glibc and others. E.g.
#ifdef HAVE_STRERROR_R
#ifdef _GNU_SOURCE
// Use glibc strerror_r()
#else
// Use POSIX strerror_r()
#else
// Use strerror()
#endif
More information about the Gcc-bugs
mailing list