annotate src/s/irix5-0.h @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children 538048ae2ab8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* Synched up with: FSF 19.31. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 #include "usg5-4.h"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 #define IRIX5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 #ifdef LIBS_SYSTEM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 #undef LIBS_SYSTEM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 #ifdef LIB_STANDARD
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 #undef LIB_STANDARD
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 #ifdef SYSTEM_TYPE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 #undef SYSTEM_TYPE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 #define SYSTEM_TYPE "irix"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 #ifdef SETUP_SLAVE_PTY
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 #undef SETUP_SLAVE_PTY
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 /* thomas@mathematik.uni-bremen.de says this is needed. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 /* Make process_send_signal work by "typing" a signal character on the pty. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 #define SIGNALS_VIA_CHARACTERS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 /* Define HAVE_ALLOCA to say that the system provides a properly
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 working alloca function and it should be used. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 #define HAVE_ALLOCA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 #undef C_ALLOCA
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 #ifndef NOT_C_CODE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 #ifndef __GNUC__
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 #include <alloca.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 /* SGI has all the fancy wait stuff, but we can't include sys/wait.h
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 because it defines BIG_ENDIAN and LITTLE_ENDIAN (ugh!.) Instead
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 we'll just define WNOHANG right here.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (An implicit decl is good enough for wait3.) */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 /* [XEmacs: Now that we don't use BIG_ENDIAN/LITTLE_ENDIAN, it's safe
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 to include wait.h. Should something change here?] */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 /* #define WNOHANG 0x1 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 /* No need to use sprintf to get the tty name--we get that from _getpty. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 #ifdef PTY_TTY_NAME_SPRINTF
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 #undef PTY_TTY_NAME_SPRINTF
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 #define PTY_TTY_NAME_SPRINTF
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 /* No need to get the pty name at all. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 #ifdef PTY_NAME_SPRINTF
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 #undef PTY_NAME_SPRINTF
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 #define PTY_NAME_SPRINTF
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 #ifdef emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 char *_getpty ();
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 /* We need only try once to open a pty. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 #define PTY_ITERATION
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 /* Here is how to do it. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 /* It is necessary to prevent SIGCHLD signals within _getpty.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 So we block them. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 #define PTY_OPEN \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 { \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 char *name; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 EMACS_BLOCK_SIGCHLD; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 EMACS_UNBLOCK_SIGCHLD; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 if (name == 0) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 return -1; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 if (fd < 0) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 return -1; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 if (fstat (fd, &stb) < 0) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 return -1; \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 strcpy (pty_name, name); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 /* jpff@maths.bath.ac.uk reports `struct exception' is not defined
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 on this system, so inhibit use of matherr. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 #define NO_MATHERR
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 /* Info from simon@lia.di.epfl.ch (Simon Leinen) suggests this is needed. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 #define GETPGRP_NO_ARG
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 /* Ulimit(UL_GMEMLIM) is busted... */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 #define ULIMIT_BREAK_VALUE 0x14000000
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 /* Tell process_send_signal to use VSUSP instead of VSWTCH. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 #define PREFER_VSUSP
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 /* Because unexelfsgi.c cannot handle a ".sbss" section yet, we must
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 tell the linker to avoid making one. SGI's cc does this by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 default, but GCC (at least 2.5.8 and 2.6.0) doesn't. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 #ifdef __GNUC__
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 #define LD_SWITCH_SYSTEM -G 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 /* define MAIL_USE_FLOCK if the mailer uses flock
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 to interlock access to /usr/spool/mail/$USER.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103 The alternative is that a lock file named
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 /usr/spool/mail/$USER.lock. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 #define MAIL_USE_FLOCK
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 /* use K&R C */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 /* XEmacs change -- use ANSI, not K&R */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 #ifndef __GNUC__
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 #define C_SWITCH_SYSTEM -xansi
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 /* jackr@engr.sgi.com says that you can't mix different kinds of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 signal-handling functions under IRIX 5.3. I'm going to assume
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 that that was the reason this got broken. Now that the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 signal routines are fixed up, maybe this will work. --ben */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 /* Nope, it doesn't. I've tried lots of things; it must be
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 genuinely broken. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 /* XEmacs addition: People on IRIX 5.2 and IRIX 5.3 systems have
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 reported that they can't break out of (while t) using C-g or C-G.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 This does not occur on other systems, so let's assume that SIGIO
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 is broken on these systems. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 #define BROKEN_SIGIO