bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new module proposal: verror


From: Eric Blake
Subject: Re: new module proposal: verror
Date: Tue, 8 Aug 2006 21:59:15 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> 2006-08-08  Eric Blake  <ebb9 <at> byu.net>
> 
>       * modules/verror: New module.
>       * MODULES.html.sh: Document it.

I am installing this followup, so that users of verror_at_line with a NULL file 
still comply with GNU Coding Standards by outputting "program: message", even 
though error_at_line currently outputs "program:message" in the same case.

2006-08-08  Eric Blake  <address@hidden>

        * 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.

Index: lib/verror.c
===================================================================
RCS file: /sources/gnulib/gnulib/lib/verror.c,v
retrieving revision 1.1
diff -u -r1.1 verror.c
--- lib/verror.c        8 Aug 2006 14:37:39 -0000       1.1
+++ lib/verror.c        8 Aug 2006 21:55:23 -0000
@@ -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







reply via email to

[Prev in Thread] Current Thread [Next in Thread]