9 #define SYSTEM_TYPE "silicon-graphics-unix"
11 #ifdef SETUP_SLAVE_PTY
12 #undef SETUP_SLAVE_PTY
16 /* Define HAVE_ALLOCA to say that the system provides a properly
17 working alloca function and it should be used. */
20 #define alloca __builtin_alloca
24 #define C_SWITCH_MACHINE -cckr
27 /* SGI has all the fancy wait stuff, but we can't include sys/wait.h
28 because it defines BIG_ENDIAN and LITTLE_ENDIAN (ugh!.) Instead
29 we'll just define WNOHANG right here.
30 (An implicit decl is good enough for wait3.) */
32 /* #define WNOHANG 0x1 */
34 /* No need to use sprintf to get the tty name--we get that from _getpty. */
35 #ifdef PTY_TTY_NAME_SPRINTF
36 #undef PTY_TTY_NAME_SPRINTF
38 #define PTY_TTY_NAME_SPRINTF
39 /* No need to get the pty name at all. */
40 #ifdef PTY_NAME_SPRINTF
41 #undef PTY_NAME_SPRINTF
43 #define PTY_NAME_SPRINTF
47 /* We need only try once to open a pty. */
49 /* Here is how to do it. */
50 /* It is necessary to prevent SIGCHLD signals within _getpty.
54 int mask = sigblock (sigmask (SIGCHLD)); \
55 char *name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \
61 if (fstat (fd, &stb) < 0) \
63 strcpy (pty_name, name); \