]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r220376: Allow strerror(0) and strerror_r(0, ...).
authorjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 15 Apr 2011 19:46:25 +0000 (19:46 +0000)
committerjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 15 Apr 2011 19:46:25 +0000 (19:46 +0000)
commite05b7a875aeb050ee3f939a842721ed0686d8dcb
treea62b2903925522a53ea35c5728f678e6bca58e75
parent85eb85786dc0f351ebf03dc02d60946e712fcd19
MFC r220376: Allow strerror(0) and strerror_r(0, ...).

Of course, strerror_r() may still fail with ERANGE.

Although the POSIX specification said this could fail with EINVAL and
doing this likely indicates invalid use of errno, most other
implementations permitted it, various POSIX testsuites require it to
work (matching the older sys_errlist array) and apparently some
applications depend on it.

PR: standards/151316

git-svn-id: svn://svn.freebsd.org/base/stable/8@220664 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/gen/errlst.c
lib/libc/string/strerror.3
lib/libc/string/strerror.c
tools/regression/lib/libc/string/test-strerror.c