summaryrefslogtreecommitdiff
path: root/lib/argp.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2006-09-10 11:51:42 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2006-09-10 11:51:42 +0000
commit0e7a6d56882dc8fd6c8de4a44ee0f103879bbf03 (patch)
tree4da28965b43d6c7587db6c1aaa85b117555360fb /lib/argp.h
parenta1c20fb216d4392ee19b34dcee718d0dffe8873c (diff)
downloadgnulib-0e7a6d56882dc8fd6c8de4a44ee0f103879bbf03.tar.gz
Move declarations of program_invocation_name and program_invocation_short_name to argp.h, so they are visible to user programs.
Diffstat (limited to 'lib/argp.h')
-rw-r--r--lib/argp.h14
1 files changed, 14 insertions, 0 deletions
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