Move _longjmp, _setjmp from src/s to configure
[bpt/emacs.git] / src / s / usg5-4-common.h
1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4
2
3 Copyright (C) 1987, 1990, 1999-2012 Free Software Foundation, Inc.
4
5 Written by James Van Artsdalen of Dell Computer Corp. james@bigtex.cactus.org.
6 Subsequently improved for Dell 2.2 by Eric S. Raymond <esr@snark.thyrsus.com>.
7
8 This file is part of GNU Emacs.
9
10 GNU Emacs is free software: you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
14
15 GNU Emacs is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22
23 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct tchars.
24 But get <termio.h> first to make sure ttold.h doesn't interfere. */
25 #include <sys/wait.h>
26
27 #ifdef emacs
28 #include <sys/filio.h>
29 #include <termio.h>
30 #include <sys/ttold.h>
31 #include <signal.h>
32 #include <sys/stream.h>
33 #include <sys/stropts.h>
34 #include <sys/termios.h>
35 #endif
36
37 /* It is possible to receive SIGCHLD when there are no children
38 waiting, because a previous waitsys(2) cleaned up the carcass of child
39 without clearing the SIGCHLD pending info. So, use a non-blocking
40 wait3 instead, which maps to waitpid(2) in SysVr4. */
41 #define wait3(status, options, rusage) \
42 waitpid ((pid_t) -1, (status), (options))
43 #define WRETCODE(w) (w >> 8)
44
45 /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
46 subprocesses the usual way. But TIOCSIGNAL does work for PTYs, and
47 this is all we need. */
48 #define TIOCSIGSEND TIOCSIGNAL
49