+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
\f
#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. */
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
#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;
#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;
/* 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);
#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);
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);
/* 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);
#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)
#define CLASH_DETECTION
/* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */
-#define POSIX_SIGNALS
#undef sigmask
#ifndef HAVE_LIBXMU
#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
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
#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) */
#define SYSV_SYSTEM_DIR /* use dirent.h */
#define POSIX /* affects getpagesize.h and systty.h */
-#define POSIX_SIGNALS
#undef LIB_GCC
#define LIB_GCC
#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
#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;
/* 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
#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) */
#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
#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
#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. */
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;
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;
/* POSIX signals support - DJB */
/* Anyone with POSIX signals should have ANSI C declarations */
-#ifdef POSIX_SIGNALS
-
sigset_t empty_mask, full_mask;
#ifndef WINDOWSNT
return (old_mask);
}
-#endif /* POSIX_SIGNALS */
\f
#if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST
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)
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
#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