Skip to content

Commit

Permalink
Tue Apr 4 00:48:53 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
Browse files Browse the repository at this point in the history
	* 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.
  • Loading branch information
Roland McGrath committed Apr 4, 1995
1 parent c4bf5a3 commit 45b28a8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
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.

Sun Apr 2 13:13:52 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>

* posix/execvp.c: Don't use stat to search path; just try execv
Expand Down
7 changes: 5 additions & 2 deletions misc/progname.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 2 additions & 0 deletions sysdeps/mach/hurd/setitimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ fork_itimer (void)
it.it_value = it.it_interval;

setitimer_locked (&it, NULL, NULL);

(void) &fork_itimer; /* Avoid gcc optimizing out the function. */
}
text_set_element (_hurd_fork_child_hook, fork_itimer);

Expand Down

0 comments on commit 45b28a8

Please sign in to comment.