strerror_r: avoid corrupting errno on Solaris
authorEric Blake <eblake@redhat.com>
Fri, 20 May 2011 23:45:13 +0000 (17:45 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 20 May 2011 23:45:13 +0000 (17:45 -0600)
commit179ecbe2ce270a13d35953f23ba7f49acad1a4e4
treed609657346927de8a7f7444720807213df6edecb
parentec03cccf227537c78214a730d8de44bc7fb36489
strerror_r: avoid corrupting errno on Solaris

On Solaris, a non-zero return was also reflected into errno.
Leaving errno unchanged is a useful feature worth guaranteeing.

* m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Check for Solaris behavior.
* doc/posix-functions/strerror_r.texi (strerror_r): Document it.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
doc/posix-functions/strerror_r.texi
m4/strerror_r.m4