Fix the LessTif-directory-finder for real.
[emacs.git] / src / s / irix4-0.h
blob93d4fba171649e764696cbd50801d887ce6a4adf
1 #include "irix3-3.h"
3 #define USG5_3
4 #define IRIX4
5 /* XPointer is not defined in the older X headers -- JPff@maths.bath.ac.uk */
6 #define XPointer caddr_t
8 #ifndef NOT_C_CODE
9 #include <alloca.h>
10 #endif
12 #undef NEED_SIOCTL
14 /* Include unistd.h, even though we don't define POSIX. */
15 #define NEED_UNISTD_H
17 /* Make process_send_signal work by "typing" a signal character on the pty. */
18 #define SIGNALS_VIA_CHARACTERS
20 #ifndef __GNUC__
21 /* use K&R C */
22 /* We need to increase the expression tree space with -Wf,-XNh
23 (ghazi@caip.rutgers.edu 7/8/97.)
25 #define C_SWITCH_SYSTEM -cckr -Wf,-XNh4000
26 #endif
28 /* SGI has all the fancy wait stuff, but we can't include sys/wait.h
29 because it defines BIG_ENDIAN and LITTLE_ENDIAN (ugh!.) Instead
30 we'll just define WNOHANG right here.
31 (An implicit decl is good enough for wait3.) */
33 #define WNOHANG 0x1
35 /* No need to use sprintf to get the tty name--we get that from _getpty. */
36 #undef PTY_TTY_NAME_SPRINTF
37 #define PTY_TTY_NAME_SPRINTF
38 /* No need to get the pty name at all. */
39 #define PTY_NAME_SPRINTF
40 /* We need only try once to open a pty. */
41 #define PTY_ITERATION
42 /* Here is how to do it. */
43 /* It is necessary to prevent SIGCHLD signals within _getpty.
44 So we block them. */
45 #define PTY_OPEN \
46 { \
47 int mask = sigblock (sigmask (SIGCHLD)); \
48 char *name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \
49 sigsetmask(mask); \
50 if (name == 0) \
51 return -1; \
52 if (fd < 0) \
53 return -1; \
54 if (fstat (fd, &stb) < 0) \
55 return -1; \
56 strcpy (pty_name, name); \