Rename our max_align_t to sxe_max_align_t
[sxemacs] / src / s / usg5-4.h
1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4
2    Copyright (C) 1987, 1990 Free Software Foundation, Inc.
3
4 This file is part of SXEmacs
5
6 SXEmacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 SXEmacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
18
19
20 /* Synched up with: FSF 19.31. */
21
22 /* This file written by James Van Artsdalen of Dell Computer Corporation.
23  * james@bigtex.cactus.org.  Subsequently improved for Dell 2.2 by Eric
24  * S. Raymond <esr@snark.thyrsus.com>.
25  */
26
27 /* Use the SysVr3 file for at least base configuration. */
28
29 #define DONT_DEFINE_NO_REMAP    /* `static' hack not needed */
30 #include "usg5-3.h"
31
32 #define USG5_4
33
34 #define LIBS_SYSTEM "-lsocket -lnsl -lelf"
35 #define ORDINARY_LINK
36
37 #if 0
38 #ifdef ORDINARY_LINK
39 #define LIB_STANDARD "-lc /usr/ucblib/libucb.a"
40 #else
41 #define START_FILES "pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o"
42 #define LIB_STANDARD "-lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o"
43 #endif
44 #else
45
46 #ifdef ORDINARY_LINK
47 #define LIB_STANDARD
48 #else
49 #define START_FILES "pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o"
50 #define LIB_STANDARD "-lc /usr/ccs/lib/crtn.o"
51 #endif
52 #endif
53
54 /* there are no -lg libraries on this system, and no libPW */
55
56 #define LIBS_DEBUG
57
58 /* No <sioctl.h> */
59
60 #define NO_SIOCTL_H
61
62 /* Undump with ELF */
63
64 #undef COFF
65
66 /*
67  * everything is pdump now. --SY
68  * #define UNEXEC "unexelf.o"
69  */
70 #undef UNEXEC
71
72 /* Get <sys/ttold.h> to get struct
73  * tchars. But get <termio.h> first to make sure ttold.h doesn't
74  * interfere.
75  */
76
77 #ifndef NOT_C_CODE
78 #include <sys/wait.h>
79 #endif
80
81 #ifdef emacs
82 #include <sys/filio.h>
83 #include <termio.h>
84 #include <sys/ttold.h>
85 #include <signal.h>
86 #include <sys/stream.h>
87 #include <sys/termios.h>
88 #endif
89
90 #undef BROKEN_SIGIO
91
92 /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
93  * instead, there's a system variable _sys_nsig.  Unfortunately, we need the
94  * constant to dimension an array.  So wire in the appropriate value here.
95  */
96
97 #if defined(emacs) && !defined(NSIG)
98 #define NSIG    32
99 #endif                          /* defined(emacs) && !defined(NSIG) */
100
101 /* We need bss_end from emacs.c for undumping */
102
103 #ifndef USG_SHARED_LIBRARIES
104 #define USG_SHARED_LIBRARIES
105 #endif
106
107 #define HAVE_PTYS
108 #undef BROKEN_TIOCGWINSZ
109 #undef BROKEN_TIOCGETC
110
111 /* This change means that we don't loop through allocate_pty too many
112    times in the (rare) event of a failure. */
113
114 #undef FIRST_PTY_LETTER
115 #define FIRST_PTY_LETTER 'z'
116
117 /* This sets the name of the master side of the PTY. */
118
119 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
120
121 /* This sets the name of the slave side of the PTY.  On SysVr4,
122    grantpt(3) forks a subprocess, so keep sigchld_handler() from
123    intercepting that death.  If any child but grantpt's should die
124    within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
125
126 /* XEmacs change */
127 #ifndef NOT_C_CODE
128 # if !__STDC__ && !defined(STDC_HEADERS)
129 char *ptsname();
130 # endif
131 #endif
132
133 #define PTY_TTY_NAME_SPRINTF                            \
134   {                                                     \
135     char *ptyname;                                      \
136                                                         \
137     EMACS_BLOCK_SIGCHLD;                                \
138     if (grantpt (fd) == -1)                             \
139       { close (fd); return -1; }                        \
140     EMACS_UNBLOCK_SIGCHLD;                              \
141     if (unlockpt (fd) == -1)                            \
142       { close (fd); return -1; }                        \
143     if (!(ptyname = ptsname (fd)))                      \
144       { close (fd); return -1; }                        \
145     strncpy (pty_name, ptyname, sizeof (pty_name));     \
146     pty_name[sizeof (pty_name) - 1] = 0;                \
147   }
148
149 /* Push various streams modules onto a PTY channel. */
150
151 #define SETUP_SLAVE_PTY \
152   if (ioctl (xforkin, I_PUSH, "ptem") == -1)            \
153     fatal ("ioctl I_PUSH ptem: errno %d\n", errno);     \
154   if (ioctl (xforkin, I_PUSH, "ldterm") == -1)          \
155     fatal ("ioctl I_PUSH ldterm: errno %d\n", errno);   \
156   if (ioctl (xforkin, I_PUSH, "ttcompat") == -1)        \
157     fatal ("ioctl I_PUSH ttcompat: errno %d\n", errno);
158
159 /* Tell x11term.c and keyboard.c we have the system V streams feature.  */
160 #define SYSV_STREAMS
161 /* On Some SysV System , w3 freeze. If freeze your xemacs , Add below definition */
162 /* This definition added by Shogo Fujii(shogo@bsd1.kbnes.nec.co.jp) */
163 #define PROCESS_IO_BLOCKING