Mercurial > emacs
annotate src/s/gnu-linux.h @ 5920:1ce51f8152c6
Fix conditional compilation.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Sat, 12 Feb 1994 01:28:45 +0000 |
parents | 50216826c507 |
children | cd81dba38a49 |
rev | line source |
---|---|
2915 | 1 /* This file is the configuration file for the Linux operating system. |
2 Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc. | |
3 | |
4 This file is part of GNU Emacs. | |
5 | |
6 GNU Emacs 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 2, or (at your option) | |
9 any later version. | |
10 | |
11 GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to | |
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
19 | |
2940
3c7c3bd60e4f
* s/linux.h: Remove copyright notices by Michael K. Johnson and
Jim Blandy <jimb@redhat.com>
parents:
2916
diff
changeset
|
20 /* This file was put together by Michael K. Johnson and Rik Faith. */ |
3c7c3bd60e4f
* s/linux.h: Remove copyright notices by Michael K. Johnson and
Jim Blandy <jimb@redhat.com>
parents:
2916
diff
changeset
|
21 |
2915 | 22 |
23 /* | |
24 * Define symbols to identify the version of Unix this is. | |
25 * Define all the symbols that apply correctly. | |
26 */ | |
27 | |
28 /* #define UNIPLUS */ | |
29 /* #define USG5 */ | |
30 #define USG | |
3335 | 31 /* #define BSD */ |
2915 | 32 #define LINUX |
33 | |
34 /* SYSTEM_TYPE should indicate the kind of system you are using. | |
35 It sets the Lisp variable system-type. */ | |
36 | |
37 #define SYSTEM_TYPE "linux" /* All the best software is free. */ | |
38 | |
39 /* Emacs can read input using SIGIO and buffering characters itself, | |
40 or using CBREAK mode and making C-g cause SIGINT. | |
41 The choice is controlled by the variable interrupt_input. | |
42 Define INTERRUPT_INPUT to make interrupt_input = 1 the default (use SIGIO) | |
43 | |
44 SIGIO can be used only on systems that implement it (4.2 and 4.3). | |
3591
507f64624555
Apply typo patches from Paul Eggert.
Jim Blandy <jimb@redhat.com>
parents:
3335
diff
changeset
|
45 CBREAK mode has two disadvantages |
2915 | 46 1) At least in 4.2, it is impossible to handle the Meta key properly. |
47 I hear that in system V this problem does not exist. | |
48 2) Control-G causes output to be discarded. | |
49 I do not know whether this can be fixed in system V. | |
50 | |
51 Another method of doing input is planned but not implemented. | |
52 It would have Emacs fork off a separate process | |
53 to read the input and send it to the true Emacs process | |
54 through a pipe. | |
55 */ | |
56 | |
57 /* There have been suggestions made to add SIGIO to Linux. If this | |
58 is done, you may, at your discretion, uncomment the line below. | |
59 */ | |
60 | |
61 /* #define INTERRUPT_INPUT */ | |
62 | |
63 /* Letter to use in finding device name of first pty, | |
64 if system supports pty's. 'p' means it is /dev/ptyp0 */ | |
65 | |
66 #define FIRST_PTY_LETTER 'p' | |
67 | |
68 /* | |
69 * Define HAVE_TERMIOS if the system provides POSIX-style | |
70 * functions and macros for terminal control. | |
71 */ | |
72 | |
73 #define HAVE_TERMIOS | |
74 | |
75 /* | |
76 * Define HAVE_TIMEVAL if the system supports the BSD style clock values. | |
77 * Look in <sys/time.h> for a timeval structure. | |
78 */ | |
79 | |
80 #define HAVE_TIMEVAL | |
81 | |
82 /* | |
83 * Define HAVE_SELECT if the system supports the `select' system call. | |
84 */ | |
85 | |
86 #define HAVE_SELECT | |
87 | |
88 /* | |
89 * Define HAVE_PTYS if the system supports pty devices. | |
90 */ | |
91 | |
92 #define HAVE_PTYS | |
93 | |
94 /* Uncomment this later when other problems are dealt with -mkj */ | |
95 | |
3014
a416873d97e5
* s/linux.h (HAVE_DUP2, HAVE_ALLOCA_H): Deleted.
Jim Blandy <jimb@redhat.com>
parents:
2989
diff
changeset
|
96 #define HAVE_SOCKETS |
2915 | 97 |
98 /* Define this symbol if your system has the functions bcopy, etc. */ | |
99 | |
100 #define BSTRING | |
101 | |
102 /* subprocesses should be defined if you want to | |
103 have code for asynchronous subprocesses | |
104 (as used in M-x compile and M-x shell). | |
105 This is generally OS dependent, and not supported | |
106 under most USG systems. */ | |
107 | |
108 #define subprocesses | |
109 | |
110 /* define MAIL_USE_FLOCK if the mailer uses flock | |
111 to interlock access to /usr/spool/mail/$USER. | |
112 The alternative is that a lock file named | |
113 /usr/spool/mail/$USER.lock. */ | |
114 | |
115 /* Both are used in Linux by different mail programs. I assume that most | |
116 people are using newer mailers that have heard of flock. Change this | |
117 if you need to. */ | |
118 | |
119 #define MAIL_USE_FLOCK | |
120 | |
121 /* Define CLASH_DETECTION if you want lock files to be written | |
122 so that Emacs can tell instantly when you try to modify | |
123 a file that someone else has modified in his Emacs. */ | |
124 | |
125 /* #define CLASH_DETECTION */ | |
126 | |
127 /* Here, on a separate page, add any special hacks needed | |
128 to make Emacs work on this system. For example, | |
129 you might define certain system call names that don't | |
130 exist on your system, or that do different things on | |
131 your system and must be used only through an encapsulation | |
132 (Which you should place, by convention, in sysdep.c). */ | |
133 | |
3335 | 134 /* On POSIX systems the system calls are interruptible by signals |
135 that the user program has elected to catch. Thus the system call | |
136 must be retried in these cases. To handle this without massive | |
137 changes in the source code, we remap the standard system call names | |
138 to names for our own functions in sysdep.c that do the system call | |
139 with retries. */ | |
140 | |
141 #define read sys_read | |
142 #define write sys_write | |
143 #define open sys_open | |
144 #define close sys_close | |
145 | |
146 #define INTERRUPTIBLE_OPEN | |
147 #define INTERRUPTIBLE_CLOSE | |
148 #define INTERRUPTIBLE_IO | |
2915 | 149 |
150 /* If you mount the proc file system somewhere other than /proc | |
151 you will have to uncomment the following and make the proper | |
152 changes */ | |
153 | |
154 /* #define LINUX_LDAV_FILE "/proc/loadavg" */ | |
155 | |
156 /* This is needed for disknew.c:update_frame() */ | |
157 | |
5387
f99b0175322e
(PENDING_OUTPUT_COUNT): Two alternate definitions
Richard M. Stallman <rms@gnu.org>
parents:
5363
diff
changeset
|
158 #ifdef emacs |
f99b0175322e
(PENDING_OUTPUT_COUNT): Two alternate definitions
Richard M. Stallman <rms@gnu.org>
parents:
5363
diff
changeset
|
159 #ifdef _IO_STDIO_H |
f99b0175322e
(PENDING_OUTPUT_COUNT): Two alternate definitions
Richard M. Stallman <rms@gnu.org>
parents:
5363
diff
changeset
|
160 /* new C libio names */ |
f99b0175322e
(PENDING_OUTPUT_COUNT): Two alternate definitions
Richard M. Stallman <rms@gnu.org>
parents:
5363
diff
changeset
|
161 #define PENDING_OUTPUT_COUNT(FILE) \ |
f99b0175322e
(PENDING_OUTPUT_COUNT): Two alternate definitions
Richard M. Stallman <rms@gnu.org>
parents:
5363
diff
changeset
|
162 ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base) |
f99b0175322e
(PENDING_OUTPUT_COUNT): Two alternate definitions
Richard M. Stallman <rms@gnu.org>
parents:
5363
diff
changeset
|
163 #else /* !_IO_STDIO_H */ |
f99b0175322e
(PENDING_OUTPUT_COUNT): Two alternate definitions
Richard M. Stallman <rms@gnu.org>
parents:
5363
diff
changeset
|
164 /* old C++ iostream names */ |
f99b0175322e
(PENDING_OUTPUT_COUNT): Two alternate definitions
Richard M. Stallman <rms@gnu.org>
parents:
5363
diff
changeset
|
165 #define PENDING_OUTPUT_COUNT(FILE) \ |
f99b0175322e
(PENDING_OUTPUT_COUNT): Two alternate definitions
Richard M. Stallman <rms@gnu.org>
parents:
5363
diff
changeset
|
166 ((FILE)->_pptr - (FILE)->_pbase) |
f99b0175322e
(PENDING_OUTPUT_COUNT): Two alternate definitions
Richard M. Stallman <rms@gnu.org>
parents:
5363
diff
changeset
|
167 #endif /* !_IO_STDIO_H */ |
f99b0175322e
(PENDING_OUTPUT_COUNT): Two alternate definitions
Richard M. Stallman <rms@gnu.org>
parents:
5363
diff
changeset
|
168 #endif /* emacs */ |
2915 | 169 |
170 /* Linux has crt0.o in a non-standard place */ | |
171 #define START_FILES pre-crt0.o /usr/lib/crt0.o | |
172 | |
173 /* Linux has SIGIO defined, but not implemented, as of version 0.99.8 | |
174 * What an ugly kludge! This will not be necessary if the | |
175 * INTERRUPT_INPUT define gets fully implemented. | |
176 */ | |
177 #ifdef emacs | |
178 #include <signal.h> | |
179 #undef SIGIO | |
3335 | 180 #undef signal |
181 #define signal sys_signal | |
182 #include <values.h> | |
2915 | 183 #endif |
184 | |
185 /* This is needed for sysdep.c */ | |
186 | |
187 #define NO_SIOCTL_H /* don't have sioctl.h */ | |
188 | |
3680
6c88b630141b
* config.h.in (HAVE_XRMSETDATABASE, HAVE_RANDOM, HAVE_LIBXBSD):
Jim Blandy <jimb@redhat.com>
parents:
3596
diff
changeset
|
189 #if 0 /* autoconf should take care of this. */ |
5071
84ee155fb9c4
(HAVE_UNISTD_H): No need to define here.
Richard M. Stallman <rms@gnu.org>
parents:
4913
diff
changeset
|
190 #define HAVE_UNISTD_H /* for getpagesize.h */ |
2915 | 191 #define HAVE_RANDOM /* is builtin */ |
3680
6c88b630141b
* config.h.in (HAVE_XRMSETDATABASE, HAVE_RANDOM, HAVE_LIBXBSD):
Jim Blandy <jimb@redhat.com>
parents:
3596
diff
changeset
|
192 #endif |
2915 | 193 #define HAVE_GETPAGESIZE |
194 #define HAVE_VFORK | |
195 #define HAVE_SYS_SIGLIST | |
196 #define HAVE_GETWD /* cure conflict with getcwd? */ | |
197 | |
198 #define USE_UTIME /* don't have utimes */ | |
199 #define SYSV_SYSTEM_DIR /* use dirent.h */ | |
200 #define USG_SYS_TIME /* use sys/time.h, not time.h */ | |
201 | |
4825 | 202 #define POSIX /* affects getpagesize.h and systty.h */ |
2915 | 203 #define POSIX_SIGNALS |
204 | |
205 /* libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared library, */ | |
206 /* we cannot get the maximum address for brk */ | |
207 #define ULIMIT_BREAK_VALUE (32*1024*1024) | |
208 | |
209 /* Best not to include -lg, unless it is last on the command line */ | |
210 #define LIBS_DEBUG | |
211 #define LIBS_TERMCAP -ltermcap -lcurses /* save some space with shared libs*/ | |
212 #define LIB_STANDARD -lc /* avoid -lPW */ | |
3279
40cbb2abad94
* linux.h (C_OPTIMIZE_SWITCH): Set this to the empty string;
Jim Blandy <jimb@redhat.com>
parents:
3207
diff
changeset
|
213 #define C_OPTIMIZE_SWITCH /* configure can guess this just fine */ |
2915 | 214 #ifdef HAVE_X11 |
215 #define LD_SWITCH_SYSTEM -L/usr/X386/lib | |
216 #endif | |
3207
257a856de952
* s/linux.h (SIGNALS_VIA_CHARACTERS): Try this out for a bit.
Jim Blandy <jimb@redhat.com>
parents:
3154
diff
changeset
|
217 |
3596
9137e78cc171
* s/linux.h (SIGNALS_VIA_CHARACTERS): Don't #define this.
Jim Blandy <jimb@redhat.com>
parents:
3591
diff
changeset
|
218 /* Let's try this out, just in case. |
9137e78cc171
* s/linux.h (SIGNALS_VIA_CHARACTERS): Don't #define this.
Jim Blandy <jimb@redhat.com>
parents:
3591
diff
changeset
|
219 Nah. Rik Faith <faith@cs.unc.edu> says it doesn't work well. */ |
9137e78cc171
* s/linux.h (SIGNALS_VIA_CHARACTERS): Don't #define this.
Jim Blandy <jimb@redhat.com>
parents:
3591
diff
changeset
|
220 /* #define SIGNALS_VIA_CHARACTERS */ |
3729
b9d69ed987e7
* s/linux.h (LIBS_MACHINE, HAVE_SYSVIPC): Set the former to -lipc,
Jim Blandy <jimb@redhat.com>
parents:
3680
diff
changeset
|
221 |
b9d69ed987e7
* s/linux.h (LIBS_MACHINE, HAVE_SYSVIPC): Set the former to -lipc,
Jim Blandy <jimb@redhat.com>
parents:
3680
diff
changeset
|
222 /* Rob Malouf <malouf@csli.stanford.edu> says: |
b9d69ed987e7
* s/linux.h (LIBS_MACHINE, HAVE_SYSVIPC): Set the former to -lipc,
Jim Blandy <jimb@redhat.com>
parents:
3680
diff
changeset
|
223 SYSV IPC is standard a standard part of Linux since version 0.99pl10, |
b9d69ed987e7
* s/linux.h (LIBS_MACHINE, HAVE_SYSVIPC): Set the former to -lipc,
Jim Blandy <jimb@redhat.com>
parents:
3680
diff
changeset
|
224 and is a very common addition to previous versions. */ |
4913
eb26686b99cf
[TERM]: Alternate definitions of LIBS_MACHINE and C_SWITCH_MACHINE.
Richard M. Stallman <rms@gnu.org>
parents:
4825
diff
changeset
|
225 |
eb26686b99cf
[TERM]: Alternate definitions of LIBS_MACHINE and C_SWITCH_MACHINE.
Richard M. Stallman <rms@gnu.org>
parents:
4825
diff
changeset
|
226 #ifdef TERM |
eb26686b99cf
[TERM]: Alternate definitions of LIBS_MACHINE and C_SWITCH_MACHINE.
Richard M. Stallman <rms@gnu.org>
parents:
4825
diff
changeset
|
227 #define LIBS_MACHINE -lclient |
eb26686b99cf
[TERM]: Alternate definitions of LIBS_MACHINE and C_SWITCH_MACHINE.
Richard M. Stallman <rms@gnu.org>
parents:
4825
diff
changeset
|
228 #define C_SWITCH_SYSTEM -D_BSD_SOURCE -I/usr/src/term |
eb26686b99cf
[TERM]: Alternate definitions of LIBS_MACHINE and C_SWITCH_MACHINE.
Richard M. Stallman <rms@gnu.org>
parents:
4825
diff
changeset
|
229 #else |
4719
f250e1299a74
(LIBS_MACHINE): Make definition empty.
Richard M. Stallman <rms@gnu.org>
parents:
3824
diff
changeset
|
230 /* alane@wozzle.linet.org says that -lipc is not a separate library, |
f250e1299a74
(LIBS_MACHINE): Make definition empty.
Richard M. Stallman <rms@gnu.org>
parents:
3824
diff
changeset
|
231 since libc-4.4.1. So -lipc was deleted. */ |
f250e1299a74
(LIBS_MACHINE): Make definition empty.
Richard M. Stallman <rms@gnu.org>
parents:
3824
diff
changeset
|
232 #define LIBS_MACHINE |
4913
eb26686b99cf
[TERM]: Alternate definitions of LIBS_MACHINE and C_SWITCH_MACHINE.
Richard M. Stallman <rms@gnu.org>
parents:
4825
diff
changeset
|
233 #define C_SWITCH_SYSTEM -D_BSD_SOURCE |
eb26686b99cf
[TERM]: Alternate definitions of LIBS_MACHINE and C_SWITCH_MACHINE.
Richard M. Stallman <rms@gnu.org>
parents:
4825
diff
changeset
|
234 #endif |
eb26686b99cf
[TERM]: Alternate definitions of LIBS_MACHINE and C_SWITCH_MACHINE.
Richard M. Stallman <rms@gnu.org>
parents:
4825
diff
changeset
|
235 |
3729
b9d69ed987e7
* s/linux.h (LIBS_MACHINE, HAVE_SYSVIPC): Set the former to -lipc,
Jim Blandy <jimb@redhat.com>
parents:
3680
diff
changeset
|
236 #define HAVE_SYSVIPC |
5363
d37a5b990e49
(A_TEXT_OFFSET, A_TEXT_SEEK, ADJUST_EXEC_HEADER): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
5071
diff
changeset
|
237 |
d37a5b990e49
(A_TEXT_OFFSET, A_TEXT_SEEK, ADJUST_EXEC_HEADER): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
5071
diff
changeset
|
238 #define A_TEXT_OFFSET(hdr) (N_MAGIC(hdr) == QMAGIC ? sizeof (struct exec) : 0) |
d37a5b990e49
(A_TEXT_OFFSET, A_TEXT_SEEK, ADJUST_EXEC_HEADER): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
5071
diff
changeset
|
239 #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr)) |
d37a5b990e49
(A_TEXT_OFFSET, A_TEXT_SEEK, ADJUST_EXEC_HEADER): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
5071
diff
changeset
|
240 #define ADJUST_EXEC_HEADER \ |
d37a5b990e49
(A_TEXT_OFFSET, A_TEXT_SEEK, ADJUST_EXEC_HEADER): Defined.
Richard M. Stallman <rms@gnu.org>
parents:
5071
diff
changeset
|
241 unexec_text_start = N_TXTADDR(ohdr) + A_TEXT_OFFSET(ohdr) |