strerror_r not according to standard ?

Vinu Rajashekhar vinutheraj@gmail.com
Mon May 24 16:08:00 GMT 2010


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.



More information about the Newlib mailing list