bug-gnulib
[Top][All Lists]
Advanced

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

program_name in error.c


From: Sergey Poznyakoff
Subject: program_name in error.c
Date: Sat, 09 Sep 2006 08:42:12 +0300

Hello,

I'd like to install the following change to error.c in order to
better cooperate with argp.  Any objections?

Regards,
Sergey

Index: error.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/error.c,v
retrieving revision 1.46
diff -p -u -r1.46 error.c
--- error.c     29 Aug 2006 16:58:34 -0000      1.46
+++ error.c     9 Sep 2006 05:39:50 -0000
@@ -92,9 +92,13 @@ extern void __error_at_line (int status,
 char *strerror_r ();
 # endif
 
+#ifdef HAVE_PROGRAM_INVOCATION_NAME
+# define program_name program_invocation_name
+#else
 /* The calling program should define program_name and set it to the
    name of the executing program.  */
 extern char *program_name;
+#endif
 
 # if HAVE_STRERROR_R || defined strerror_r
 #  define __strerror_r strerror_r




reply via email to

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