X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fverror.c;h=531e4edb5fcdc7e0b7d0b5a647de465d8382574b;hb=7b9878d56ceb1a8ed1255ea1e6010638af7252c6;hp=f9c869ec8489c4ed7933bcf18ffe0b5cbbf3ad6e;hpb=4f861fcbb2f6cefe311e085c97eb3c1694fd6557;p=gnulib.git diff --git a/lib/verror.c b/lib/verror.c index f9c869ec8..531e4edb5 100644 --- a/lib/verror.c +++ b/lib/verror.c @@ -17,9 +17,7 @@ /* Written by Eric Blake. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "verror.h" #include "xvasprintf.h" @@ -59,7 +57,15 @@ verror_at_line (int status, int errnum, const char *file, { 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