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