From 0e7a6d56882dc8fd6c8de4a44ee0f103879bbf03 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sun, 10 Sep 2006 11:51:42 +0000 Subject: [PATCH] Move declarations of program_invocation_name and program_invocation_short_name to argp.h, so they are visible to user programs. --- lib/argp-namefrob.h | 14 -------------- lib/argp.h | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/argp-namefrob.h b/lib/argp-namefrob.h index ea3086455e..f10f58297b 100644 --- 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 diff --git a/lib/argp.h b/lib/argp.h index 8cb8c72384..f22a56be3e 100644 --- a/lib/argp.h +++ b/lib/argp.h @@ -423,6 +423,20 @@ extern error_t __argp_parse (const struct argp *__restrict __argp, /* 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 -- 2.30.2