Mercurial > hg > xemacs-beta
comparison src/s/linux.h @ 428:3ecd8885ac67 r21-2-22
Import from CVS: tag r21-2-22
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:28:15 +0200 |
parents | |
children | abe6d1db359e |
comparison
equal
deleted
inserted
replaced
427:0a0253eac470 | 428:3ecd8885ac67 |
---|---|
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 #define USG | |
27 #define LINUX | |
28 | |
29 /* powerpc gcc 2.8.0 doesn't define __ELF__, but it is */ | |
30 | |
31 #if defined(__ELF__) || defined(powerpc) | |
32 #define LINUX_ELF | |
33 #endif | |
34 | |
35 /* SYSTEM_TYPE should indicate the kind of system you are using. | |
36 It sets the Lisp variable system-type. */ | |
37 | |
38 #define SYSTEM_TYPE "linux" /* All the best software is free. */ | |
39 | |
40 #define FIRST_PTY_LETTER 'p' | |
41 #define HAVE_PTYS | |
42 | |
43 /* define MAIL_USE_FLOCK if the mailer uses flock | |
44 to interlock access to /usr/spool/mail/$USER. | |
45 The alternative is that a lock file named | |
46 /usr/spool/mail/$USER.lock. */ | |
47 | |
48 /* Both are used in Linux by different mail programs. I assume that most | |
49 people are using newer mailers that have heard of flock. Change this | |
50 if you need to. */ | |
51 | |
52 /*#define MAIL_USE_FLOCK*/ | |
53 | |
54 /* Here, on a separate page, add any special hacks needed | |
55 to make Emacs work on this system. For example, | |
56 you might define certain system call names that don't | |
57 exist on your system, or that do different things on | |
58 your system and must be used only through an encapsulation | |
59 (Which you should place, by convention, in sysdep.c). */ | |
60 | |
61 /* On POSIX systems the system calls are interruptible by signals | |
62 that the user program has elected to catch. Thus the system call | |
63 must be retried in these cases. To handle this without massive | |
64 changes in the source code, we remap the standard system call names | |
65 to names for our own functions in sysdep.c that do the system call | |
66 with retries. */ | |
67 | |
68 #define INTERRUPTIBLE_OPEN | |
69 #define INTERRUPTIBLE_CLOSE | |
70 #define INTERRUPTIBLE_IO | |
71 | |
72 /* This is needed for dispnew.c:update_frame */ | |
73 | |
74 #ifndef NOT_C_CODE | |
75 #include <stdio.h> /* Get the definition of _IO_STDIO_H. */ | |
76 #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM) | |
77 /* new C libio names */ | |
78 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | |
79 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) | |
80 #else /* !_IO_STDIO_H */ | |
81 /* old C++ iostream names */ | |
82 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \ | |
83 ((FILE)->_pptr - (FILE)->_pbase) | |
84 #endif /* !_IO_STDIO_H */ | |
85 #endif /* C_CODE */ | |
86 | |
87 /* Ask GCC where to find libgcc.a. */ | |
88 #define LIB_GCC "`$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`" | |
89 | |
90 #ifndef LINUX_ELF | |
91 /* Linux has crt0.o in a non-standard place */ | |
92 #define START_FILES "pre-crt0.o /usr/lib/crt0.o" | |
93 #else | |
94 /**/ | |
95 #if defined(__linux__) && defined(powerpc) /*Added by Fukui*/ | |
96 #define START_FILES /*Added by Fukui*/ | |
97 #else /*Added by Fukui*/ | |
98 | |
99 #define START_FILES "pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o" | |
100 #endif /*Added by Fukui*/ | |
101 #endif | |
102 | |
103 /* This is needed for sysdep.c */ | |
104 | |
105 #define NO_SIOCTL_H /* don't have sioctl.h */ | |
106 | |
107 #define HAVE_SYS_SIGLIST | |
108 #define HAVE_WAIT_HEADER | |
109 | |
110 #define POSIX /* affects getpagesize.h and systty.h */ | |
111 | |
112 /* Best not to include -lg, unless it is last on the command line */ | |
113 #define LIBS_DEBUG | |
114 #define LIBS_TERMCAP "-ltermcap -lcurses" /* save some space with shared libs*/ | |
115 #ifndef LINUX_ELF | |
116 #define LIB_STANDARD "-lc" /* avoid -lPW */ | |
117 #else | |
118 /*#undef LIB_GCC | |
119 #define LIB_GCC*/ | |
120 #define LIB_STANDARD "-lgcc -lc -lgcc /usr/lib/crtn.o" | |
121 #define LINKER "$(CC) -nostdlib" | |
122 #endif | |
123 | |
124 #ifdef TERM | |
125 #define LIBS_SYSTEM "-lclient" | |
126 #define C_SWITCH_SYSTEM "-I/usr/src/term" | |
127 #else | |
128 /* alane@wozzle.linet.org says that -lipc is not a separate library, | |
129 since libc-4.4.1. So -lipc was deleted. */ | |
130 #define LIBS_SYSTEM | |
131 #endif | |
132 | |
133 #ifdef LINUX_ELF | |
134 #define UNEXEC "unexelf.o" | |
135 #define UNEXEC_USE_MAP_PRIVATE | |
136 #if 0 | |
137 /* mrb - Ordinary link is simple and effective */ | |
138 /* slb - Not any more ... :-( */ | |
139 #define ORDINARY_LINK | |
140 #endif /* 0 */ | |
141 | |
142 /* I still think ORDINARY_LINK should be the default, but since slb | |
143 insists, ORDINARY_LINK will stay on until we expunge the dump code. | |
144 However, the user (i.e. me!) should be able to specify ORDINARY_LINK via | |
145 configure --cppflags=-DORDINARY_LINK ... */ | |
146 #ifdef ORDINARY_LINK | |
147 #undef LIB_STANDARD | |
148 #undef START_FILES | |
149 #undef LIB_GCC | |
150 #endif | |
151 #endif /* LINUX_ELF */ | |
152 | |
153 #ifdef LINUX_QMAGIC | |
154 | |
155 #define HAVE_TEXT_START | |
156 #define UNEXEC "unexsunos4.o" | |
157 #define N_PAGSIZ(x) PAGE_SIZE | |
158 | |
159 #else /* not LINUX_QMAGIC */ | |
160 | |
161 #define A_TEXT_OFFSET(hdr) (N_MAGIC(hdr) == QMAGIC ? sizeof (struct exec) : 0) | |
162 #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr)) | |
163 #define ADJUST_EXEC_HEADER \ | |
164 unexec_text_start = N_TXTADDR(ohdr) + A_TEXT_OFFSET(ohdr) | |
165 | |
166 #endif /* not LINUX_QMAGIC */ | |
167 | |
168 /* This is to work around mysterious gcc failures in some system versions. | |
169 It is unlikely that Emacs changes will work around this problem; | |
170 therefore, this should remain permanently. */ | |
171 #ifndef HAVE_XRMSETDATABASE | |
172 #define HAVE_XRMSETDATABASE | |
173 #endif | |
174 | |
175 /* The regex.o routines are a part of the GNU C-library used with Linux. */ | |
176 /* However, sometimes they disagree with the src/regex.h that comes with Emacs, | |
177 and that can make trouble in etags.c because it gets the regex.h from Emacs | |
178 and the function definitions in libc. So turn this off. */ | |
179 /* XEmacs: in any case, Mule uses different regex routines. */ | |
180 /* #define REGEXP_IN_LIBC */ | |
181 | |
182 /* XEmacs change: the standard linux libc includes regex routines in | |
183 it. We have to use our own and have to avoid name conflicts. */ | |
184 | |
185 #define re_compile_pattern sys_re_compile_pattern | |
186 #define re_search sys_re_search | |
187 #define re_search_2 sys_re_search_2 | |
188 #define re_match_2 sys_re_match_2 | |
189 #define re_max_failures sys_re_max_failures | |
190 #define re_set_syntax sys_re_set_syntax | |
191 #define re_set_registers sys_re_set_registers | |
192 #define re_compile_fastmap sys_re_compile_fastmap | |
193 #define re_match sys_re_match | |
194 #define regcomp sys_regcomp | |
195 #define regexec sys_regexec | |
196 #define regerror sys_regerror | |
197 #define regfree sys_regfree | |
198 | |
199 #if 0 /* mrb - if autoconf 2 is wrong, we should fix the test */ | |
200 /* XEmacs: Damon Lipparelli says that he incorrectly gets this | |
201 defined on his system */ | |
202 #undef GETTIMEOFDAY_ONE_ARGUMENT | |
203 #endif /* 0 */ | |
204 | |
205 /* Use BSD process groups, but use setpgid() instead of setpgrp() to | |
206 actually set a process group. */ | |
207 | |
208 /* XEmacs: removed setpgrp() definition because we use setpgid() when | |
209 it's available, and autodetect it. */ |