Mercurial > hg > octave-nkf > gnulib-hg
changeset 1552:6c6b0d080a36
(error): Don't use strerror_r's return value.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Sun, 15 Nov 1998 17:35:34 +0000 |
parents | 8aedc02a257c |
children | 6ecf1486a28a |
files | lib/error.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/error.c +++ b/lib/error.c @@ -152,7 +152,10 @@ { #if defined HAVE_STRERROR_R || defined _LIBC char errbuf[1024]; - fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf)); + /* Don't use __strerror_r's return value because on some systems + (at least DEC UNIX 4.0[A-D]) strerror_r returns `int'. */ + __strerror_r (errnum, errbuf, sizeof errbuf); + fprintf (stderr, ": %s", errbuf); #else fprintf (stderr, ": %s", strerror (errnum)); #endif