perror: test for output mismatch
authorEric Blake <eblake@redhat.com>
Tue, 21 Jun 2011 22:44:30 +0000 (16:44 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 21 Jun 2011 23:10:48 +0000 (17:10 -0600)
commitbd73e5537678a8c727054c6ae39d8f5a80c172cf
treee38f71fe2228f4f3357d56e7621accef3ad4029b
parent23d3c1a2676b1aa6cb1388891485de846d7435d8
perror: test for output mismatch

On IRIX 6.5, strerror(-1) returns NULL but perror("") for errno
of -1 prints "Unknown error"; POSIX requires that the two must
match, so we must replace perror.  But since IRIX also lacks
strerror_r, our probe for a working [__xpg_]strerror_r was
never even happening.

* m4/perror.m4 (gl_FUNC_PERROR): Add test, in order to replace
perror on IRIX.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
m4/perror.m4