Commit | Line | Data |
---|---|---|
66c7840d RS |
1 | #include "irix3-3.h" |
2 | ||
3 | #define USG5_3 | |
2b80da0a | 4 | #define IRIX4 |
66c7840d | 5 | |
66c7840d | 6 | #define HAVE_ALLOCA |
f4531fd6 RS |
7 | #ifndef NOT_C_CODE |
8 | #include <alloca.h> | |
9 | #endif | |
10 | ||
11 | #undef NEED_SIOCTL | |
66c7840d | 12 | |
e79a0e1b RS |
13 | /* Include unistd.h, even though we don't define POSIX. */ |
14 | #define NEED_UNISTD_H | |
15 | ||
42084123 RS |
16 | /* Make process_send_signal work by "typing" a signal character on the pty. */ |
17 | #define SIGNALS_VIA_CHARACTERS | |
18 | ||
66c7840d | 19 | /* use K&R C */ |
dcb70223 | 20 | #ifndef __GNUC__ |
66c7840d | 21 | #define C_SWITCH_MACHINE -cckr |
dcb70223 | 22 | #endif |
66c7840d RS |
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 | ||
29 | #define WNOHANG 0x1 | |
30 | ||
31 | /* No need to use sprintf to get the tty name--we get that from _getpty. */ | |
00c582c7 | 32 | #undef PTY_TTY_NAME_SPRINTF |
66c7840d RS |
33 | #define PTY_TTY_NAME_SPRINTF |
34 | /* No need to get the pty name at all. */ | |
35 | #define PTY_NAME_SPRINTF | |
66c7840d RS |
36 | /* We need only try once to open a pty. */ |
37 | #define PTY_ITERATION | |
38 | /* Here is how to do it. */ | |
39 | /* It is necessary to prevent SIGCHLD signals within _getpty. | |
40 | So we block them. */ | |
41 | #define PTY_OPEN \ | |
42 | { \ | |
43 | int mask = sigblock (sigmask (SIGCHLD)); \ | |
44 | char *name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \ | |
45 | sigsetmask(mask); \ | |
46 | if (name == 0) \ | |
47 | return -1; \ | |
48 | if (fd < 0) \ | |
49 | return -1; \ | |
50 | if (fstat (fd, &stb) < 0) \ | |
51 | return -1; \ | |
52 | strcpy (pty_name, name); \ | |
53 | } | |
04f4386e RS |
54 | |
55 | /* jpff@maths.bath.ac.uk reports `struct exception' is not defined | |
56 | on this system, so inhibit use of matherr. */ | |
57 | #define NO_MATHERR |