changeset 108234:06c34f190db1

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.
author Dan Nicolaescu <dann@ics.uci.edu>
date Mon, 03 May 2010 21:00:10 -0700
parents de744425d5c4
children 9aa39b975b8a
files src/ChangeLog src/msdos.c src/process.c src/s/aix4-2.h src/s/cygwin.h src/s/darwin.h src/s/freebsd.h src/s/gnu-linux.h src/s/gnu.h src/s/hpux11.h src/s/ms-w32.h src/s/msdos.h src/s/netbsd.h src/s/sol2-6.h src/s/unixware.h src/s/usg5-4.h src/sysdep.c src/syssignal.h
diffstat 18 files changed, 27 insertions(+), 106 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon May 03 20:33:04 2010 -0700
+++ b/src/ChangeLog	Mon May 03 21:00:10 2010 -0700
@@ -1,3 +1,26 @@
+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
--- a/src/msdos.c	Mon May 03 20:33:04 2010 -0700
+++ b/src/msdos.c	Mon May 03 21:00:10 2010 -0700
@@ -4458,8 +4458,6 @@
 
 #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 @@
   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
--- a/src/process.c	Mon May 03 20:33:04 2010 -0700
+++ b/src/process.c	Mon May 03 21:00:10 2010 -0700
@@ -1866,7 +1866,6 @@
 #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 @@
 #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 @@
 
   /* 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 @@
 #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 @@
 	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 @@
 
   /* 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 @@
 #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)
--- a/src/s/aix4-2.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/aix4-2.h	Mon May 03 21:00:10 2010 -0700
@@ -126,7 +126,6 @@
 #define CLASH_DETECTION
 
 /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct.  */
-#define POSIX_SIGNALS
 #undef sigmask
 
 #ifndef HAVE_LIBXMU
--- a/src/s/cygwin.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/cygwin.h	Mon May 03 21:00:10 2010 -0700
@@ -104,7 +104,6 @@
 #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
--- a/src/s/darwin.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/darwin.h	Mon May 03 21:00:10 2010 -0700
@@ -215,10 +215,6 @@
    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
--- a/src/s/freebsd.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/freebsd.h	Mon May 03 21:00:10 2010 -0700
@@ -101,10 +101,5 @@
 
 #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) */
--- a/src/s/gnu-linux.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/gnu-linux.h	Mon May 03 21:00:10 2010 -0700
@@ -187,7 +187,6 @@
 #define SYSV_SYSTEM_DIR       /* use dirent.h */
 
 #define POSIX                 /* affects getpagesize.h and systty.h */
-#define POSIX_SIGNALS
 
 #undef LIB_GCC
 #define LIB_GCC
--- a/src/s/gnu.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/gnu.h	Mon May 03 21:00:10 2010 -0700
@@ -28,8 +28,6 @@
 
 #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
--- a/src/s/hpux11.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/hpux11.h	Mon May 03 21:00:10 2010 -0700
@@ -1,10 +1,5 @@
 #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
 
--- a/src/s/ms-w32.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/ms-w32.h	Mon May 03 21:00:10 2010 -0700
@@ -123,8 +123,6 @@
 #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;
--- a/src/s/msdos.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/msdos.h	Mon May 03 21:00:10 2010 -0700
@@ -128,9 +128,6 @@
 /* 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
 
--- a/src/s/netbsd.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/netbsd.h	Mon May 03 21:00:10 2010 -0700
@@ -80,10 +80,5 @@
 
 #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) */
--- a/src/s/sol2-6.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/sol2-6.h	Mon May 03 21:00:10 2010 -0700
@@ -49,8 +49,8 @@
 #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
--- a/src/s/unixware.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/unixware.h	Mon May 03 21:00:10 2010 -0700
@@ -32,8 +32,8 @@
 #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
--- a/src/s/usg5-4.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/s/usg5-4.h	Mon May 03 21:00:10 2010 -0700
@@ -61,10 +61,6 @@
 
 #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.  */
 
--- a/src/sysdep.c	Mon May 03 20:33:04 2010 -0700
+++ b/src/sysdep.c	Mon May 03 21:00:10 2010 -0700
@@ -419,7 +419,6 @@
       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 @@
 
       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 @@
 /* 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 @@
   return (old_mask);
 }
 
-#endif /* POSIX_SIGNALS */
 
 #if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST
 static char *my_sys_siglist[NSIG];
@@ -2181,10 +2159,8 @@
 void
 init_signals ()
 {
-#ifdef POSIX_SIGNALS
   sigemptyset (&empty_mask);
   sigfillset (&full_mask);
-#endif
 
 #if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST
   if (! initialized)
--- a/src/syssignal.h	Mon May 03 20:33:04 2010 -0700
+++ b/src/syssignal.h	Mon May 03 21:00:10 2010 -0700
@@ -30,8 +30,6 @@
 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 @@
 
 #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