0
|
1 /* Synched up with: FSF 19.31. */
|
|
2
|
|
3 #include "irix3-3.h"
|
|
4
|
|
5 #define USG5_3
|
|
6 #define IRIX4
|
|
7
|
|
8 #define HAVE_ALLOCA
|
|
9 #ifndef NOT_C_CODE
|
|
10 #include <alloca.h>
|
|
11 #endif
|
|
12
|
|
13 #undef NEED_SIOCTL
|
|
14
|
|
15 /* Make process_send_signal work by "typing" a signal character on the pty. */
|
|
16 #define SIGNALS_VIA_CHARACTERS
|
|
17
|
|
18 /* use K&R C */
|
|
19 /* XEmacs change -- use ANSI, not K&R */
|
|
20 #ifndef __GNUC__
|
|
21 #define C_SWITCH_SYSTEM -xansi
|
|
22 #endif
|
|
23
|
|
24 /* SGI has all the fancy wait stuff, but we can't include sys/wait.h
|
|
25 because it defines BIG_ENDIAN and LITTLE_ENDIAN (ugh!.) Instead
|
|
26 we'll just define WNOHANG right here.
|
|
27 (An implicit decl is good enough for wait3.) */
|
|
28 /* [XEmacs: Now that we don't use BIG_ENDIAN/LITTLE_ENDIAN, it's safe
|
|
29 to include wait.h. Should something change here?] */
|
|
30
|
|
31 #define WNOHANG 0x1
|
|
32
|
|
33 /* No need to use sprintf to get the tty name--we get that from _getpty. */
|
|
34 #undef PTY_TTY_NAME_SPRINTF
|
|
35 #define PTY_TTY_NAME_SPRINTF
|
|
36 /* No need to get the pty name at all. */
|
|
37 #define PTY_NAME_SPRINTF
|
|
38 /* We need only try once to open a pty. */
|
|
39 #define PTY_ITERATION
|
|
40 /* Here is how to do it. */
|
|
41 /* It is necessary to prevent SIGCHLD signals within _getpty.
|
|
42 So we block them. */
|
|
43 #define PTY_OPEN \
|
|
44 { \
|
|
45 char *name; \
|
|
46 EMACS_BLOCK_SIGCHLD; \
|
|
47 name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \
|
|
48 EMACS_UNBLOCK_SIGCHLD; \
|
|
49 if (name == 0) \
|
|
50 return -1; \
|
|
51 if (fd < 0) \
|
|
52 return -1; \
|
|
53 if (fstat (fd, &stb) < 0) \
|
|
54 return -1; \
|
|
55 strcpy (pty_name, name); \
|
|
56 }
|
|
57
|
|
58 /* jpff@maths.bath.ac.uk reports `struct exception' is not defined
|
|
59 on this system, so inhibit use of matherr. */
|
|
60 #define NO_MATHERR
|