annotate src/s/irix5-0.h @ 7194:3112fb627aa0

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Fri, 29 Apr 1994 10:16:53 +0000
parents 414da6a99f69
children 39ba97525390
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4588
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
1 #include "usg5-4.h"
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
2
5182
9a7ef5c29ab9 (IRIX5, SETPGRP_RELEASES_CTTY): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 5143
diff changeset
3 #define IRIX5
9a7ef5c29ab9 (IRIX5, SETPGRP_RELEASES_CTTY): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 5143
diff changeset
4
9a7ef5c29ab9 (IRIX5, SETPGRP_RELEASES_CTTY): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 5143
diff changeset
5 #define SETPGRP_RELEASES_CTTY
9a7ef5c29ab9 (IRIX5, SETPGRP_RELEASES_CTTY): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 5143
diff changeset
6
2891
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
7 #ifdef LIBS_SYSTEM
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
8 #undef LIBS_SYSTEM
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
9 #endif
2890
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10
4588
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
11 #ifdef LIB_STANDARD
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
12 #undef LIB_STANDARD
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
13 #endif
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
14
2891
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
15 #ifdef SYSTEM_TYPE
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
16 #undef SYSTEM_TYPE
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
17 #endif
5191
414da6a99f69 (SYSTEM_TYPE): Make it "irix".
Richard M. Stallman <rms@gnu.org>
parents: 5182
diff changeset
18 #define SYSTEM_TYPE "irix"
2891
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
19
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
20 #ifdef SETUP_SLAVE_PTY
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
21 #undef SETUP_SLAVE_PTY
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
22 #endif
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
23
5143
f051791645a2 (SIGNALS_VIA_CHARACTERS): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 4608
diff changeset
24 /* thomas@mathematik.uni-bremen.de says this is needed. */
f051791645a2 (SIGNALS_VIA_CHARACTERS): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 4608
diff changeset
25 /* Make process_send_signal work by "typing" a signal character on the pty. */
f051791645a2 (SIGNALS_VIA_CHARACTERS): Defined.
Richard M. Stallman <rms@gnu.org>
parents: 4608
diff changeset
26 #define SIGNALS_VIA_CHARACTERS
2890
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 /* Define HAVE_ALLOCA to say that the system provides a properly
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29 working alloca function and it should be used. */
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 #define HAVE_ALLOCA
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 #undef C_ALLOCA
4588
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
32
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
33 #ifndef NOT_C_CODE
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
34 #ifndef __GNUC__
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
35 #include <alloca.h>
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
36 #endif
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
37 #endif
2890
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 /* SGI has all the fancy wait stuff, but we can't include sys/wait.h
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 because it defines BIG_ENDIAN and LITTLE_ENDIAN (ugh!.) Instead
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 we'll just define WNOHANG right here.
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42 (An implicit decl is good enough for wait3.) */
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43
2891
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
44 /* #define WNOHANG 0x1 */
2890
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 /* No need to use sprintf to get the tty name--we get that from _getpty. */
2891
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
47 #ifdef PTY_TTY_NAME_SPRINTF
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
48 #undef PTY_TTY_NAME_SPRINTF
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
49 #endif
2890
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 #define PTY_TTY_NAME_SPRINTF
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 /* No need to get the pty name at all. */
2891
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
52 #ifdef PTY_NAME_SPRINTF
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
53 #undef PTY_NAME_SPRINTF
c10bb302a315 Changes for Silicon Graphics Iris 5D.
Jim Blandy <jimb@redhat.com>
parents: 2890
diff changeset
54 #endif
2890
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 #define PTY_NAME_SPRINTF
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 #ifdef emacs
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57 char *_getpty();
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58 #endif
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59 /* We need only try once to open a pty. */
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60 #define PTY_ITERATION
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
61 /* Here is how to do it. */
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
62 /* It is necessary to prevent SIGCHLD signals within _getpty.
4237
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
63 So we block them. But since all of Emacs uses classic SYSV signal()
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
64 signals, there is no reliable way to do this (unlike BSD sighold or
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
65 POSIX sigaction). On Irix 5.* systems, the implementation of
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
66 sigaction is as close as you can get to a universal. */
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
67 #define PTY_OPEN \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
68 { \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
69 struct sigaction ocstat, cstat; \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
70 char * name; \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
71 sigemptyset(&cstat.sa_mask); \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
72 cstat.sa_handler = SIG_DFL; \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
73 cstat.sa_flags = 0; \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
74 sigaction(SIGCLD, &cstat, &ocstat); \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
75 name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
76 sigaction(SIGCLD, &ocstat, (struct sigaction *)0); \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
77 if (name == 0) \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
78 return -1; \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
79 if (fd < 0) \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
80 return -1; \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
81 if (fstat (fd, &stb) < 0) \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
82 return -1; \
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
83 strcpy (pty_name, name); \
2890
70a7f2829225 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
84 }
4237
589ab12dbe3d (PTY_OPEN): Use sigaction, not sigsetmask.
Richard M. Stallman <rms@gnu.org>
parents: 2891
diff changeset
85
4588
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
86 /* jpff@maths.bath.ac.uk reports `struct exception' is not defined
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
87 on this system, so inhibit use of matherr. */
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
88 #define NO_MATHERR
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
89
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
90 /* Info from simon@lia.di.epfl.ch (Simon Leinen) suggests this is needed. */
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
91 #define GETPGRP_NO_ARG
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
92
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
93 /* Ulimit(UL_GMEMLIM) is busted... */
73d1d7d05a5a Include alloca.h if appropriate.
Richard M. Stallman <rms@gnu.org>
parents: 4237
diff changeset
94 #define ULIMIT_BREAK_VALUE 0x14000000