annotate src/s/linux.h @ 151:59463afc5666 r20-3b2

Import from CVS: tag r20-3b2
author cvs
date Mon, 13 Aug 2007 09:37:19 +0200
parents 9f59509498e1
children 6b37e6ddd302
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 /* This file is the configuration file for the GNU/Linux operating system,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 prior to version 1.1.56.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 Copyright (C) 1985, 1986, 1992, 1994 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 This file is part of GNU Emacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 GNU Emacs is free software; you can redistribute it and/or modify
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 it under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 GNU Emacs is distributed in the hope that it will be useful,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 GNU General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 along with XEmacs; see the file COPYING. If not, write to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 Boston, MA 02111-1307, USA. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 /* Synched up with: FSF 19.31 (called, ahem ... lignux.h in FSF). */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 /* This file was put together by Michael K. Johnson and Rik Faith. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
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 symbols to identify the version of Unix this is.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 * Define all the symbols that apply correctly.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 /* #define UNIPLUS */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 /* #define USG5 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 #define USG
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 /* #define BSD */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 #define LINUX
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 /* SYSTEM_TYPE should indicate the kind of system you are using.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 It sets the Lisp variable system-type. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 #define SYSTEM_TYPE "linux" /* All the best software is free. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 /* Letter to use in finding device name of first pty,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 if system supports pty's. 'p' means it is /dev/ptyp0 */
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 FIRST_PTY_LETTER 'p'
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 /*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 * Define HAVE_PTYS if the system supports pty devices.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 #define HAVE_PTYS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 /* define MAIL_USE_FLOCK if the mailer uses flock
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 to interlock access to /usr/spool/mail/$USER.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 The alternative is that a lock file named
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 /usr/spool/mail/$USER.lock. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 /* Both are used in Linux by different mail programs. I assume that most
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 people are using newer mailers that have heard of flock. Change this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 if you need to. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62
24
4103f0995bd7 Import from CVS: tag r19-15b95
cvs
parents: 4
diff changeset
63 /*#define MAIL_USE_FLOCK*/
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 /* Here, on a separate page, add any special hacks needed
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 to make Emacs work on this system. For example,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 you might define certain system call names that don't
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 exist on your system, or that do different things on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 your system and must be used only through an encapsulation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (Which you should place, by convention, in sysdep.c). */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 /* On POSIX systems the system calls are interruptible by signals
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 that the user program has elected to catch. Thus the system call
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 must be retried in these cases. To handle this without massive
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 changes in the source code, we remap the standard system call names
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 to names for our own functions in sysdep.c that do the system call
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 with retries. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 #define INTERRUPTIBLE_OPEN
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 #define INTERRUPTIBLE_CLOSE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 #define INTERRUPTIBLE_IO
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83 /* If you mount the proc file system somewhere other than /proc
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 you will have to uncomment the following and make the proper
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85 changes */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
87 /* #define LINUX_LDAV_FILE "/proc/loadavg" */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 /* This is needed for dispnew.c:update_frame */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91 #ifdef emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 #include <stdio.h> /* Get the definition of _IO_STDIO_H. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
93 #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
94 /* new C libio names */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
95 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
96 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
97 #else /* !_IO_STDIO_H */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98 /* old C++ iostream names */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 ((FILE)->_pptr - (FILE)->_pbase)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
101 #endif /* !_IO_STDIO_H */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 #endif /* emacs */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 /* Ask GCC where to find libgcc.a. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 #define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107 #ifndef __ELF__
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 /* Linux has crt0.o in a non-standard place */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 #define START_FILES pre-crt0.o /usr/lib/crt0.o
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
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 /* Check the version number of Linux--if it is at least 1.1.56,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
115 it is safe to use SIGIO. If we can't find version.h (could happen
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116 if the user did a `make distclean' or something similar on the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117 kernel distribution) just assume that SIGIO works, because nearly
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 everybody should be running Linux 1.2 or later by now. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 #ifndef NOT_C_CODE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 #ifdef emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 #ifdef HAVE_LINUX_VERSION_H
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
122 #include <linux/version.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 #if LINUX_VERSION_CODE < 0x10138
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 #define BROKEN_SIGIO
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 #endif /* LINUX_VERSION_CODE < 0x10138 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 #endif /* HAVE_LINUX_VERSION_H */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 #endif /* emacs */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 #endif /* NOT_C_CODE */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 /* This is needed for sysdep.c */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 #define NO_SIOCTL_H /* don't have sioctl.h */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 #define HAVE_SYS_SIGLIST
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 #define HAVE_WAIT_HEADER
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138 #define POSIX /* affects getpagesize.h and systty.h */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 /* Best not to include -lg, unless it is last on the command line */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 #define LIBS_DEBUG
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 #define LIBS_TERMCAP -ltermcap -lcurses /* save some space with shared libs*/
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143 #ifndef __ELF__
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
144 #define LIB_STANDARD -lc /* avoid -lPW */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 #undef LIB_GCC
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147 #define LIB_GCC
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
150
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
151 /* Don't use -g in test compiles in configure.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
152 This is so we will use the same shared libs for that linking
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
153 that are used when linking temacs. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
154 #ifdef THIS_IS_CONFIGURE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
155 #define C_DEBUG_SWITCH
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
156 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
157
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
158 /* Let's try this out, just in case.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
159 Nah. Rik Faith <faith@cs.unc.edu> says it doesn't work well. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
160 /* #define SIGNALS_VIA_CHARACTERS */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
161
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
162 #ifdef TERM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
163 #define LIBS_SYSTEM -lclient
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
164 #define C_SWITCH_SYSTEM -D_BSD_SOURCE -I/usr/src/term
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 /* alane@wozzle.linet.org says that -lipc is not a separate library,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 since libc-4.4.1. So -lipc was deleted. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 #define LIBS_SYSTEM
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
169
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
170 /* XFree86 is built with -DFUNCPROTO=11 -DNARROWPROTO so we better build
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 XEmacs with these switches too so that X functions get called correctly.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 At least XawScrollbarSetThumb needs this. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 #define C_SWITCH_SYSTEM -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 /* XEmacs change: configure doesn't find this because math.h aliases
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 rint to __rint so that it's not found. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 #define HAVE_RINT 1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 #ifdef __ELF__
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 #define UNEXEC unexelf.o
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 #define UNEXEC_USE_MAP_PRIVATE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 #ifdef LINUX_QMAGIC
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 #define HAVE_TEXT_START
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
188 #define UNEXEC unexsunos4.o
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 #define N_PAGSIZ(x) PAGE_SIZE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 #else /* not LINUX_QMAGIC */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 #define A_TEXT_OFFSET(hdr) (N_MAGIC(hdr) == QMAGIC ? sizeof (struct exec) : 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 #define ADJUST_EXEC_HEADER \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 unexec_text_start = N_TXTADDR(ohdr) + A_TEXT_OFFSET(ohdr)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 #endif /* not LINUX_QMAGIC */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 #if 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 /* In 19.23 and 19.24, configure sometimes fails to define these.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202 It has to do with the fact that configure uses CFLAGS when linking
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 while Makefile.in.in (erroneously) fails to do so when linking temacs. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 #ifndef HAVE_GETTIMEOFDAY
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 #define HAVE_GETTIMEOFDAY
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207 #ifndef HAVE_MKDIR
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 #define HAVE_MKDIR
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
209 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
210 #ifndef HAVE_RMDIR
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 #define HAVE_RMDIR
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
212 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 #ifndef HAVE_XSCREENNUMBEROFSCREEN
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214 #define HAVE_XSCREENNUMBEROFSCREEN
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 #endif /* 0 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
218 /* This is to work around mysterious gcc failures in some system versions.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 It is unlikely that Emacs changes will work around this problem;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 therefore, this should remain permanently. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 #ifndef HAVE_XRMSETDATABASE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 #define HAVE_XRMSETDATABASE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 /* XEmacs addition: */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 /* Linux defines these in <values.h>, but they can't be used in #if's
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
227 Include values.h now so that we don't get complaints if it's included
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
228 later. This loses with glibc-2 (libc-6) */
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
229
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
230 /* # include <features.h> */
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
231 #if 0
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
232 #if !(defined (__GLIBC__) && (__GLIBC__ >= 2))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
233
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 #include <values.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 #undef SHORTBITS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 #undef INTBITS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
237 #undef LONGBITS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238
108
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
239 #endif
360340f9fd5f Import from CVS: tag r20-1b6
cvs
parents: 70
diff changeset
240 #endif
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
241 /* The regex.o routines are a part of the GNU C-library used with Linux. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 /* However, sometimes they disagree with the src/regex.h that comes with Emacs,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 and that can make trouble in etags.c because it gets the regex.h from Emacs
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 and the function definitions in libc. So turn this off. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 /* XEmacs: in any case, Mule uses different regex routines. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 /* #define REGEXP_IN_LIBC */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 /* XEmacs change: the standard linux libc includes regex routines in
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 it. We have to use our own and have to avoid name conflicts. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 #define re_compile_pattern sys_re_compile_pattern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
252 #define re_search sys_re_search
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
253 #define re_search_2 sys_re_search_2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
254 #define re_match_2 sys_re_match_2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
255 #define re_max_failures sys_re_max_failures
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
256 #define re_set_syntax sys_re_set_syntax
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
257 #define re_set_registers sys_re_set_registers
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
258 #define re_compile_fastmap sys_re_compile_fastmap
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
259 #define re_match sys_re_match
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
260 #define regcomp sys_regcomp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
261 #define regexec sys_regexec
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
262 #define regerror sys_regerror
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
263 #define regfree sys_regfree
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
264
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
265 /* XEmacs: Damon Lipparelli says that he incorrectly gets this
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
266 defined on his system */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
267 #undef GETTIMEOFDAY_ONE_ARGUMENT
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 /* Use BSD process groups, but use setpgid() instead of setpgrp() to
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 actually set a process group. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 /* Formerly "BSD_PGRPS" */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
274 #if 0 /* XEmacs (ben): I'm not convinced this is necessary and it has
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 lots of possibility of fuckup. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 #define SIGIO_REQUIRES_SEPARATE_PROCESS_GROUP
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278 /* XEmacs: removed setpgrp() definition because we use setpgid() when
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 it's available, and autodetect it. */
116
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 108
diff changeset
280
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 108
diff changeset
281 /* glibc fuckage */
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 108
diff changeset
282 #if defined __GLIBC__ && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || __GLIBC__ > 2)
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 108
diff changeset
283 # define GETPGRP_NEEDS_ARG
9f59509498e1 Import from CVS: tag r20-1b10
cvs
parents: 108
diff changeset
284 #endif