[__GNUC__] (C_SWITCH_SYSTEM): Defined.
[emacs.git] / src / s / irix5-0.h
blobea39a51eeeca151106da23cdcdc49fb5fa4ec36a
1 #include "usg5-4.h"
3 #define IRIX5
5 #define SETPGRP_RELEASES_CTTY
7 #ifdef LIBS_SYSTEM
8 #undef LIBS_SYSTEM
9 #endif
11 #ifdef LIB_STANDARD
12 #undef LIB_STANDARD
13 #endif
15 #ifdef SYSTEM_TYPE
16 #undef SYSTEM_TYPE
17 #endif
18 #define SYSTEM_TYPE "irix"
20 #ifdef SETUP_SLAVE_PTY
21 #undef SETUP_SLAVE_PTY
22 #endif
24 /* thomas@mathematik.uni-bremen.de says this is needed. */
25 /* Make process_send_signal work by "typing" a signal character on the pty. */
26 #define SIGNALS_VIA_CHARACTERS
28 /* Define HAVE_ALLOCA to say that the system provides a properly
29 working alloca function and it should be used. */
30 #define HAVE_ALLOCA
31 #undef C_ALLOCA
33 #ifndef NOT_C_CODE
34 #ifndef __GNUC__
35 #include <alloca.h>
36 #endif
37 #endif
39 /* SGI has all the fancy wait stuff, but we can't include sys/wait.h
40 because it defines BIG_ENDIAN and LITTLE_ENDIAN (ugh!.) Instead
41 we'll just define WNOHANG right here.
42 (An implicit decl is good enough for wait3.) */
44 /* #define WNOHANG 0x1 */
46 /* No need to use sprintf to get the tty name--we get that from _getpty. */
47 #ifdef PTY_TTY_NAME_SPRINTF
48 #undef PTY_TTY_NAME_SPRINTF
49 #endif
50 #define PTY_TTY_NAME_SPRINTF
51 /* No need to get the pty name at all. */
52 #ifdef PTY_NAME_SPRINTF
53 #undef PTY_NAME_SPRINTF
54 #endif
55 #define PTY_NAME_SPRINTF
56 #ifdef emacs
57 char *_getpty();
58 #endif
59 /* We need only try once to open a pty. */
60 #define PTY_ITERATION
61 /* Here is how to do it. */
62 /* It is necessary to prevent SIGCHLD signals within _getpty.
63 So we block them. But since all of Emacs uses classic SYSV signal()
64 signals, there is no reliable way to do this (unlike BSD sighold or
65 POSIX sigaction). On Irix 5.* systems, the implementation of
66 sigaction is as close as you can get to a universal. */
67 #define PTY_OPEN \
68 { \
69 struct sigaction ocstat, cstat; \
70 char * name; \
71 sigemptyset(&cstat.sa_mask); \
72 cstat.sa_handler = SIG_DFL; \
73 cstat.sa_flags = 0; \
74 sigaction(SIGCLD, &cstat, &ocstat); \
75 name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); \
76 sigaction(SIGCLD, &ocstat, (struct sigaction *)0); \
77 if (name == 0) \
78 return -1; \
79 if (fd < 0) \
80 return -1; \
81 if (fstat (fd, &stb) < 0) \
82 return -1; \
83 strcpy (pty_name, name); \
86 /* jpff@maths.bath.ac.uk reports `struct exception' is not defined
87 on this system, so inhibit use of matherr. */
88 #define NO_MATHERR
90 /* Info from simon@lia.di.epfl.ch (Simon Leinen) suggests this is needed. */
91 #define GETPGRP_NO_ARG
93 /* Ulimit(UL_GMEMLIM) is busted... */
94 #define ULIMIT_BREAK_VALUE 0x14000000
96 /* Tell process_send_signal to use VSUSP instead of VSWTCH. */
97 #define PREFER_VSUSP
99 /* Because unexelfsgi.c cannot handle a ".sbss" section yet, we must
100 tell the linker to avoid making one. SGI's cc does this by
101 default, but GCC (at least 2.5.8 and 2.6.0) doesn't. */
102 #ifdef __GNUC__
103 #define LD_SWITCH_SYSTEM -G 0
104 #endif
106 /* define MAIL_USE_FLOCK if the mailer uses flock
107 to interlock access to /usr/spool/mail/$USER.
108 The alternative is that a lock file named
109 /usr/spool/mail/$USER.lock. */
111 #define MAIL_USE_FLOCK
113 /* use K&R C */
114 #ifndef __GNUC__
115 #define C_SWITCH_SYSTEM -cckr
116 #endif