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