Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 8 Feb 2013 17:55:43 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: guard bug for strerror_r

* Jens Gustedt <jens.gustedt@...ia.fr> [2013-02-08 17:48:18 +0100]:
> The linux man page says
> 
>        The XSI-compliant version of strerror_r() is provided if:
>        (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE
>        Otherwise, the GNU-specific version is provided.
> 
> but the musl code has
> 
> #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
>  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
>  || defined(_BSD_SOURCE)
> ...
> int strerror_r (int, char *, size_t);
> ...
> #endif
> 
> So if __GNU_SOURCE is set, glibc chooses their own interface and
> musl choose the POSIX interface.
> 
> Why is musl touching __GNU_SOURCE at all?
> 

musl provides the posix api when requested

musl provides many gnu specific apis when _GNU_SOURCE is set

but when posix and gnu collides it's always the posix api,
musl never provides broken gnu apis

at least this was the policy so far

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.