diff options
| author | Dan Nicolaescu | 2010-05-03 21:00:10 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-05-03 21:00:10 -0700 |
| commit | ef03a4e61efa0003b1b6be961b58297ccfddc664 (patch) | |
| tree | 9a644546e94468429dfac802c3f885cdfa886d08 /src | |
| parent | ede4834a2f3f657ff79a730b52605ad8d3ef533e (diff) | |
| download | emacs-ef03a4e61efa0003b1b6be961b58297ccfddc664.tar.gz emacs-ef03a4e61efa0003b1b6be961b58297ccfddc664.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 23 | ||||
| -rw-r--r-- | src/msdos.c | 8 | ||||
| -rw-r--r-- | src/process.c | 26 | ||||
| -rw-r--r-- | src/s/aix4-2.h | 1 | ||||
| -rw-r--r-- | src/s/cygwin.h | 1 | ||||
| -rw-r--r-- | src/s/darwin.h | 4 | ||||
| -rw-r--r-- | src/s/freebsd.h | 5 | ||||
| -rw-r--r-- | src/s/gnu-linux.h | 1 | ||||
| -rw-r--r-- | src/s/gnu.h | 2 | ||||
| -rw-r--r-- | src/s/hpux11.h | 5 | ||||
| -rw-r--r-- | src/s/ms-w32.h | 2 | ||||
| -rw-r--r-- | src/s/msdos.h | 3 | ||||
| -rw-r--r-- | src/s/netbsd.h | 5 | ||||
| -rw-r--r-- | src/s/sol2-6.h | 4 | ||||
| -rw-r--r-- | src/s/unixware.h | 4 | ||||
| -rw-r--r-- | src/s/usg5-4.h | 4 | ||||
| -rw-r--r-- | src/sysdep.c | 24 | ||||
| -rw-r--r-- | src/syssignal.h | 11 |
18 files changed, 27 insertions, 106 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4b24f856125..797ab693639 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | 2010-05-04 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | Remove POSIX_SIGNALS. | ||
| 4 | * s/usg5-4.h (POSIX_SIGNALS): | ||
| 5 | * s/netbsd.h (POSIX_SIGNALS): | ||
| 6 | * s/msdos.h (POSIX_SIGNALS): | ||
| 7 | * s/ms-w32.h (POSIX_SIGNALS): | ||
| 8 | * s/hpux11.h (POSIX_SIGNALS): | ||
| 9 | * s/gnu.h (POSIX_SIGNALS): | ||
| 10 | * s/gnu-linux.h (POSIX_SIGNALS): | ||
| 11 | * s/freebsd.h (POSIX_SIGNALS): | ||
| 12 | * s/darwin.h (POSIX_SIGNALS): | ||
| 13 | * s/cygwin.h (POSIX_SIGNALS): | ||
| 14 | * s/aix4-2.h (POSIX_SIGNALS): Remove definition. | ||
| 15 | * s/unixware.h: | ||
| 16 | * s/sol2-6.h: Remove comments on POSIX_SIGNALS. | ||
| 17 | * process.c (create_process): | ||
| 18 | * syssignal.h: | ||
| 19 | * sysdep.c (wait_for_termination, init_signals): | ||
| 20 | * process.c (create_process): | ||
| 21 | * msdos.c: POSIX_SIGNALS is always defined on all platforms, | ||
| 22 | remove all code that assumes the contrary. | ||
| 23 | |||
| 1 | 2010-05-04 Glenn Morris <rgm@gnu.org> | 24 | 2010-05-04 Glenn Morris <rgm@gnu.org> |
| 2 | 25 | ||
| 3 | * s/gnu-linux.h (LD_SWITCH_SYSTEM): Use LD_SWITCH_X_SITE_AUX as a shell | 26 | * s/gnu-linux.h (LD_SWITCH_SYSTEM): Use LD_SWITCH_X_SITE_AUX as a shell |
diff --git a/src/msdos.c b/src/msdos.c index 6cde7cd6ebc..28d621f8cc1 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -4458,8 +4458,6 @@ setpriority (x,y,z) int x,y,z; { return 0; } | |||
| 4458 | 4458 | ||
| 4459 | #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2 | 4459 | #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2 |
| 4460 | 4460 | ||
| 4461 | #ifdef POSIX_SIGNALS | ||
| 4462 | |||
| 4463 | /* Augment DJGPP library POSIX signal functions. This is needed | 4461 | /* Augment DJGPP library POSIX signal functions. This is needed |
| 4464 | as of DJGPP v2.01, but might be in the library in later releases. */ | 4462 | as of DJGPP v2.01, but might be in the library in later releases. */ |
| 4465 | 4463 | ||
| @@ -4557,12 +4555,6 @@ sigprocmask (how, new_set, old_set) | |||
| 4557 | return 0; | 4555 | return 0; |
| 4558 | } | 4556 | } |
| 4559 | 4557 | ||
| 4560 | #else /* not POSIX_SIGNALS */ | ||
| 4561 | |||
| 4562 | sigsetmask (x) int x; { return 0; } | ||
| 4563 | sigblock (mask) int mask; { return 0; } | ||
| 4564 | |||
| 4565 | #endif /* not POSIX_SIGNALS */ | ||
| 4566 | #endif /* not __DJGPP_MINOR__ < 2 */ | 4558 | #endif /* not __DJGPP_MINOR__ < 2 */ |
| 4567 | 4559 | ||
| 4568 | #ifndef HAVE_SELECT | 4560 | #ifndef HAVE_SELECT |
diff --git a/src/process.c b/src/process.c index 29983b22858..a09ac297a2d 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1866,7 +1866,6 @@ create_process (process, new_argv, current_dir) | |||
| 1866 | #if !defined (WINDOWSNT) && defined (FD_CLOEXEC) | 1866 | #if !defined (WINDOWSNT) && defined (FD_CLOEXEC) |
| 1867 | int wait_child_setup[2]; | 1867 | int wait_child_setup[2]; |
| 1868 | #endif | 1868 | #endif |
| 1869 | #ifdef POSIX_SIGNALS | ||
| 1870 | sigset_t procmask; | 1869 | sigset_t procmask; |
| 1871 | sigset_t blocked; | 1870 | sigset_t blocked; |
| 1872 | struct sigaction sigint_action; | 1871 | struct sigaction sigint_action; |
| @@ -1874,7 +1873,6 @@ create_process (process, new_argv, current_dir) | |||
| 1874 | #ifdef AIX | 1873 | #ifdef AIX |
| 1875 | struct sigaction sighup_action; | 1874 | struct sigaction sighup_action; |
| 1876 | #endif | 1875 | #endif |
| 1877 | #endif /* POSIX_SIGNALS */ | ||
| 1878 | /* Use volatile to protect variables from being clobbered by longjmp. */ | 1876 | /* Use volatile to protect variables from being clobbered by longjmp. */ |
| 1879 | volatile int forkin, forkout; | 1877 | volatile int forkin, forkout; |
| 1880 | volatile int pty_flag = 0; | 1878 | volatile int pty_flag = 0; |
| @@ -1979,7 +1977,6 @@ create_process (process, new_argv, current_dir) | |||
| 1979 | 1977 | ||
| 1980 | /* Delay interrupts until we have a chance to store | 1978 | /* Delay interrupts until we have a chance to store |
| 1981 | the new fork's pid in its process structure */ | 1979 | the new fork's pid in its process structure */ |
| 1982 | #ifdef POSIX_SIGNALS | ||
| 1983 | sigemptyset (&blocked); | 1980 | sigemptyset (&blocked); |
| 1984 | #ifdef SIGCHLD | 1981 | #ifdef SIGCHLD |
| 1985 | sigaddset (&blocked, SIGCHLD); | 1982 | sigaddset (&blocked, SIGCHLD); |
| @@ -1996,13 +1993,6 @@ create_process (process, new_argv, current_dir) | |||
| 1996 | #endif | 1993 | #endif |
| 1997 | #endif /* HAVE_WORKING_VFORK */ | 1994 | #endif /* HAVE_WORKING_VFORK */ |
| 1998 | sigprocmask (SIG_BLOCK, &blocked, &procmask); | 1995 | sigprocmask (SIG_BLOCK, &blocked, &procmask); |
| 1999 | #else /* !POSIX_SIGNALS */ | ||
| 2000 | #ifdef SIGCHLD | ||
| 2001 | #if defined (BSD_SYSTEM) | ||
| 2002 | sigsetmask (sigmask (SIGCHLD)); | ||
| 2003 | #endif /* BSD_SYSTEM */ | ||
| 2004 | #endif /* SIGCHLD */ | ||
| 2005 | #endif /* !POSIX_SIGNALS */ | ||
| 2006 | 1996 | ||
| 2007 | FD_SET (inchannel, &input_wait_mask); | 1997 | FD_SET (inchannel, &input_wait_mask); |
| 2008 | FD_SET (inchannel, &non_keyboard_wait_mask); | 1998 | FD_SET (inchannel, &non_keyboard_wait_mask); |
| @@ -2153,15 +2143,7 @@ create_process (process, new_argv, current_dir) | |||
| 2153 | signal (SIGQUIT, SIG_DFL); | 2143 | signal (SIGQUIT, SIG_DFL); |
| 2154 | 2144 | ||
| 2155 | /* Stop blocking signals in the child. */ | 2145 | /* Stop blocking signals in the child. */ |
| 2156 | #ifdef POSIX_SIGNALS | ||
| 2157 | sigprocmask (SIG_SETMASK, &procmask, 0); | 2146 | sigprocmask (SIG_SETMASK, &procmask, 0); |
| 2158 | #else /* !POSIX_SIGNALS */ | ||
| 2159 | #ifdef SIGCHLD | ||
| 2160 | #if defined (BSD_SYSTEM) | ||
| 2161 | sigsetmask (SIGEMPTYMASK); | ||
| 2162 | #endif /* BSD_SYSTEM */ | ||
| 2163 | #endif /* SIGCHLD */ | ||
| 2164 | #endif /* !POSIX_SIGNALS */ | ||
| 2165 | 2147 | ||
| 2166 | if (pty_flag) | 2148 | if (pty_flag) |
| 2167 | child_setup_tty (xforkout); | 2149 | child_setup_tty (xforkout); |
| @@ -2243,7 +2225,6 @@ create_process (process, new_argv, current_dir) | |||
| 2243 | 2225 | ||
| 2244 | /* Restore the signal state whether vfork succeeded or not. | 2226 | /* Restore the signal state whether vfork succeeded or not. |
| 2245 | (We will signal an error, below, if it failed.) */ | 2227 | (We will signal an error, below, if it failed.) */ |
| 2246 | #ifdef POSIX_SIGNALS | ||
| 2247 | #ifdef HAVE_WORKING_VFORK | 2228 | #ifdef HAVE_WORKING_VFORK |
| 2248 | /* Restore the parent's signal handlers. */ | 2229 | /* Restore the parent's signal handlers. */ |
| 2249 | sigaction (SIGINT, &sigint_action, 0); | 2230 | sigaction (SIGINT, &sigint_action, 0); |
| @@ -2254,13 +2235,6 @@ create_process (process, new_argv, current_dir) | |||
| 2254 | #endif /* HAVE_WORKING_VFORK */ | 2235 | #endif /* HAVE_WORKING_VFORK */ |
| 2255 | /* Stop blocking signals in the parent. */ | 2236 | /* Stop blocking signals in the parent. */ |
| 2256 | sigprocmask (SIG_SETMASK, &procmask, 0); | 2237 | sigprocmask (SIG_SETMASK, &procmask, 0); |
| 2257 | #else /* !POSIX_SIGNALS */ | ||
| 2258 | #ifdef SIGCHLD | ||
| 2259 | #if defined (BSD_SYSTEM) | ||
| 2260 | sigsetmask (SIGEMPTYMASK); | ||
| 2261 | #endif /* BSD_SYSTEM */ | ||
| 2262 | #endif /* SIGCHLD */ | ||
| 2263 | #endif /* !POSIX_SIGNALS */ | ||
| 2264 | 2238 | ||
| 2265 | /* Now generate the error if vfork failed. */ | 2239 | /* Now generate the error if vfork failed. */ |
| 2266 | if (pid < 0) | 2240 | if (pid < 0) |
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h index b7de0312f7b..0a36c8ff0df 100644 --- a/src/s/aix4-2.h +++ b/src/s/aix4-2.h | |||
| @@ -126,7 +126,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 126 | #define CLASH_DETECTION | 126 | #define CLASH_DETECTION |
| 127 | 127 | ||
| 128 | /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */ | 128 | /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct. */ |
| 129 | #define POSIX_SIGNALS | ||
| 130 | #undef sigmask | 129 | #undef sigmask |
| 131 | 130 | ||
| 132 | #ifndef HAVE_LIBXMU | 131 | #ifndef HAVE_LIBXMU |
diff --git a/src/s/cygwin.h b/src/s/cygwin.h index b2ade390c7e..a337f156914 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h | |||
| @@ -104,7 +104,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 104 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | 104 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) |
| 105 | #define SYSV_SYSTEM_DIR 1 | 105 | #define SYSV_SYSTEM_DIR 1 |
| 106 | #define UNEXEC unexcw.o | 106 | #define UNEXEC unexcw.o |
| 107 | #define POSIX_SIGNALS 1 | ||
| 108 | #define LINKER $(CC) | 107 | #define LINKER $(CC) |
| 109 | 108 | ||
| 110 | /* Use terminfo instead of termcap. Fewer environment variables to | 109 | /* Use terminfo instead of termcap. Fewer environment variables to |
diff --git a/src/s/darwin.h b/src/s/darwin.h index de8369ddae2..6743b65cce6 100644 --- a/src/s/darwin.h +++ b/src/s/darwin.h | |||
| @@ -215,10 +215,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 215 | ioctl TIOCSCTTY. */ | 215 | ioctl TIOCSCTTY. */ |
| 216 | #define DONT_REOPEN_PTY | 216 | #define DONT_REOPEN_PTY |
| 217 | 217 | ||
| 218 | /* This makes create_process in process.c save and restore signal | ||
| 219 | handlers correctly. Suggested by Nozomu Ando.*/ | ||
| 220 | #define POSIX_SIGNALS | ||
| 221 | |||
| 222 | /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the | 218 | /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the |
| 223 | stack. */ | 219 | stack. */ |
| 224 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS | 220 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS |
diff --git a/src/s/freebsd.h b/src/s/freebsd.h index 6c4da8f0863..178eeffb1c3 100644 --- a/src/s/freebsd.h +++ b/src/s/freebsd.h | |||
| @@ -101,10 +101,5 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 101 | 101 | ||
| 102 | #define USE_MMAP_FOR_BUFFERS 1 | 102 | #define USE_MMAP_FOR_BUFFERS 1 |
| 103 | 103 | ||
| 104 | /* Use sigprocmask(2) and friends instead of sigblock(2); the man page | ||
| 105 | of sigblock says it is obsolete. */ | ||
| 106 | |||
| 107 | #define POSIX_SIGNALS 1 | ||
| 108 | |||
| 109 | /* arch-tag: 426529ca-b7c4-448f-b10a-d4dcdc9c78eb | 104 | /* arch-tag: 426529ca-b7c4-448f-b10a-d4dcdc9c78eb |
| 110 | (do not change this comment) */ | 105 | (do not change this comment) */ |
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index 73241f0c21f..218af42bac4 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h | |||
| @@ -187,7 +187,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 187 | #define SYSV_SYSTEM_DIR /* use dirent.h */ | 187 | #define SYSV_SYSTEM_DIR /* use dirent.h */ |
| 188 | 188 | ||
| 189 | #define POSIX /* affects getpagesize.h and systty.h */ | 189 | #define POSIX /* affects getpagesize.h and systty.h */ |
| 190 | #define POSIX_SIGNALS | ||
| 191 | 190 | ||
| 192 | #undef LIB_GCC | 191 | #undef LIB_GCC |
| 193 | #define LIB_GCC | 192 | #define LIB_GCC |
diff --git a/src/s/gnu.h b/src/s/gnu.h index 13679a1db4e..946eaa6512b 100644 --- a/src/s/gnu.h +++ b/src/s/gnu.h | |||
| @@ -28,8 +28,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 28 | 28 | ||
| 29 | #define SIGNALS_VIA_CHARACTERS | 29 | #define SIGNALS_VIA_CHARACTERS |
| 30 | 30 | ||
| 31 | #define POSIX_SIGNALS | ||
| 32 | |||
| 33 | /* Tell Emacs that we are a terminfo based system; disable the use | 31 | /* Tell Emacs that we are a terminfo based system; disable the use |
| 34 | of local termcap. (GNU uses ncurses.) */ | 32 | of local termcap. (GNU uses ncurses.) */ |
| 35 | #ifdef HAVE_LIBNCURSES | 33 | #ifdef HAVE_LIBNCURSES |
diff --git a/src/s/hpux11.h b/src/s/hpux11.h index 3382395a90f..48f60841047 100644 --- a/src/s/hpux11.h +++ b/src/s/hpux11.h | |||
| @@ -1,10 +1,5 @@ | |||
| 1 | #include "hpux10-20.h" | 1 | #include "hpux10-20.h" |
| 2 | 2 | ||
| 3 | #ifdef POSIX_SIGNALS | ||
| 4 | #undef POSIX_SIGNALS | ||
| 5 | #endif | ||
| 6 | #define POSIX_SIGNALS 1 | ||
| 7 | |||
| 8 | /* SA_RESTART resets the timeout of `select', so don't use it. */ | 3 | /* SA_RESTART resets the timeout of `select', so don't use it. */ |
| 9 | #define BROKEN_SA_RESTART | 4 | #define BROKEN_SA_RESTART |
| 10 | 5 | ||
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index 74e91c1e816..deb23322d9b 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h | |||
| @@ -123,8 +123,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 123 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') | 123 | #define IS_DIRECTORY_SEP(_c_) ((_c_) == '/' || (_c_) == '\\') |
| 124 | #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) | 124 | #define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_) || IS_DEVICE_SEP (_c_)) |
| 125 | 125 | ||
| 126 | /* Do we have POSIX signals? (We don't, but we don't care, either.) */ | ||
| 127 | #define POSIX_SIGNALS 1 | ||
| 128 | #include <sys/types.h> | 126 | #include <sys/types.h> |
| 129 | struct sigaction { | 127 | struct sigaction { |
| 130 | int sa_flags; | 128 | int sa_flags; |
diff --git a/src/s/msdos.h b/src/s/msdos.h index bcef83ba03e..8cd9bfc8491 100644 --- a/src/s/msdos.h +++ b/src/s/msdos.h | |||
| @@ -128,9 +128,6 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ | |||
| 128 | /* Mode line description of a buffer's type. */ | 128 | /* Mode line description of a buffer's type. */ |
| 129 | #define MODE_LINE_BINARY_TEXT(buf) (NILP(buf->buffer_file_type) ? "T" : "B") | 129 | #define MODE_LINE_BINARY_TEXT(buf) (NILP(buf->buffer_file_type) ? "T" : "B") |
| 130 | 130 | ||
| 131 | /* Do we have POSIX signals? */ | ||
| 132 | #define POSIX_SIGNALS | ||
| 133 | |||
| 134 | /* We have (the code to control) a mouse. */ | 131 | /* We have (the code to control) a mouse. */ |
| 135 | #define HAVE_MOUSE | 132 | #define HAVE_MOUSE |
| 136 | 133 | ||
diff --git a/src/s/netbsd.h b/src/s/netbsd.h index 2e48c3580d3..147b2d1ad32 100644 --- a/src/s/netbsd.h +++ b/src/s/netbsd.h | |||
| @@ -80,10 +80,5 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 80 | 80 | ||
| 81 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS | 81 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS |
| 82 | 82 | ||
| 83 | /* Use sigprocmask and friends instead of sigblock; | ||
| 84 | sigblock is considered obsolete on NetBSD. */ | ||
| 85 | |||
| 86 | #define POSIX_SIGNALS 1 | ||
| 87 | |||
| 88 | /* arch-tag: e80f364a-04e9-4faf-93cb-f36a0fe95c81 | 83 | /* arch-tag: e80f364a-04e9-4faf-93cb-f36a0fe95c81 |
| 89 | (do not change this comment) */ | 84 | (do not change this comment) */ |
diff --git a/src/s/sol2-6.h b/src/s/sol2-6.h index 5ca5cfbc0d0..c05387d47f4 100644 --- a/src/s/sol2-6.h +++ b/src/s/sol2-6.h | |||
| @@ -49,8 +49,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | /* This is the same definition as in usg5-4.h, but with sigblock/sigunblock | 51 | /* This is the same definition as in usg5-4.h, but with sigblock/sigunblock |
| 52 | rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't | 52 | rather than sighold/sigrelse, which appear to be BSD4.1 specific. |
| 53 | work if POSIX_SIGNALS is defined. It may also be appropriate for SVR4.x | 53 | It may also be appropriate for SVR4.x |
| 54 | (x<2) but I'm not sure. fnf@cygnus.com */ | 54 | (x<2) but I'm not sure. fnf@cygnus.com */ |
| 55 | /* This sets the name of the slave side of the PTY. On SysVr4, | 55 | /* This sets the name of the slave side of the PTY. On SysVr4, |
| 56 | grantpt(3) forks a subprocess, so keep sigchld_handler() from | 56 | grantpt(3) forks a subprocess, so keep sigchld_handler() from |
diff --git a/src/s/unixware.h b/src/s/unixware.h index d1e8748d913..6e42a0d4c56 100644 --- a/src/s/unixware.h +++ b/src/s/unixware.h | |||
| @@ -32,8 +32,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 32 | #define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen | 32 | #define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen |
| 33 | 33 | ||
| 34 | /* This is the same definition as in usg5-4.h, but with sigblock/sigunblock | 34 | /* This is the same definition as in usg5-4.h, but with sigblock/sigunblock |
| 35 | rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't | 35 | rather than sighold/sigrelse, which appear to be BSD4.1 specific. |
| 36 | work if POSIX_SIGNALS is defined. It may also be appropriate for SVR4.x | 36 | It may also be appropriate for SVR4.x |
| 37 | (x<2) but I'm not sure. fnf@cygnus.com */ | 37 | (x<2) but I'm not sure. fnf@cygnus.com */ |
| 38 | /* This sets the name of the slave side of the PTY. On SysVr4, | 38 | /* This sets the name of the slave side of the PTY. On SysVr4, |
| 39 | grantpt(3) forks a subprocess, so keep sigchld_handler() from | 39 | grantpt(3) forks a subprocess, so keep sigchld_handler() from |
diff --git a/src/s/usg5-4.h b/src/s/usg5-4.h index b02caf9a3da..8907781294f 100644 --- a/src/s/usg5-4.h +++ b/src/s/usg5-4.h | |||
| @@ -61,10 +61,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 61 | 61 | ||
| 62 | #define LDAV_SYMBOL "avenrun" | 62 | #define LDAV_SYMBOL "avenrun" |
| 63 | 63 | ||
| 64 | /* Special hacks needed to make Emacs run on this system. */ | ||
| 65 | |||
| 66 | #define POSIX_SIGNALS | ||
| 67 | |||
| 68 | /* setjmp and longjmp can safely replace _setjmp and _longjmp, | 64 | /* setjmp and longjmp can safely replace _setjmp and _longjmp, |
| 69 | but they will run slower. */ | 65 | but they will run slower. */ |
| 70 | 66 | ||
diff --git a/src/sysdep.c b/src/sysdep.c index 7a9872e13c4..38492c1bb00 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -419,7 +419,6 @@ wait_for_termination (pid) | |||
| 419 | else | 419 | else |
| 420 | sigpause (SIGEMPTYMASK); | 420 | sigpause (SIGEMPTYMASK); |
| 421 | #else /* not BSD_SYSTEM, and not HPUX version >= 6 */ | 421 | #else /* not BSD_SYSTEM, and not HPUX version >= 6 */ |
| 422 | #ifdef POSIX_SIGNALS /* would this work for GNU/Linux as well? */ | ||
| 423 | #ifdef WINDOWSNT | 422 | #ifdef WINDOWSNT |
| 424 | wait (0); | 423 | wait (0); |
| 425 | break; | 424 | break; |
| @@ -434,24 +433,6 @@ wait_for_termination (pid) | |||
| 434 | 433 | ||
| 435 | sigsuspend (&empty_mask); | 434 | sigsuspend (&empty_mask); |
| 436 | #endif /* not WINDOWSNT */ | 435 | #endif /* not WINDOWSNT */ |
| 437 | #else /* not POSIX_SIGNALS */ | ||
| 438 | #ifdef HAVE_SYSV_SIGPAUSE | ||
| 439 | sighold (SIGCHLD); | ||
| 440 | if (0 > kill (pid, 0)) | ||
| 441 | { | ||
| 442 | sigrelse (SIGCHLD); | ||
| 443 | break; | ||
| 444 | } | ||
| 445 | sigpause (SIGCHLD); | ||
| 446 | #else /* not HAVE_SYSV_SIGPAUSE */ | ||
| 447 | if (0 > kill (pid, 0)) | ||
| 448 | break; | ||
| 449 | /* Using sleep instead of pause avoids timing error. | ||
| 450 | If the inferior dies just before the sleep, | ||
| 451 | we lose just one second. */ | ||
| 452 | sleep (1); | ||
| 453 | #endif /* not HAVE_SYSV_SIGPAUSE */ | ||
| 454 | #endif /* not POSIX_SIGNALS */ | ||
| 455 | #endif /* not BSD_SYSTEM, and not HPUX version >= 6 */ | 436 | #endif /* not BSD_SYSTEM, and not HPUX version >= 6 */ |
| 456 | #else /* not subprocesses */ | 437 | #else /* not subprocesses */ |
| 457 | break; | 438 | break; |
| @@ -2090,8 +2071,6 @@ read_input_waiting () | |||
| 2090 | /* POSIX signals support - DJB */ | 2071 | /* POSIX signals support - DJB */ |
| 2091 | /* Anyone with POSIX signals should have ANSI C declarations */ | 2072 | /* Anyone with POSIX signals should have ANSI C declarations */ |
| 2092 | 2073 | ||
| 2093 | #ifdef POSIX_SIGNALS | ||
| 2094 | |||
| 2095 | sigset_t empty_mask, full_mask; | 2074 | sigset_t empty_mask, full_mask; |
| 2096 | 2075 | ||
| 2097 | #ifndef WINDOWSNT | 2076 | #ifndef WINDOWSNT |
| @@ -2168,7 +2147,6 @@ sys_sigsetmask (sigset_t new_mask) | |||
| 2168 | return (old_mask); | 2147 | return (old_mask); |
| 2169 | } | 2148 | } |
| 2170 | 2149 | ||
| 2171 | #endif /* POSIX_SIGNALS */ | ||
| 2172 | 2150 | ||
| 2173 | #if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST | 2151 | #if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST |
| 2174 | static char *my_sys_siglist[NSIG]; | 2152 | static char *my_sys_siglist[NSIG]; |
| @@ -2181,10 +2159,8 @@ static char *my_sys_siglist[NSIG]; | |||
| 2181 | void | 2159 | void |
| 2182 | init_signals () | 2160 | init_signals () |
| 2183 | { | 2161 | { |
| 2184 | #ifdef POSIX_SIGNALS | ||
| 2185 | sigemptyset (&empty_mask); | 2162 | sigemptyset (&empty_mask); |
| 2186 | sigfillset (&full_mask); | 2163 | sigfillset (&full_mask); |
| 2187 | #endif | ||
| 2188 | 2164 | ||
| 2189 | #if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST | 2165 | #if !defined HAVE_STRSIGNAL && !HAVE_DECL_SYS_SIGLIST |
| 2190 | if (! initialized) | 2166 | if (! initialized) |
diff --git a/src/syssignal.h b/src/syssignal.h index f435d338594..9a145b78cb1 100644 --- a/src/syssignal.h +++ b/src/syssignal.h | |||
| @@ -30,8 +30,6 @@ extern void init_signals P_ ((void)); | |||
| 30 | extern pthread_t main_thread; | 30 | extern pthread_t main_thread; |
| 31 | #endif | 31 | #endif |
| 32 | 32 | ||
| 33 | #ifdef POSIX_SIGNALS | ||
| 34 | |||
| 35 | /* Don't #include <signal.h>. That header should always be #included | 33 | /* Don't #include <signal.h>. That header should always be #included |
| 36 | before "config.h", because some configuration files (like s/hpux.h) | 34 | before "config.h", because some configuration files (like s/hpux.h) |
| 37 | indicate that SIGIO doesn't work by #undef-ing SIGIO. If this file | 35 | 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)); | |||
| 87 | 85 | ||
| 88 | #define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG) | 86 | #define sys_sigdel(MASK,SIG) sigdelset (&MASK,SIG) |
| 89 | 87 | ||
| 90 | #else /* ! defined (POSIX_SIGNALS) */ | ||
| 91 | |||
| 92 | #ifndef sigunblock | ||
| 93 | #define sigunblock(SIG) \ | ||
| 94 | { SIGMASKTYPE omask = sigblock (SIGEMPTYMASK); sigsetmask (omask & ~SIG); } | ||
| 95 | #endif | ||
| 96 | |||
| 97 | #endif /* ! defined (POSIX_SIGNALS) */ | ||
| 98 | |||
| 99 | #ifndef SIGMASKTYPE | 88 | #ifndef SIGMASKTYPE |
| 100 | #define SIGMASKTYPE int | 89 | #define SIGMASKTYPE int |
| 101 | #endif | 90 | #endif |