about summary refs log tree commit diff
path: root/argp/argp-namefrob.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-10-03 00:44:39 +0000
committerRoland McGrath <roland@gnu.org>2003-10-03 00:44:39 +0000
commitd6e68295b4a0e6484fc52b7267d042bdd2c48906 (patch)
tree171b9b44fc733a0c1cc9f17caff0649a77014e92 /argp/argp-namefrob.h
parentf39941e4127085f2120e40ffefc287f8c4a9548a (diff)
downloadglibc-d6e68295b4a0e6484fc52b7267d042bdd2c48906.tar.gz
glibc-d6e68295b4a0e6484fc52b7267d042bdd2c48906.tar.xz
glibc-d6e68295b4a0e6484fc52b7267d042bdd2c48906.zip
2003-10-02 Roland McGrath <roland@redhat.com>
	* argp/argp-help.c (__argp_short_program_name): Move inside [! _LIBC].
	* argp/argp-namefrob.h
	[_LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME]
	(__argp_short_program_name): Don't declare fn, define it as a macro.
Diffstat (limited to 'argp/argp-namefrob.h')
-rw-r--r--argp/argp-namefrob.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/argp/argp-namefrob.h b/argp/argp-namefrob.h
index 395d9b6dd8..26e285bfba 100644
--- a/argp/argp-namefrob.h
+++ b/argp/argp-namefrob.h
@@ -1,5 +1,5 @@
 /* Name frobnication for compiling argp outside of glibc
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
 
@@ -138,10 +138,15 @@
 # endif
 
 extern char *__argp_basename (char *name);
-extern char *__argp_short_program_name (void);
 
 #endif /* !_LIBC */
 
 #ifndef __set_errno
 #define __set_errno(e) (errno = (e))
 #endif
+
+#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