1 /* Synched up with: FSF 19.31. */
11 /* XEmacs change -- use ANSI, not K&R */
13 #define C_SWITCH_SYSTEM "-xansi"
16 /* SGI has all the fancy wait stuff, but we can't include sys/wait.h
17 because it defines BIG_ENDIAN and LITTLE_ENDIAN (ugh!.) Instead
18 we'll just define WNOHANG right here.
19 (An implicit decl is good enough for wait3.) */
20 /* [XEmacs: Now that we don't use BIG_ENDIAN/LITTLE_ENDIAN, it's safe
21 to include wait.h. Should something change here?] */
25 /* No need to use sprintf to get the tty name--we get that from _getpty. */
26 #undef PTY_TTY_NAME_SPRINTF
27 #define PTY_TTY_NAME_SPRINTF
28 /* No need to get the pty name at all. */
29 #define PTY_NAME_SPRINTF
30 /* We need only try once to open a pty. */
32 /* Here is how to do it. */
33 /* It is necessary to prevent SIGCHLD signals within _getpty.
39 EMACS_BLOCK_SIGCHLD; \
40 name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \
41 EMACS_UNBLOCK_SIGCHLD; \
46 if (fstat (fd, &stb) < 0) \
48 strcpy (pty_name, name); \
51 /* jpff@maths.bath.ac.uk reports `struct exception' is not defined
52 on this system, so inhibit use of matherr. */