Mercurial > gnulib
changeset 29101:0fc54578be97
Change strerror so that it never returns an empty string.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 27 Oct 2007 00:41:22 +0200 |
parents | 6b662dc21c75 |
children | af374afba6d1 |
files | ChangeLog lib/strerror.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Oct 26 18:31:38 2007 +0200 +++ b/ChangeLog Sat Oct 27 00:41:22 2007 +0200 @@ -1,3 +1,8 @@ +2007-10-26 Bruno Haible <bruno@clisp.org> + + * lib/strerror.c (rpl_strerror): Return "Unknown error ..." also if + strerror returned the empty string. Needed on HP-UX 11.00. + 2007-10-24 Micah Cowan <micah@cowan.name> Remove vestiges of cvs-gnulib-checkout process. Now we use git.
--- a/lib/strerror.c Fri Oct 26 18:31:38 2007 +0200 +++ b/lib/strerror.c Sat Oct 27 00:41:22 2007 +0200 @@ -35,7 +35,7 @@ { char *result = strerror (n); - if (! result) + if (result == NULL || result[0] == '\0') { static char const fmt[] = "Unknown error (%d)"; static char mesg[sizeof fmt + INT_STRLEN_BOUND (n)];