Mercurial > hg > octave-nkf > gnulib-hg
changeset 7095:c645fbe36091
* verror.c (verror_at_line): Work around glibc bug 2997, so that
verror_at_line output complies with GNU Coding Standards even when
file is NULL.
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Tue, 08 Aug 2006 22:00:44 +0000 |
parents | f3bf5563d26f |
children | 7aeb8c62e4fc |
files | lib/ChangeLog lib/verror.c |
diffstat | 2 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2006-08-08 Eric Blake <ebb9@byu.net> + + * verror.c (verror_at_line): Work around glibc bug 2997, so that + verror_at_line output complies with GNU Coding Standards even when + file is NULL. + 2006-08-08 Eric Blake <ebb9@byu.net> * verror.h, verror.c: New files.
--- a/lib/verror.c +++ b/lib/verror.c @@ -59,7 +59,15 @@ { char *message = xvasprintf (format, args); if (message) - error_at_line (status, errnum, file, line_number, "%s", message); + { + /* Until http://sourceware.org/bugzilla/show_bug.cgi?id=2997 is fixed, + glibc violates GNU Coding Standards when the file argument to + error_at_line is NULL. */ + if (file) + error_at_line (status, errnum, file, line_number, "%s", message); + else + error (status, errnum, "%s", message); + } else { /* EOVERFLOW, EINVAL, and EILSEQ from xvasprintf are signs of