This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
strerror_r not according to standard ?
- From: Vinu Rajashekhar <vinutheraj at gmail dot com>
- To: newlib at sourceware dot org
- Date: Mon, 24 May 2010 21:34:07 +0530
- Subject: strerror_r not according to standard ?
I have a doubt regarding the newlib implementation of strerror_r.
The function doesn't set ERANGE if the buflen given is insufficient
to store the whole description of the errno. Similarly, it doesn't set
EINVAL if errno is not a ?valid error number.
Another thing is that it, in the linux manpages it says that strerror_r (the GNU
extension) always returns a null-terminated string, which is not the case
for the newlib strerror_r.
I am not sure if all of these are really bugs, because newlib doesn't have
the POSIX strerror_r. My idea about the GNU extension version of the function
is from the Linux man-pages. If they can be treated as bugs, I will be
happy to write
a patch and sent it.