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