diff options
author | Mark Kettenis <kettenis@gnu.org> | 2001-08-27 22:39:56 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2001-08-27 22:39:56 +0000 |
commit | 46711df821e6955e5fdc91e2d939356e048aa64b (patch) | |
tree | 040cef5218b39e3d2d1532bcec3cae0abf501c9b /gdb/top.c | |
parent | 8a423cb3d62534f6663b66ae42045fd984d36d63 (diff) | |
download | gdb-46711df821e6955e5fdc91e2d939356e048aa64b.zip gdb-46711df821e6955e5fdc91e2d939356e048aa64b.tar.gz gdb-46711df821e6955e5fdc91e2d939356e048aa64b.tar.bz2 |
* event-top.c (async_stop_sig) [HAVE_SIGPROCMASK]: Some
gratuitious whitespace changes.
[!HAVE_SIGPROCMASK]: Call sigsetmask if HAVE_SIGSETMASK is defined.
* top.c: Remove redundant logic to define HAVE_SIGSETMASK.
(sigsetmask) Don't define macro.
(stop_sig) [HAVE_SIGPROCMASK]: Add bit of code snatched from
async_stop_sig from event-top.c.
[!HAVE_SIGPROCMASK]: Call sigsetmask if HAVE_SIGSETMASK is
defined.
* configure.in (AC_CHECK_FUNCS): Put functions in alphabetical
order. Add sigsetmask.
(AC_FUNC_VFORK, AC_FUNC_ALLOCA): Reorder such that they're in
alphabetical order.
* config/xm-aix4.h, config/alpha/xm-alphalinux.h,
config/i386/xm-cygwin.h, config/rs6000/xm-rs6000.h
(HAVE_SIGSETMASK): Remove.
* aclocal.m4, config.in, configure
Diffstat (limited to 'gdb/top.c')
-rw-r--r-- | gdb/top.c | 22 |
1 files changed, 9 insertions, 13 deletions
@@ -178,19 +178,6 @@ static void stop_sig (int); #endif #endif -/* Some System V have job control but not sigsetmask(). */ -#if !defined (HAVE_SIGSETMASK) -#if !defined (USG) -#define HAVE_SIGSETMASK 1 -#else -#define HAVE_SIGSETMASK 0 -#endif -#endif - -#if 0 == (HAVE_SIGSETMASK) -#define sigsetmask(n) -#endif - /* Hooks for alternate command interfaces. */ /* Called after most modules have been initialized, but before taking users @@ -922,7 +909,16 @@ stop_sig (int signo) { #if STOP_SIGNAL == SIGTSTP signal (SIGTSTP, SIG_DFL); +#if HAVE_SIGPROCMASK + { + sigset_t zero; + + sigemptyset (&zero); + sigprocmask (SIG_SETMASK, &zero, 0); + } +#elif HAVE_SIGSETMASK sigsetmask (0); +#endif kill (getpid (), SIGTSTP); signal (SIGTSTP, stop_sig); #else |