comparison src/s/usg5-4.h @ 5495:1f0b15040456

Merge.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 01 May 2011 18:44:03 +0100
parents 861f2601a38b a9094f28f9a9
children
comparison
equal deleted inserted replaced
5494:861f2601a38b 5495:1f0b15040456
1 /* Definitions file for GNU Emacs running on AT&T's System V Release 4 1 /* Definitions file for XEmacs running on AT&T's System V Release 4
2 Copyright (C) 1987, 1990, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2 Copyright (C) 1987, 1990 Free Software Foundation, Inc.
3 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
4 Copyright (C) 2010 Ben Wing.
5 3
6 This file is part of GNU Emacs. 4 This file is part of XEmacs.
7 5
8 GNU Emacs is free software: you can redistribute it and/or modify 6 XEmacs is free software: you can redistribute it and/or modify it
9 it under the terms of the GNU General Public License as published by 7 under the terms of the GNU General Public License as published by the
10 the Free Software Foundation, either version 3 of the License, or 8 Free Software Foundation, either version 3 of the License, or (at your
11 (at your option) any later version. 9 option) any later version.
12 10
13 GNU Emacs is distributed in the hope that it will be useful, 11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
14 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 GNU General Public License for more details. 14 for more details.
17 15
18 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
19 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */
20 18
21 /* Synced up with: FSF 23.1.92. */ 19 /* Synced up with: FSF 23.1.92. */
22 /* Synced by: Ben Wing, 2-18-10. */ 20 /* Synced by: Ben Wing, 2-18-10. */
23 21
24 /* This file written by James Van Artsdalen of Dell Computer Corporation. 22 /* This file written by James Van Artsdalen of Dell Computer Corporation.
38 /* Delete HAVE_TERMIO, SYSV_SYSTEM_DIR, KERNEL_FILE, LDAV_SYMBOL, 36 /* Delete HAVE_TERMIO, SYSV_SYSTEM_DIR, KERNEL_FILE, LDAV_SYMBOL,
39 sigsetmask, _setjmp, _longjmp, HAVE_INDEX, HAVE_RINDEX, TERMINFO, 37 sigsetmask, _setjmp, _longjmp, HAVE_INDEX, HAVE_RINDEX, TERMINFO,
40 HAVE_SYSV_SIGPAUSE, BSTRING, SIGTYPE -- not used in XEmacs or found by 38 HAVE_SYSV_SIGPAUSE, BSTRING, SIGTYPE -- not used in XEmacs or found by
41 configure */ 39 configure */
42 40
41 /* Letter to use in finding device name of first pty,
42 * if system supports pty's. 'p' means it is /dev/ptyp0 */
43
44 #define FIRST_PTY_LETTER 'z'
45
46 /* define MAIL_USE_FLOCK if the mailer uses flock
47 * to interlock access to /usr/spool/mail/$USER.
48 * The alternative is that a lock file named
49 * /usr/spool/mail/$USER.lock. */
50
51 /* #define MAIL_USE_FLOCK */
52
53 /* Special hacks needed to make Emacs run on this system. */
54
55 /* On USG systems the system calls are interruptible by signals
56 * that the user program has elected to catch. Thus the system call
57 * must be retried in these cases. To handle this without massive
58 * changes in the source code, we remap the standard system call names
59 * to names for our own functions in sysdep.c that do the system call
60 * with retries. */
61
62 #define INTERRUPTIBLE_OPEN
63 #define INTERRUPTIBLE_IO
64
65 /* Compiler bug bites on many systems when default ADDR_CORRECT is used. */
66
67 #define ADDR_CORRECT(x) (x)
68
69 /* Prevent -lg from being used for debugging. Not implemented? */
70
71 #define LIBS_DEBUG
72
73 /* 5.3 apparently makes close() interruptible */
74
75 #define INTERRUPTIBLE_CLOSE
76
77 /* Apparently -lg is provided in 5.3 */
78
79 #undef LIBS_DEBUG
80
81 /* Enable support for shared libraries in unexec. */
82
83 #define USG_SHARED_LIBRARIES
84
85 #define LIBS_SYSTEM "-lsocket -lnsl -lelf"
43 #define ORDINARY_LINK 86 #define ORDINARY_LINK
87 #define LIB_STANDARD
44 88
45 /* there are no -lg libraries on this system, and no libPW */ 89 /* there are no -lg libraries on this system, and no libPW */
46 90
47 /* XEmacs deleted LIBS_DEBUG, LIB_STANDARD */ 91 /* XEmacs deleted LIBS_DEBUG, LIB_STANDARD */
48 92
49 /* Undump with ELF */ 93 /* No <sioctl.h> */
50 94
51 #undef COFF 95 #define NO_SIOCTL_H
52 96
53 #define UNEXEC "unexelf.o" 97 #define UNEXEC "unexelf.o"
54 98
55 /* Get FIONREAD from <sys/filio.h>. Get <sys/ttold.h> to get struct 99 /* Get <sys/ttold.h> to get struct
56 * tchars. But get <termio.h> first to make sure ttold.h doesn't 100 * tchars. But get <termio.h> first to make sure ttold.h doesn't
57 * interfere. And don't try to use SIGIO yet. 101 * interfere.
58 */ 102 */
59 103
60 #ifndef NOT_C_CODE 104 #ifndef NOT_C_CODE
61 #include <sys/wait.h> 105 #include <sys/wait.h>
62 #endif 106 #endif
63 107
64 #ifdef emacs 108 #ifdef emacs
65 #include <sys/filio.h> 109 #include <sys/filio.h>
66 #include <termio.h> 110 #include <termio.h>
67 #include <sys/ttold.h> 111 #include <sys/ttold.h>
68 /* Delete #include <signal.h> */
69 #include <sys/stream.h> 112 #include <sys/stream.h>
70 #include <sys/stropts.h>
71 #include <sys/termios.h> 113 #include <sys/termios.h>
72 /* XEmacs -- GNU added this, but we never had it defined and C-g apparently
73 worked fine before, so don't define it */
74 /* #define BROKEN_SIGIO */
75 #endif 114 #endif
76 115
77 /* Delete NSIG_MINIMUM -- unused in XEmacs */ 116 /* This sets the name of the master side of the PTY. */
78 117
79 /* Delete CLASH_DETECTION (config option), HAVE_PTYS, HAVE_TERMIOS, 118 #define PTY_NAME_SPRINTF qxestrcpy_ascii (pty_name, "/dev/ptmx");
80 wait3, WRETCODE, TIOCSIGSEND -- not used in XEmacs or found by configure */
81 119
82 /* Delete FIRST_PTY_LETTER, PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF -- 120 /* This sets the name of the slave side of the PTY. On SysVr4,
83 duplicative of code already in process-unix.c */ 121 grantpt(3) forks a subprocess, so keep sigchld_handler() from
122 intercepting that death. If any child but grantpt's should die
123 within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
84 124
85 /* Delete SETUP_SLAVE_PTY -- unused in XEmacs */ 125 /* XEmacs change */
126 #ifndef NOT_C_CODE
127 # if !__STDC__ && !defined(STDC_HEADERS)
128 char *ptsname ();
129 # endif
130 #endif
86 131
87 /* Delete HAVE_SOCKETS -- autodetected */ 132 #define PTY_TTY_NAME_SPRINTF \
133 { \
134 char *ptyname; \
135 \
136 EMACS_BLOCK_SIGCHLD; \
137 if (grantpt (fd) == -1) \
138 { close (fd); return -1; } \
139 EMACS_UNBLOCK_SIGCHLD; \
140 if (unlockpt (fd) == -1) \
141 { close (fd); return -1; } \
142 if (!(ptyname = ptsname (fd))) \
143 { close (fd); return -1; } \
144 qxestrncpy_ascii (pty_name, ptyname, \
145 sizeof (pty_name)); \
146 pty_name[sizeof (pty_name) - 1] = 0; \
147 }
88 148
149 /* Push various streams modules onto a PTY channel. */
89 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);
90 158
91 /* Begin XEmacs additions */ 159 /* Tell x11term.c and keyboard.c we have the system V streams feature. */
92 160 #define SYSV_STREAMS
93 /* Compiler bug bites on many systems when default ADDR_CORRECT is used. */
94
95 #define ADDR_CORRECT(x) (x)
96
97 /* Enable support for shared libraries in unexec. */
98
99 #define USG_SHARED_LIBRARIES
100
101 #define LIBS_SYSTEM "-lsocket -lnsl -lelf"
102
103 /* On Some SysV System , w3 freeze. If freeze your xemacs , Add below definition */ 161 /* On Some SysV System , w3 freeze. If freeze your xemacs , Add below definition */
104 /* This definition added by Shogo Fujii(shogo@bsd1.kbnes.nec.co.jp) */ 162 /* This definition added by Shogo Fujii(shogo@bsd1.kbnes.nec.co.jp) */
105 #define PROCESS_IO_BLOCKING 163 #define PROCESS_IO_BLOCKING