XEmacs 21.4.7 "Economic Science".
[chise/xemacs-chise.git.1] / src / s / linux.h
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 \f
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 #if defined __s390x__ || defined __x86_64__
99 #define START_FILES "pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o"
100 #else
101 #define START_FILES "pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o"
102 #endif
103 #endif                          /*Added by Fukui*/
104 #endif
105
106 /* This is needed for sysdep.c */
107
108 #define NO_SIOCTL_H           /* don't have sioctl.h */
109
110 #define HAVE_SYS_SIGLIST
111 #define HAVE_WAIT_HEADER
112
113 #define POSIX                 /* affects getpagesize.h and systty.h */
114
115 /* Best not to include -lg, unless it is last on the command line */
116 #define LIBS_DEBUG
117 #define LIBS_TERMCAP "-ltermcap -lcurses" /* save some space with shared libs*/
118 #ifndef LINUX_ELF
119 #define LIB_STANDARD "-lc" /* avoid -lPW */
120 #else
121 /*#undef LIB_GCC
122   #define LIB_GCC*/
123 #if defined __s390x__  || defined __x86_64__
124 #define LIB_STANDARD "-lgcc -lc -lgcc /usr/lib64/crtn.o"
125 #else
126 #define LIB_STANDARD "-lgcc -lc -lgcc /usr/lib/crtn.o"
127 #endif
128 #define LINKER "$(CC) -nostdlib"
129 #endif
130
131 #ifdef TERM
132 #define LIBS_SYSTEM "-lclient"
133 #define C_SWITCH_SYSTEM "-I/usr/src/term"
134 #else
135 /* alane@wozzle.linet.org says that -lipc is not a separate library,
136    since libc-4.4.1.  So -lipc was deleted.  */
137 #define LIBS_SYSTEM
138 #endif
139
140 #ifdef LINUX_ELF
141 #define UNEXEC "unexelf.o"
142 #define UNEXEC_USE_MAP_PRIVATE
143 #if 0
144 /* mrb - Ordinary link is simple and effective */
145 /* slb - Not any more ... :-( */
146 #define ORDINARY_LINK
147 #endif /* 0 */
148
149 /* I still think ORDINARY_LINK should be the default, but since slb
150    insists, ORDINARY_LINK will stay on until we expunge the dump code.
151    However, the user (i.e. me!) should be able to specify ORDINARY_LINK via
152    configure --cppflags=-DORDINARY_LINK ... */
153 #ifdef ORDINARY_LINK
154 #undef LIB_STANDARD
155 #undef START_FILES
156 #undef LIB_GCC
157 #endif
158 #endif /* LINUX_ELF */
159
160 #ifdef LINUX_QMAGIC
161
162 #define HAVE_TEXT_START
163 #define UNEXEC "unexsunos4.o"
164 #define N_PAGSIZ(x) PAGE_SIZE
165
166 #else /* not LINUX_QMAGIC */
167
168 #define A_TEXT_OFFSET(hdr) (N_MAGIC(hdr) == QMAGIC ? sizeof (struct exec) : 0)
169 #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
170 #define ADJUST_EXEC_HEADER \
171   unexec_text_start = N_TXTADDR(ohdr) + A_TEXT_OFFSET(ohdr)
172
173 #endif /* not LINUX_QMAGIC */
174
175 /* This is to work around mysterious gcc failures in some system versions.
176    It is unlikely that Emacs changes will work around this problem;
177    therefore, this should remain permanently.  */
178 #ifndef HAVE_XRMSETDATABASE
179 #define HAVE_XRMSETDATABASE
180 #endif
181
182 /* The regex.o routines are a part of the GNU C-library used with Linux.  */
183 /* However, sometimes they disagree with the src/regex.h that comes with Emacs,
184    and that can make trouble in etags.c because it gets the regex.h from Emacs
185    and the function definitions in libc.  So turn this off.  */
186 /* XEmacs: in any case, Mule uses different regex routines. */
187 /* #define REGEXP_IN_LIBC */
188
189 /* XEmacs change: the standard linux libc includes regex routines in
190    it.  We have to use our own and have to avoid name conflicts. */
191
192 #define re_compile_pattern sys_re_compile_pattern
193 #define re_search sys_re_search
194 #define re_search_2 sys_re_search_2
195 #define re_match_2 sys_re_match_2
196 #define re_max_failures sys_re_max_failures
197 #define re_set_syntax sys_re_set_syntax
198 #define re_set_registers sys_re_set_registers
199 #define re_compile_fastmap sys_re_compile_fastmap
200 #define re_match sys_re_match
201 #define regcomp sys_regcomp
202 #define regexec sys_regexec
203 #define regerror sys_regerror
204 #define regfree sys_regfree
205
206 #if 0 /* mrb - if autoconf 2 is wrong, we should fix the test */
207 /* XEmacs: Damon Lipparelli says that he incorrectly gets this
208    defined on his system */
209 #undef GETTIMEOFDAY_ONE_ARGUMENT
210 #endif /* 0 */
211
212 /* Use BSD process groups, but use setpgid() instead of setpgrp() to
213    actually set a process group. */
214
215 /* XEmacs: removed setpgrp() definition because we use setpgid() when
216    it's available, and autodetect it. */
217