annotate src/s/irix4-0.h @ 2278:990694465b0f

* make-dist: Fix typo.
author Jim Blandy <jimb@redhat.com>
date Sat, 20 Mar 1993 18:12:07 +0000
parents 8a58d997b213
children 8c74c4712164
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1493
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 #include "irix3-3.h"
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
3 #define USG5_3
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 /* Define HAVE_ALLOCA to say that the system provides a properly
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 working alloca function and it should be used. */
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 #define HAVE_ALLOCA
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 #undef C_ALLOCA
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 #define alloca __builtin_alloca
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11 /* use K&R C */
1856
c4768d9b6a2f (C_SWITCH_MACHINE): Don't define if GCC.
Richard M. Stallman <rms@gnu.org>
parents: 1493
diff changeset
12 #ifndef __GNUC__
1493
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 #define C_SWITCH_MACHINE -cckr
1856
c4768d9b6a2f (C_SWITCH_MACHINE): Don't define if GCC.
Richard M. Stallman <rms@gnu.org>
parents: 1493
diff changeset
14 #endif
1493
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 /* SGI has all the fancy wait stuff, but we can't include sys/wait.h
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 because it defines BIG_ENDIAN and LITTLE_ENDIAN (ugh!.) Instead
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 we'll just define WNOHANG right here.
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 (An implicit decl is good enough for wait3.) */
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
21 #define WNOHANG 0x1
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
22
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
23 /* No need to use sprintf to get the tty name--we get that from _getpty. */
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24 #define PTY_TTY_NAME_SPRINTF
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 /* No need to get the pty name at all. */
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26 #define PTY_NAME_SPRINTF
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 #ifdef emacs
2223
8a58d997b213 (_getpty): Declare this, not _get_pty.
Richard M. Stallman <rms@gnu.org>
parents: 1856
diff changeset
28 char *_getpty();
1493
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 #endif
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30 /* We need only try once to open a pty. */
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
31 #define PTY_ITERATION
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
32 /* Here is how to do it. */
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
33 /* It is necessary to prevent SIGCHLD signals within _getpty.
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
34 So we block them. */
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35 #define PTY_OPEN \
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
36 { \
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
37 int mask = sigblock (sigmask (SIGCHLD)); \
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
38 char *name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
39 sigsetmask(mask); \
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40 if (name == 0) \
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
41 return -1; \
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
42 if (fd < 0) \
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
43 return -1; \
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
44 if (fstat (fd, &stb) < 0) \
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
45 return -1; \
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
46 strcpy (pty_name, name); \
b207a60243f6 Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
47 }