Subject: lib/30845: strerror_r() missing
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <lukem@NetBSD.org>
List: netbsd-bugs
Date: 07/27/2005 00:16:00
>Number: 30845
>Category: lib
>Synopsis: strerror_r(3) missing
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Jul 27 00:16:00 +0000 2005
>Originator: Luke Mewburn
>Release: NetBSD 3.0_BETA
>Organization:
>Environment:
>Description:
We don't implement strerror_r(3).
>How-To-Repeat:
Code inspection.
>Fix:
Implement strerror_r(3), based on
libc/string/__strerror.c::__strerror()
Modify it to meet the SUSv3 standard (return EINVAL
if the errnum is invalid).
Recode perror(3), strerror(3), and __strerror() to
use strerror_r(3).
Note: according to SUSv3 strerror(3) and perror(3)
are allowed to share the same buffer, even though
the comments in our implementation say otherwise.