Commit | Line | Data |
---|---|---|
e3efab9c GM |
1 | /* System description header for FreeBSD systems. |
2 | This file describes the parameters that system description files | |
3 | should define or not. | |
92b47a4a | 4 | Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
49f70d46 | 5 | 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 |
01122546 | 6 | Free Software Foundation, Inc. |
e3efab9c | 7 | |
d089407f GM |
8 | Author: Shawn M. Carey |
9 | (according to authors.el) | |
10 | ||
e3efab9c GM |
11 | This file is part of GNU Emacs. |
12 | ||
4b158629 | 13 | GNU Emacs is free software: you can redistribute it and/or modify |
e3efab9c | 14 | it under the terms of the GNU General Public License as published by |
4b158629 GM |
15 | the Free Software Foundation, either version 3 of the License, or |
16 | (at your option) any later version. | |
e3efab9c GM |
17 | |
18 | GNU Emacs is distributed in the hope that it will be useful, | |
19 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | GNU General Public License for more details. | |
22 | ||
23 | You should have received a copy of the GNU General Public License | |
4b158629 | 24 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
be210740 | 25 | |
62bb752f RS |
26 | /* Get the correct __FreeBSD_version, even if this is before that was |
27 | defined. */ | |
177c0ea7 | 28 | #ifndef __FreeBSD_version |
62bb752f RS |
29 | #ifndef __FreeBSD__ |
30 | #define __FreeBSD_version 199401 | |
31 | #elif __FreeBSD__ == 1 | |
32 | #define __FreeBSD_version 199405 | |
33 | #else | |
34 | #include <osreldate.h> | |
35 | #endif | |
7e6c20e8 | 36 | #endif /* !defined __FreeBSD_version */ |
62bb752f | 37 | |
3051bc72 | 38 | /* '__FreeBSD__' is defined by the preprocessor on FreeBSD-1.1 and up. |
d05c42e4 RS |
39 | Earlier versions do not have shared libraries, so inhibit them. |
40 | You can inhibit them on newer systems if you wish | |
41 | by defining NO_SHARED_LIBS. */ | |
3051bc72 RS |
42 | #ifndef __FreeBSD__ |
43 | #define NO_SHARED_LIBS | |
44 | #endif | |
be210740 | 45 | |
f2a77c3a DN |
46 | /* Get most of the stuff from bsd-common */ |
47 | #include "bsd-common.h" | |
c0096c73 RS |
48 | |
49 | /* For mem-limits.h. */ | |
50 | #define BSD4_2 | |
51 | ||
e57d8da0 | 52 | /* These aren't needed, since we have getloadavg. */ |
c0096c73 RS |
53 | #undef KERNEL_FILE |
54 | #undef LDAV_SYMBOL | |
55 | ||
56 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | |
57 | ||
c0096c73 RS |
58 | #define LIBS_DEBUG |
59 | #define LIBS_SYSTEM -lutil | |
7e0ba6da | 60 | #if __FreeBSD_version < 400000 |
c0096c73 | 61 | #define LIBS_TERMCAP -ltermcap |
5851666e RS |
62 | #else |
63 | #define TERMINFO | |
64 | #define LIBS_TERMCAP -lncurses | |
7e0ba6da | 65 | #endif |
c0096c73 | 66 | |
c0096c73 RS |
67 | #define SYSV_SYSTEM_DIR |
68 | ||
69 | /* freebsd has POSIX-style pgrp behavior. */ | |
70 | #undef BSD_PGRPS | |
71 | ||
62bb752f RS |
72 | #ifdef __ELF__ |
73 | ||
268b24ee DN |
74 | /* Let `ld' find image libs and similar things in /usr/local/lib. The |
75 | system compiler, GCC, has apparently been modified to not look | |
76 | there, contrary to what a stock GCC would do. */ | |
77 | ||
78 | #define LD_SWITCH_SYSTEM -L/usr/local/lib | |
62bb752f RS |
79 | #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o |
80 | #define UNEXEC unexelf.o | |
81 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o | |
82 | #undef LIB_GCC | |
83 | #define LIB_GCC | |
84 | ||
85 | #else /* not __ELF__ */ | |
86 | ||
04420943 | 87 | #ifdef NO_SHARED_LIBS |
d05c42e4 RS |
88 | #ifdef __FreeBSD__ /* shared libs are available, but the user prefers |
89 | not to use them. */ | |
268b24ee | 90 | #define LD_SWITCH_SYSTEM -Bstatic -L/usr/local/lib |
d05c42e4 RS |
91 | #endif /* __FreeBSD__ */ |
92 | #endif /* NO_SHARED_LIBS */ | |
c0096c73 | 93 | |
62bb752f RS |
94 | #endif /* not __ELF__ */ |
95 | ||
8fffa182 | 96 | #define HAVE_GETLOADAVG 1 |
c0096c73 RS |
97 | #define HAVE_TERMIOS |
98 | #define NO_TERMIO | |
d05c42e4 | 99 | #define DECLARE_GETPWUID_WITH_UID_T |
c0096c73 RS |
100 | |
101 | /* freebsd uses OXTABS instead of the expected TAB3. */ | |
102 | #define TABDLY OXTABS | |
103 | #define TAB3 OXTABS | |
104 | ||
105 | /* this silences a few compilation warnings */ | |
6df54671 | 106 | #undef BSD_SYSTEM |
69d87222 | 107 | #if __FreeBSD__ == 1 |
6df54671 | 108 | #define BSD_SYSTEM 199103 |
69d87222 | 109 | #elif __FreeBSD__ == 2 |
6df54671 | 110 | #define BSD_SYSTEM 199306 |
165e2d55 | 111 | #elif __FreeBSD__ >= 3 |
3e7562b1 | 112 | #define BSD_SYSTEM 199506 |
69d87222 | 113 | #endif |
c0096c73 | 114 | |
b68f1a63 RS |
115 | /* Don't close pty in process.c to make it as controlling terminal. |
116 | It is already a controlling terminal of subprocess, because we did | |
117 | ioctl TIOCSCTTY. */ | |
118 | #define DONT_REOPEN_PTY | |
145eec6f | 119 | |
2327e4a0 GM |
120 | /* If the system's imake configuration file defines `NeedWidePrototypes' |
121 | as `NO', we must define NARROWPROTO manually. Such a define is | |
177c0ea7 | 122 | generated in the Makefile generated by `xmkmf'. If we don't |
2327e4a0 GM |
123 | define NARROWPROTO, we will see the wrong function prototypes |
124 | for X functions taking float or double parameters. */ | |
125 | ||
126 | #define NARROWPROTO 1 | |
ab5d1ddf | 127 | |
ef539202 GM |
128 | /* The following is needed to make `configure' find Xpm, Xaw3d and |
129 | image include and library files if using /usr/bin/gcc. That | |
130 | compiler seems to be modified to not find headers in | |
131 | /usr/local/include or libs in /usr/local/lib by default. */ | |
ab5d1ddf | 132 | |
1f71352b | 133 | #define C_SWITCH_SYSTEM -I/usr/X11R6/include -I/usr/local/include -L/usr/local/lib |
aace035e GM |
134 | |
135 | /* Circumvent a bug in FreeBSD. In the following sequence of | |
136 | writes/reads on a PTY, read(2) returns bogus data: | |
137 | ||
138 | write(2) 1022 bytes | |
139 | write(2) 954 bytes, get EAGAIN | |
140 | read(2) 1024 bytes in process_read_output | |
141 | read(2) 11 bytes in process_read_output | |
142 | ||
143 | That is, read(2) returns more bytes than have ever been written | |
144 | successfully. The 1033 bytes read are the 1022 bytes written | |
145 | successfully after processing (for example with CRs added if the | |
146 | terminal is set up that way which it is here). The same bytes will | |
147 | be seen again in a later read(2), without the CRs. */ | |
148 | ||
149 | #define BROKEN_PTY_READ_AFTER_EAGAIN 1 | |
4b3fd719 GM |
150 | |
151 | /* Tell that garbage collector that setjmp is known to save all | |
152 | registers relevant for conservative garbage collection in the | |
153 | jmp_buf. */ | |
154 | ||
155 | #define GC_SETJMP_WORKS 1 | |
cbf5ca04 | 156 | |
fc653ef2 GM |
157 | /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the |
158 | stack. */ | |
159 | ||
fc40e215 | 160 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS |
fc653ef2 | 161 | |
67cdbf16 GM |
162 | /* Define USE_MMAP_FOR_BUFFERS to let Emacs use mmap(2) to allocate |
163 | buffer text. This overrides REL_ALLOC. */ | |
fc653ef2 | 164 | |
67cdbf16 | 165 | #define USE_MMAP_FOR_BUFFERS 1 |
76bb714a GM |
166 | |
167 | /* Use sigprocmask(2) and friends instead of sigblock(2); the man page | |
168 | of sigblock says it is obsolete. */ | |
169 | ||
170 | #define POSIX_SIGNALS 1 | |
ab5796a9 | 171 | |
74d6f539 GM |
172 | /* The `combreloc' setting became the default, and it seems to be |
173 | incompatible with unexec. Symptom is an immediate SEGV in | |
174 | XtInitializeWidget when starting Emacs under X11. */ | |
175 | ||
176 | #if defined __FreeBSD_version && __FreeBSD_version >= 500042 | |
177 | #define LD_SWITCH_SYSTEM_TEMACS -znocombreloc | |
178 | #endif | |
179 | ||
ab5796a9 MB |
180 | /* arch-tag: 426529ca-b7c4-448f-b10a-d4dcdc9c78eb |
181 | (do not change this comment) */ |