Mercurial > hg > xemacs-beta
comparison src/s/freebsd.h @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children | 4103f0995bd7 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
1 /* Synched up with: FSF 19.31. */ | |
2 | |
3 /* s/ file for freebsd system. */ | |
4 | |
5 /* '__FreeBSD__' is defined by the preprocessor on FreeBSD-1.1 and up. | |
6 Earlier versions do not have shared libraries, so inhibit them. | |
7 You can inhibit them on newer systems if you wish | |
8 by defining NO_SHARED_LIBS. */ | |
9 #ifndef __FreeBSD__ | |
10 #define NO_SHARED_LIBS | |
11 #endif | |
12 | |
13 #if 0 /* This much, alone, seemed sufficient as of 19.23. | |
14 But it seems better to be independent of netbsd.h. */ | |
15 #include "netbsd.h" | |
16 | |
17 #undef LIB_GCC | |
18 #define LIB_GCC -lgcc | |
19 #undef NEED_ERRNO | |
20 #endif /* 0 */ | |
21 | |
22 | |
23 /* Get most of the stuff from bsd4.3 */ | |
24 #include "bsd4-3.h" | |
25 | |
26 /* For mem-limits.h. */ | |
27 #define BSD4_2 | |
28 | |
29 /* These aren't needed, since we have getloadavg. */ | |
30 #undef KERNEL_FILE | |
31 #undef LDAV_SYMBOL | |
32 | |
33 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | |
34 | |
35 #define LIBS_DEBUG | |
36 #define LIBS_SYSTEM -lutil | |
37 /* XEmacs change: */ | |
38 #ifdef HAVE_NCURSES | |
39 #define LIBS_TERMCAP -lncurses -ltermcap | |
40 #else | |
41 #define LIBS_TERMCAP -ltermcap | |
42 #endif | |
43 #define LIB_GCC -lgcc | |
44 | |
45 /* freebsd has POSIX-style pgrp behavior. */ | |
46 #define GETPGRP_NO_ARG | |
47 | |
48 #ifndef NO_SHARED_LIBS | |
49 #define LD_SWITCH_SYSTEM -e start -dc -dp | |
50 #define HAVE_TEXT_START /* No need to define `start_of_text'. */ | |
51 #define START_FILES pre-crt0.o /usr/lib/crt0.o | |
52 #define UNEXEC unexfreebsd.o | |
53 #define RUN_TIME_REMAP | |
54 | |
55 #ifndef N_TRELOFF | |
56 #define N_PAGSIZ(x) __LDPGSZ | |
57 #define N_BSSADDR(x) (N_ALIGN(x, N_DATADDR(x)+x.a_data)) | |
58 #define N_TRELOFF(x) N_RELOFF(x) | |
59 #endif | |
60 #else /* NO_SHARED_LIBS */ | |
61 #ifdef __FreeBSD__ /* shared libs are available, but the user prefers | |
62 not to use them. */ | |
63 #define LD_SWITCH_SYSTEM -Bstatic | |
64 #define A_TEXT_OFFSET(x) (sizeof (struct exec)) | |
65 #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr)) | |
66 #endif /* __FreeBSD__ */ | |
67 #endif /* NO_SHARED_LIBS */ | |
68 | |
69 #define HAVE_GETLOADAVG | |
70 #define NO_TERMIO | |
71 #define DECLARE_GETPWUID_WITH_UID_T | |
72 | |
73 /* freebsd uses OXTABS instead of the expected TAB3. */ | |
74 #define TABDLY OXTABS | |
75 #define TAB3 OXTABS | |
76 | |
77 /* this silences a few compilation warnings */ | |
78 #undef BSD | |
79 #if __FreeBSD__ == 1 | |
80 #define BSD 199103 | |
81 #elif __FreeBSD__ == 2 | |
82 #define BSD 199306 | |
83 #endif | |
84 | |
85 #undef HAVE_UNION_WAIT | |
86 /* #### XEmacs: Is this necessary? */ | |
87 #define WRETCODE(w) (_W_INT(w) >> 8) | |
88 | |
89 /* FreeBSD defines INT_MAX in /usr/include/limits.h. | |
90 Unless INT_MAX is already defined in lisp.h, XEmacs goes right | |
91 ahead and rolls its own. | |
92 We make sure that the system's definition is used throughout. */ | |
93 #ifdef emacs | |
94 #include <limits.h> | |
95 #endif | |
96 | |
97 /* Needed to avoid hanging when child process writes an error message | |
98 and exits -- enami tsugutomo <enami@ba2.so-net.or.jp>. */ | |
99 #define vfork fork |