Commit a90538cb authored by Jim Blandy's avatar Jim Blandy

* emacs.c (__do_global_ctors, __do_global_ctors_aux,

	__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__, __main): Don't
	define these if ORDINARY_LINK is #defined; in that case, the
	standard linking procedure will find definitions for these.

	* emacs.c (main): SIGIOT isn't defined on all systems; don't set
	its signal handler unless it is.
parent d6717cdb
...@@ -140,7 +140,7 @@ fatal_error_signal (sig) ...@@ -140,7 +140,7 @@ fatal_error_signal (sig)
Remember that since we're in a signal handler, the signal we're Remember that since we're in a signal handler, the signal we're
going to send is probably blocked, so we have to unblock it if we going to send is probably blocked, so we have to unblock it if we
want to really receive it. */ want to really receive it. */
sigblock(SIGEMPTYMASK); sigunblock (sigmask (fatal_error_code));
kill (getpid (), fatal_error_code); kill (getpid (), fatal_error_code);
#endif /* not VMS */ #endif /* not VMS */
} }
...@@ -173,6 +173,7 @@ extern noshare char **environ; ...@@ -173,6 +173,7 @@ extern noshare char **environ;
#endif /* LINK_CRTL_SHARE */ #endif /* LINK_CRTL_SHARE */
#endif /* VMS */ #endif /* VMS */
#ifndef ORDINARY_LINK
/* We don't include crtbegin.o and crtend.o in the link, /* We don't include crtbegin.o and crtend.o in the link,
so these functions and variables might be missed. so these functions and variables might be missed.
Provide dummy definitions to avoid error. Provide dummy definitions to avoid error.
...@@ -189,6 +190,7 @@ char * __DTOR_LIST__[2] = { (char *) (-1), 0 }; ...@@ -189,6 +190,7 @@ char * __DTOR_LIST__[2] = { (char *) (-1), 0 };
__main () __main ()
{} {}
#endif /* __GNUC__ */ #endif /* __GNUC__ */
#endif /* ORDINARY_LINK */
/* ARGSUSED */ /* ARGSUSED */
main (argc, argv, envp) main (argc, argv, envp)
...@@ -375,7 +377,10 @@ main (argc, argv, envp) ...@@ -375,7 +377,10 @@ main (argc, argv, envp)
signal (SIGQUIT, fatal_error_signal); signal (SIGQUIT, fatal_error_signal);
signal (SIGILL, fatal_error_signal); signal (SIGILL, fatal_error_signal);
signal (SIGTRAP, fatal_error_signal); signal (SIGTRAP, fatal_error_signal);
#ifdef SIGIOT
/* This is missing on some systems - OS/2, for example. */
signal (SIGIOT, fatal_error_signal); signal (SIGIOT, fatal_error_signal);
#endif
#ifdef SIGEMT #ifdef SIGEMT
signal (SIGEMT, fatal_error_signal); signal (SIGEMT, fatal_error_signal);
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment