tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding %m conversion to the printf(3) family



On Fri, Oct 23, 2015 at 10:33:52PM +0100, Roy Marples wrote:
> 2) The alternative of using %s and strerror(3) is problematic in portable 
> applications for these reasons
>   *  strerror(3) isn't guaranteed to be threadsafe (it is on NetBSD)

Is there any platform where strerror is *not* threadsafe given:
(1) No current locale changes.
(2) system generated (aka non-arbitrary) errno value.

All implementations I know fallback to the local buffer only for the
second case to include the formated errno value.

Joerg


Home | Main Index | Thread Index | Old Index