strerror_r: Avoid clobbering the strerror buffer when possible.
authorBruno Haible <bruno@clisp.org>
Thu, 19 May 2011 03:24:33 +0000 (05:24 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 19 May 2011 03:27:01 +0000 (05:27 +0200)
commitd3455c00b721eb7440419f2d10d50d35c5e7525a
tree3500f992cf41f3a9e1a3acbf55ca7f0722767091
parent0c4be75eb0966bde4533bc111778e0ab494a93be
strerror_r: Avoid clobbering the strerror buffer when possible.

* lib/strerror_r.c (strerror_r): Merge the three implementations.
Handle gnulib defined errno values here. When strerror() returns NULL
or an empty string, return EINVAL.
* lib/strerror.c (strerror): Always call strerror_r. Don't handle
gnulib defined errno values here.
* modules/strerror (Depends-on): Add verify, strerror_r-posix.
ChangeLog
lib/strerror.c
lib/strerror_r.c
modules/strerror