Mercurial > hg > octave-nkf > gnulib-hg
changeset 6474:8ba920b5206b
Define program_invocation_name and
program_invocation_short_name if requested
(__argp_base_name): Add prototype
author | Sergey Poznyakoff <gray@gnu.org.ua> |
---|---|
date | Fri, 09 Dec 2005 12:29:17 +0000 |
parents | 39f26cf09cc9 |
children | 7af794d77875 |
files | lib/argp-namefrob.h |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/argp-namefrob.h +++ b/lib/argp-namefrob.h @@ -76,6 +76,20 @@ #undef __argp_fmtstream_wmargin #define __argp_fmtstream_wmargin argp_fmtstream_wmargin +/* 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 + #include "mempcpy.h" #include "strcase.h" #include "strchrnul.h" @@ -149,8 +163,11 @@ #define __set_errno(e) (errno = (e)) #endif +char * __argp_base_name (char *name); + #if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME # define __argp_short_program_name() (program_invocation_short_name) #else extern char *__argp_short_program_name (void); #endif +