annotate src/s/freebsd.h @ 132:757f1c4d15f7 xemacs-20-1

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