emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100138: Remove POSIX_SIGNALS.


From: Dan Nicolaescu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100138: Remove POSIX_SIGNALS.
Date: Mon, 03 May 2010 21:00:10 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100138
committer: Dan Nicolaescu <address@hidden>
branch nick: trunk
timestamp: Mon 2010-05-03 21:00:10 -0700
message:
  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.
modified:
  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
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-05-04 03:13:35 +0000
+++ b/src/ChangeLog     2010-05-04 04:00:10 +0000
@@ -1,3 +1,26 @@
+2010-05-04  Dan Nicolaescu  <address@hidden>
+
+       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  <address@hidden>
 
        * s/gnu-linux.h (LD_SWITCH_SYSTEM): Use LD_SWITCH_X_SITE_AUX as a shell

=== modified file 'src/msdos.c'
--- a/src/msdos.c       2010-04-01 15:15:16 +0000
+++ b/src/msdos.c       2010-05-04 04:00:10 +0000
@@ -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

=== modified file 'src/process.c'
--- a/src/process.c     2010-04-29 14:29:09 +0000
+++ b/src/process.c     2010-05-04 04:00:10 +0000
@@ -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)

=== modified file 'src/s/aix4-2.h'
--- a/src/s/aix4-2.h    2010-05-04 03:06:27 +0000
+++ b/src/s/aix4-2.h    2010-05-04 04:00:10 +0000
@@ -126,7 +126,6 @@
 #define CLASH_DETECTION
 
 /* Perry Smith <address@hidden> says these are correct.  */
-#define POSIX_SIGNALS
 #undef sigmask
 
 #ifndef HAVE_LIBXMU

=== modified file 'src/s/cygwin.h'
--- a/src/s/cygwin.h    2010-04-26 17:10:09 +0000
+++ b/src/s/cygwin.h    2010-05-04 04:00:10 +0000
@@ -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

=== modified file 'src/s/darwin.h'
--- a/src/s/darwin.h    2010-05-04 03:06:27 +0000
+++ b/src/s/darwin.h    2010-05-04 04:00:10 +0000
@@ -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

=== modified file 'src/s/freebsd.h'
--- a/src/s/freebsd.h   2010-04-27 03:14:14 +0000
+++ b/src/s/freebsd.h   2010-05-04 04:00:10 +0000
@@ -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) */

=== modified file 'src/s/gnu-linux.h'
--- a/src/s/gnu-linux.h 2010-05-04 03:13:35 +0000
+++ b/src/s/gnu-linux.h 2010-05-04 04:00:10 +0000
@@ -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

=== modified file 'src/s/gnu.h'
--- a/src/s/gnu.h       2010-04-30 20:48:04 +0000
+++ b/src/s/gnu.h       2010-05-04 04:00:10 +0000
@@ -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

=== modified file 'src/s/hpux11.h'
--- a/src/s/hpux11.h    2010-01-04 05:35:18 +0000
+++ b/src/s/hpux11.h    2010-05-04 04:00:10 +0000
@@ -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
 

=== modified file 'src/s/ms-w32.h'
--- a/src/s/ms-w32.h    2010-05-01 18:28:00 +0000
+++ b/src/s/ms-w32.h    2010-05-04 04:00:10 +0000
@@ -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;

=== modified file 'src/s/msdos.h'
--- a/src/s/msdos.h     2010-04-21 05:47:56 +0000
+++ b/src/s/msdos.h     2010-05-04 04:00:10 +0000
@@ -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
 

=== modified file 'src/s/netbsd.h'
--- a/src/s/netbsd.h    2010-05-04 03:13:35 +0000
+++ b/src/s/netbsd.h    2010-05-04 04:00:10 +0000
@@ -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) */

=== modified file 'src/s/sol2-6.h'
--- a/src/s/sol2-6.h    2010-04-23 07:00:38 +0000
+++ b/src/s/sol2-6.h    2010-05-04 04:00:10 +0000
@@ -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.   address@hidden */
 /* This sets the name of the slave side of the PTY.  On SysVr4,
    grantpt(3) forks a subprocess, so keep sigchld_handler() from

=== modified file 'src/s/unixware.h'
--- a/src/s/unixware.h  2010-04-27 08:09:01 +0000
+++ b/src/s/unixware.h  2010-05-04 04:00:10 +0000
@@ -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.   address@hidden */
 /* This sets the name of the slave side of the PTY.  On SysVr4,
    grantpt(3) forks a subprocess, so keep sigchld_handler() from

=== modified file 'src/s/usg5-4.h'
--- a/src/s/usg5-4.h    2010-03-30 02:47:23 +0000
+++ b/src/s/usg5-4.h    2010-05-04 04:00:10 +0000
@@ -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.  */
 

=== modified file 'src/sysdep.c'
--- a/src/sysdep.c      2010-05-01 20:14:10 +0000
+++ b/src/sysdep.c      2010-05-04 04:00:10 +0000
@@ -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)

=== modified file 'src/syssignal.h'
--- a/src/syssignal.h   2010-03-22 19:51:59 +0000
+++ b/src/syssignal.h   2010-05-04 04:00:10 +0000
@@ -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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]