From: Sergey Poznyakoff Date: Sun, 10 Sep 2006 11:51:42 +0000 (+0000) Subject: Move declarations of program_invocation_name and program_invocation_short_name to... X-Git-Tag: cvs-readonly~1903 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=0e7a6d56882dc8fd6c8de4a44ee0f103879bbf03;hp=a1c20fb216d4392ee19b34dcee718d0dffe8873c;p=gnulib.git Move declarations of program_invocation_name and program_invocation_short_name to argp.h, so they are visible to user programs. --- diff --git a/lib/argp-namefrob.h b/lib/argp-namefrob.h index ea3086455..f10f58297 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 8cb8c7238..f22a56be3 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