Commit | Line | Data |
---|---|---|
e3efab9c | 1 | /* System description header for FreeBSD systems. |
2f86b22b | 2 | |
73b0cd50 | 3 | Copyright (C) 1994-2011 Free Software Foundation, Inc. |
e3efab9c | 4 | |
d089407f GM |
5 | Author: Shawn M. Carey |
6 | (according to authors.el) | |
7 | ||
e3efab9c GM |
8 | This file is part of GNU Emacs. |
9 | ||
4b158629 | 10 | GNU Emacs is free software: you can redistribute it and/or modify |
e3efab9c | 11 | it under the terms of the GNU General Public License as published by |
4b158629 GM |
12 | the Free Software Foundation, either version 3 of the License, or |
13 | (at your option) any later version. | |
e3efab9c GM |
14 | |
15 | GNU Emacs is distributed in the hope that it will be useful, | |
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | GNU General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU General Public License | |
4b158629 | 21 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
be210740 | 22 | |
f2a77c3a DN |
23 | /* Get most of the stuff from bsd-common */ |
24 | #include "bsd-common.h" | |
c0096c73 | 25 | |
c0096c73 RS |
26 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) |
27 | ||
8fffa182 | 28 | #define HAVE_GETLOADAVG 1 |
c0096c73 | 29 | |
e05aebe9 | 30 | /* This silences a few compilation warnings. */ |
6df54671 | 31 | #undef BSD_SYSTEM |
69d87222 | 32 | #if __FreeBSD__ == 1 |
6df54671 | 33 | #define BSD_SYSTEM 199103 |
69d87222 | 34 | #elif __FreeBSD__ == 2 |
6df54671 | 35 | #define BSD_SYSTEM 199306 |
165e2d55 | 36 | #elif __FreeBSD__ >= 3 |
3e7562b1 | 37 | #define BSD_SYSTEM 199506 |
69d87222 | 38 | #endif |
c0096c73 | 39 | |
b68f1a63 RS |
40 | /* Don't close pty in process.c to make it as controlling terminal. |
41 | It is already a controlling terminal of subprocess, because we did | |
42 | ioctl TIOCSCTTY. */ | |
43 | #define DONT_REOPEN_PTY | |
145eec6f | 44 | |
aace035e GM |
45 | /* Circumvent a bug in FreeBSD. In the following sequence of |
46 | writes/reads on a PTY, read(2) returns bogus data: | |
47 | ||
48 | write(2) 1022 bytes | |
49 | write(2) 954 bytes, get EAGAIN | |
50 | read(2) 1024 bytes in process_read_output | |
51 | read(2) 11 bytes in process_read_output | |
52 | ||
53 | That is, read(2) returns more bytes than have ever been written | |
54 | successfully. The 1033 bytes read are the 1022 bytes written | |
55 | successfully after processing (for example with CRs added if the | |
56 | terminal is set up that way which it is here). The same bytes will | |
57 | be seen again in a later read(2), without the CRs. */ | |
aace035e | 58 | #define BROKEN_PTY_READ_AFTER_EAGAIN 1 |
4b3fd719 GM |
59 | |
60 | /* Tell that garbage collector that setjmp is known to save all | |
e05aebe9 | 61 | registers relevant for conservative garbage collection in the jmp_buf. */ |
4b3fd719 | 62 | #define GC_SETJMP_WORKS 1 |
cbf5ca04 | 63 | |
e05aebe9 | 64 | /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the stack. */ |
fc40e215 | 65 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS |