From dff94ed500892b5b3fcd067a280c81ba04ddf5f1 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Thu, 5 Aug 2010 16:22:18 -0700 Subject: [PATCH] Cleanup syssignal.h. * src/syssignal.h (sighold, sigrelse, RETSIGTYPE): Remove, unused. (main_thread): Move down to remove #ifdef. (SIGMASKTYPE, SIGEMPTYMASK, SIGFULLMASK, sigmask, sigunblock): Remove conditional definition following unconditional ones. --- src/ChangeLog | 6 ++++++ src/syssignal.h | 32 +------------------------------- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 85d6e97e6f1..4e080f63533 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2010-08-05 Dan Nicolaescu + Cleanup syssignal.h. + * syssignal.h (sighold, sigrelse, RETSIGTYPE): Remove, unused. + (main_thread): Move down to remove #ifdef. + (SIGMASKTYPE, SIGEMPTYMASK, SIGFULLMASK, sigmask, sigunblock): + Remove conditional definition following unconditional ones. + * lisp.h: Remove HAVE_SHM code, unused. (QCmap, QCrehash_size, QCrehash_threshold, QCsize, QCtest) (QCweakness, Qabove_handle, Qbackquote, Qbar, Qbelow_handle) diff --git a/src/syssignal.h b/src/syssignal.h index f034e9e0761..57f7f6eec70 100644 --- a/src/syssignal.h +++ b/src/syssignal.h @@ -26,10 +26,6 @@ extern void init_signals (void); #define FORWARD_SIGNAL_TO_MAIN_THREAD #endif -#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD -extern pthread_t main_thread; -#endif - /* Don't #include . That header should always be #included before "config.h", because some configuration files (like s/hpux.h) indicate that SIGIO doesn't work by #undef-ing SIGIO. If this file @@ -69,15 +65,9 @@ extern sigset_t sys_sigmask (); #ifndef sigsetmask #define sigsetmask(SIG) sys_sigsetmask (SIG) #endif -#define sighold(SIG) ONLY_USED_IN_BSD_4_1 -#define sigrelse(SIG) ONLY_USED_IN_BSD_4_1 #undef signal #define signal(SIG,ACT) sys_signal(SIG,ACT) -/* Whether this is what all systems want or not, this is what - appears to be assumed in the source, for example data.c:arith_error. */ -typedef RETSIGTYPE (*signal_handler_t) (int); - signal_handler_t sys_signal (int signal_number, signal_handler_t action); sigset_t sys_sigblock (sigset_t new_mask); sigset_t sys_sigunblock (sigset_t new_mask); @@ -85,27 +75,6 @@ sigset_t sys_sigsetmask (sigset_t new_mask); #define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG) -#ifndef SIGMASKTYPE -#define SIGMASKTYPE int -#endif - -#ifndef SIGEMPTYMASK -#define SIGEMPTYMASK (0) -#endif - -#ifndef SIGFULLMASK -#define SIGFULLMASK (0xffffffff) -#endif - -#ifndef sigmask -#define sigmask(no) (1L << ((no) - 1)) -#endif - -#ifndef sigunblock -#define sigunblock(SIG) \ -{ SIGMASKTYPE omask = sigblock (SIGFULLMASK); sigsetmask (omask & ~SIG); } -#endif - #define sigfree() sigsetmask (SIGEMPTYMASK) #if defined (SIGINFO) && defined (BROKEN_SIGINFO) @@ -164,6 +133,7 @@ char *strsignal (int); #endif #ifdef FORWARD_SIGNAL_TO_MAIN_THREAD +extern pthread_t main_thread; #define SIGNAL_THREAD_CHECK(signo) \ do { \ if (!pthread_equal (pthread_self (), main_thread)) \ -- 2.39.2