Commit ef03a4e6 authored by Dan Nicolaescu's avatar Dan Nicolaescu

Remove POSIX_SIGNALS.

* s/usg5-4.h (POSIX_SIGNALS):
* s/netbsd.h (POSIX_SIGNALS):
* s/msdos.h (POSIX_SIGNALS):
* s/ms-w32.h (POSIX_SIGNALS):
* s/hpux11.h (POSIX_SIGNALS):
* s/gnu.h (POSIX_SIGNALS):
* s/gnu-linux.h (POSIX_SIGNALS):
* s/freebsd.h (POSIX_SIGNALS):
* s/darwin.h (POSIX_SIGNALS):
* s/cygwin.h (POSIX_SIGNALS):
* s/aix4-2.h (POSIX_SIGNALS): Remove definition.
* s/unixware.h:
* s/sol2-6.h: Remove comments on POSIX_SIGNALS.
* process.c (create_process):
* syssignal.h:
* sysdep.c (wait_for_termination, init_signals):
* process.c (create_process):
* msdos.c: POSIX_SIGNALS is always defined on all platforms,
remove all code that assumes the contrary.
parent ede4834a
2010-05-04 Dan Nicolaescu <dann@ics.uci.edu>
Remove POSIX_SIGNALS.
* s/usg5-4.h (POSIX_SIGNALS):
* s/netbsd.h (POSIX_SIGNALS):
* s/msdos.h (POSIX_SIGNALS):
* s/ms-w32.h (POSIX_SIGNALS):
* s/hpux11.h (POSIX_SIGNALS):
* s/gnu.h (POSIX_SIGNALS):
* s/gnu-linux.h (POSIX_SIGNALS):
* s/freebsd.h (POSIX_SIGNALS):
* s/darwin.h (POSIX_SIGNALS):
* s/cygwin.h (POSIX_SIGNALS):
* s/aix4-2.h (POSIX_SIGNALS): Remove definition.
* s/unixware.h:
* s/sol2-6.h: Remove comments on POSIX_SIGNALS.
* process.c (create_process):
* syssignal.h:
* sysdep.c (wait_for_termination, init_signals):
* process.c (create_process):
* msdos.c: POSIX_SIGNALS is always defined on all platforms,
remove all code that assumes the contrary.
2010-05-04 Glenn Morris <rgm@gnu.org>
* s/gnu-linux.h (LD_SWITCH_SYSTEM): Use LD_SWITCH_X_SITE_AUX as a shell
......
......@@ -4458,8 +4458,6 @@ setpriority (x,y,z) int x,y,z; { return 0; }
#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
#ifdef POSIX_SIGNALS
/* Augment DJGPP library POSIX signal functions. This is needed
as of DJGPP v2.01, but might be in the library in later releases. */
......@@ -4557,12 +4555,6 @@ sigprocmask (how, new_set, old_set)
return 0;
}
#else /* not POSIX_SIGNALS */
sigsetmask (x) int x; { return 0; }
sigblock (mask) int mask; { return 0; }
#endif /* not POSIX_SIGNALS */
#endif /* not __DJGPP_MINOR__ < 2 */
#ifndef HAVE_SELECT
......
......@@ -1866,7 +1866,6 @@ create_process (process, new_argv, current_dir)
#if !defined (WINDOWSNT) && defined (FD_CLOEXEC)
int wait_child_setup[2];
#endif
#ifdef POSIX_SIGNALS
sigset_t procmask;
sigset_t blocked;
struct sigaction sigint_action;
......@@ -1874,7 +1873,6 @@ create_process (process, new_argv, current_dir)
#ifdef AIX
struct sigaction sighup_action;
#endif
#endif /* POSIX_SIGNALS */
/* Use volatile to protect variables from being clobbered by longjmp. */
volatile int forkin, forkout;
volatile int pty_flag = 0;
......@@ -1979,7 +1977,6 @@ create_process (process, new_argv, current_dir)
/* Delay interrupts until we have a chance to store
the new fork's pid in its process structure */
#ifdef POSIX_SIGNALS
sigemptyset (&blocked);
#ifdef SIGCHLD
sigaddset (&blocked, SIGCHLD);
......@@ -1996,13 +1993,6 @@ create_process (process, new_argv, current_dir)
#endif
#endif /* HAVE_WORKING_VFORK */
sigprocmask (SIG_BLOCK, &blocked, &procmask);
#else /* !POSIX_SIGNALS */
#ifdef SIGCHLD
#if defined (BSD_SYSTEM)
sigsetmask (sigmask (SIGCHLD));
#endif /* BSD_SYSTEM */
#endif /* SIGCHLD */
#endif /* !POSIX_SIGNALS */
FD_SET (inchannel, &input_wait_mask);
FD_SET (inchannel, &non_keyboard_wait_mask);
......@@ -2153,15 +2143,7 @@ create_process (process, new_argv, current_dir)
signal (SIGQUIT, SIG_DFL);
/* Stop blocking signals in the child. */
#ifdef POSIX_SIGNALS
sigprocmask (SIG_SETMASK, &procmask, 0);
#else /* !POSIX_SIGNALS */
#ifdef SIGCHLD
#if defined (BSD_SYSTEM)
sigsetmask (SIGEMPTYMASK);
#endif /* BSD_SYSTEM */
#endif /* SIGCHLD */
#endif /* !POSIX_SIGNALS */
if (pty_flag)
child_setup_tty (xforkout);
......@@ -2243,7 +2225,6 @@ create_process (process, new_argv, current_dir)
/* Restore the signal state whether vfork succeeded or not.
(We will signal an error, below, if it failed.) */
#ifdef POSIX_SIGNALS
#ifdef HAVE_WORKING_VFORK
/* Restore the parent's signal handlers. */
sigaction (SIGINT, &sigint_action, 0);
......@@ -2254,13 +2235,6 @@ create_process (process, new_argv, current_dir)
#endif /* HAVE_WORKING_VFORK */
/* Stop blocking signals in the parent. */
sigprocmask (SIG_SETMASK, &procmask, 0);
#else /* !POSIX_SIGNALS */
#ifdef SIGCHLD
#if defined (BSD_SYSTEM)
sigsetmask (SIGEMPTYMASK);
#endif /* BSD_SYSTEM */
#endif /* SIGCHLD */
#endif /* !POSIX_SIGNALS */
/* Now generate the error if vfork failed. */
if (pid < 0)
......
......@@ -126,7 +126,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define CLASH_DETECTION
/* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */
#define POSIX_SIGNALS
#undef sigmask
#ifndef HAVE_LIBXMU
......
......@@ -104,7 +104,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
#define SYSV_SYSTEM_DIR 1
#define UNEXEC unexcw.o
#define POSIX_SIGNALS 1
#define LINKER $(CC)
/* Use terminfo instead of termcap. Fewer environment variables to
......
......@@ -215,10 +215,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
ioctl TIOCSCTTY. */
#define DONT_REOPEN_PTY
/* This makes create_process in process.c save and restore signal
handlers correctly. Suggested by Nozomu Ando.*/
#define POSIX_SIGNALS
/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the
stack. */
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
......
......@@ -101,10 +101,5 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define USE_MMAP_FOR_BUFFERS 1
/* Use sigprocmask(2) and friends instead of sigblock(2); the man page
of sigblock says it is obsolete. */
#define POSIX_SIGNALS 1
/* arch-tag: 426529ca-b7c4-448f-b10a-d4dcdc9c78eb
(do not change this comment) */
......@@ -187,7 +187,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define SYSV_SYSTEM_DIR /* use dirent.h */
#define POSIX /* affects getpagesize.h and systty.h */
#define POSIX_SIGNALS
#undef LIB_GCC
#define LIB_GCC
......
......@@ -28,8 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define SIGNALS_VIA_CHARACTERS
#define POSIX_SIGNALS
/* Tell Emacs that we are a terminfo based system; disable the use
of local termcap. (GNU uses ncurses.) */
#ifdef HAVE_LIBNCURSES
......
#include "hpux10-20.h"
#ifdef POSIX_SIGNALS
#undef POSIX_SIGNALS
#endif
#define POSIX_SIGNALS 1
/* SA_RESTART resets the timeout of `select', so don't use it. */
#define BROKEN_SA_RESTART
......
......@@ -123,8 +123,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\')
#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_))
/* Do we have POSIX signals? (We don't, but we don't care, either.) */
#define POSIX_SIGNALS 1
#include <sys/types.h>
struct sigaction {
int sa_flags;
......
......@@ -128,9 +128,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
/* Mode line description of a buffer's type. */
#define MODE_LINE_BINARY_TEXT(buf) (NILP(buf->buffer_file_type) ? "T" : "B")
/* Do we have POSIX signals? */
#define POSIX_SIGNALS
/* We have (the code to control) a mouse. */
#define HAVE_MOUSE
......
......@@ -80,10 +80,5 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
/* Use sigprocmask and friends instead of sigblock;
sigblock is considered obsolete on NetBSD. */
#define POSIX_SIGNALS 1
/* arch-tag: e80f364a-04e9-4faf-93cb-f36a0fe95c81
(do not change this comment) */
......@@ -49,8 +49,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#endif
/* This is the same definition as in usg5-4.h, but with sigblock/sigunblock
rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't
work if POSIX_SIGNALS is defined. It may also be appropriate for SVR4.x
rather than sighold/sigrelse, which appear to be BSD4.1 specific.
It may also be appropriate for SVR4.x
(x<2) but I'm not sure. fnf@cygnus.com */
/* This sets the name of the slave side of the PTY. On SysVr4,
grantpt(3) forks a subprocess, so keep sigchld_handler() from
......
......@@ -32,8 +32,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen
/* This is the same definition as in usg5-4.h, but with sigblock/sigunblock
rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't
work if POSIX_SIGNALS is defined. It may also be appropriate for SVR4.x
rather than sighold/sigrelse, which appear to be BSD4.1 specific.
It may also be appropriate for SVR4.x
(x<2) but I'm not sure. fnf@cygnus.com */
/* This sets the name of the slave side of the PTY. On SysVr4,
grantpt(3) forks a subprocess, so keep sigchld_handler() from
......
......@@ -61,10 +61,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define LDAV_SYMBOL "avenrun"
/* Special hacks needed to make Emacs run on this system. */
#define POSIX_SIGNALS
/* setjmp and longjmp can safely replace _setjmp and _longjmp,
but they will run slower. */
......
......@@ -419,7 +419,6 @@ wait_for_termination (pid)
else
sigpause (SIGEMPTYMASK);
#else /* not BSD_SYSTEM, and not HPUX version >= 6 */
#ifdef POSIX_SIGNALS /* would this work for GNU/Linux as well? */
#ifdef WINDOWSNT
wait (0);
break;
......@@ -434,24 +433,6 @@ wait_for_termination (pid)
sigsuspend (&empty_mask);
#endif /* not WINDOWSNT */
#else /* not POSIX_SIGNALS */
#ifdef HAVE_SYSV_SIGPAUSE
sighold (SIGCHLD);
if (0 > kill (pid, 0))
{
sigrelse (SIGCHLD);
break;
}
sigpause (SIGCHLD);
#else /* not HAVE_SYSV_SIGPAUSE */
if (0 > kill (pid, 0))
break;
/* Using sleep instead of pause avoids timing error.
If the inferior dies just before the sleep,
we lose just one second. */
sleep (1);
#endif /* not HAVE_SYSV_SIGPAUSE */
#endif /* not POSIX_SIGNALS */
#endif /* not BSD_SYSTEM, and not HPUX version >= 6 */
#else /* not subprocesses */
break;
......@@ -2090,8 +2071,6 @@ read_input_waiting ()
/* POSIX signals support - DJB */
/* Anyone with POSIX signals should have ANSI C declarations */
#ifdef POSIX_SIGNALS
sigset_t empty_mask, full_mask;
#ifndef WINDOWSNT
......@@ -2168,7 +2147,6 @@ sys_sigsetmask (sigset_t new_mask)
return (old_mask);
}
#endif /* POSIX_SIGNALS */
#if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST
static char *my_sys_siglist[NSIG];
......@@ -2181,10 +2159,8 @@ static char *my_sys_siglist[NSIG];
void
init_signals ()
{
#ifdef POSIX_SIGNALS
sigemptyset (&empty_mask);
sigfillset (&full_mask);
#endif
#if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST
if (! initialized)
......
......@@ -30,8 +30,6 @@ extern void init_signals P_ ((void));
extern pthread_t main_thread;
#endif
#ifdef POSIX_SIGNALS
/* Don't #include <signal.h>. 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
......@@ -87,15 +85,6 @@ sigset_t sys_sigsetmask P_ ((sigset_t new_mask));
#define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG)
#else /* ! defined (POSIX_SIGNALS) */
#ifndef sigunblock
#define sigunblock(SIG) \
{ SIGMASKTYPE omask = sigblock (SIGEMPTYMASK); sigsetmask (omask & ~SIG); }
#endif
#endif /* ! defined (POSIX_SIGNALS) */
#ifndef SIGMASKTYPE
#define SIGMASKTYPE int
#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