changeset 7290:44ae9a87568c

Move declarations of program_invocation_name and program_invocation_short_name to argp.h, so they are visible to user programs.
author Sergey Poznyakoff <gray@gnu.org.ua>
date Sun, 10 Sep 2006 11:51:42 +0000
parents ec5559fba282
children 5a955fa8e23c
files lib/argp-namefrob.h lib/argp.h
diffstat 2 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lib/argp-namefrob.h
+++ b/lib/argp-namefrob.h
@@ -141,20 +141,6 @@
 # define putchar_unlocked(x) putchar (x)
 # endif
 
-/* GNULIB makes sure both program_invocation_name and
-   program_invocation_short_name are available */
-#ifdef GNULIB_PROGRAM_INVOCATION_NAME
-extern char *program_invocation_name;
-# undef HAVE_DECL_PROGRAM_INVOCATION_NAME
-# define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
-#endif
-
-#ifdef GNULIB_PROGRAM_INVOCATION_SHORT_NAME
-extern char *program_invocation_short_name;
-# undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
-# define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1
-#endif
-
 #endif /* !_LIBC */
 
 #ifndef __set_errno
--- a/lib/argp.h
+++ b/lib/argp.h
@@ -423,6 +423,20 @@
 
 /* Global variables.  */
 
+/* GNULIB makes sure both program_invocation_name and
+   program_invocation_short_name are available */
+#ifdef GNULIB_PROGRAM_INVOCATION_NAME
+extern char *program_invocation_name;
+# undef HAVE_DECL_PROGRAM_INVOCATION_NAME
+# define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
+#endif
+
+#ifdef GNULIB_PROGRAM_INVOCATION_SHORT_NAME
+extern char *program_invocation_short_name;
+# undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+# define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1
+#endif
+
 /* If defined or set by the user program to a non-zero value, then a default
    option --version is added (unless the ARGP_NO_HELP flag is used), which
    will print this string followed by a newline and exit (unless the