about summary refs log tree commit diff
path: root/misc/progname.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-04-04 21:53:15 +0000
committerRoland McGrath <roland@gnu.org>1995-04-04 21:53:15 +0000
commit45b28a8f0b36a48ab37ca973c2a93d8c43120488 (patch)
treeeabe23f97b1290bd67f3b6741ff7207eea3ae627 /misc/progname.c
parentc4bf5a3e9a6bddb74d649a7d687111f7c2df04e1 (diff)
downloadglibc-45b28a8f0b36a48ab37ca973c2a93d8c43120488.tar.gz
glibc-45b28a8f0b36a48ab37ca973c2a93d8c43120488.tar.xz
glibc-45b28a8f0b36a48ab37ca973c2a93d8c43120488.zip
Tue Apr 4 00:48:53 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
	* misc/progname.c (program_invocation_name,
 	program_invocation_short_name): Make these initialized data
 	definitions.

	* sysdeps/mach/hurd/setitimer.c (fork_itimer): Add self reference
 	so gcc doesn't optimize out the function entirely.
Diffstat (limited to 'misc/progname.c')
-rw-r--r--misc/progname.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/misc/progname.c b/misc/progname.c
index 265ca5c3a9..d4efac976d 100644
--- a/misc/progname.c
+++ b/misc/progname.c
@@ -21,8 +21,11 @@ Cambridge, MA 02139, USA.  */
 #include <ansidecl.h>
 #include <string.h>
 
-char *program_invocation_name;
-char *program_invocation_short_name;
+/* These must be initialized data definitions.  Common definitions satisfy
+   references to these variables, but do not cause the whole file to be
+   linked in, and so omit the set-up function.  */
+char *program_invocation_name = NULL;
+char *program_invocation_short_name = NULL;
 
 static void
 DEFUN(set_progname, (argc, argv, envp),