0
|
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 /* Get most of the stuff from bsd4.3 */
|
|
14 #include "bsd4-3.h"
|
|
15
|
|
16 /* For mem-limits.h. */
|
|
17 #define BSD4_2
|
|
18
|
|
19 /* These aren't needed, since we have getloadavg. */
|
|
20 #undef KERNEL_FILE
|
|
21 #undef LDAV_SYMBOL
|
|
22
|
|
23 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
|
|
24
|
|
25 #define LIBS_DEBUG
|
98
|
26 /* FreeBSD 2.2 or later */
|
|
27 #ifndef __FreeBSD_version
|
|
28 #include <osreldate.h>
|
|
29 #endif
|
|
30 #if __FreeBSD_version >= 199701
|
|
31 #define LIBS_SYSTEM -lutil -lxpg4
|
|
32 #else
|
0
|
33 #define LIBS_SYSTEM -lutil
|
98
|
34 #endif
|
151
|
35
|
0
|
36 #define LIBS_TERMCAP -ltermcap
|
|
37 #define LIB_GCC -lgcc
|
|
38
|
|
39 /* freebsd has POSIX-style pgrp behavior. */
|
|
40 #define GETPGRP_NO_ARG
|
|
41
|
|
42 #ifndef NO_SHARED_LIBS
|
155
|
43 #define LD_SWITCH_SYSTEM -dc -dp -e start
|
0
|
44 #define HAVE_TEXT_START /* No need to define `start_of_text'. */
|
|
45 #define START_FILES pre-crt0.o /usr/lib/crt0.o
|
|
46 #define UNEXEC unexfreebsd.o
|
|
47 #define RUN_TIME_REMAP
|
|
48
|
|
49 #ifndef N_TRELOFF
|
|
50 #define N_PAGSIZ(x) __LDPGSZ
|
|
51 #define N_BSSADDR(x) (N_ALIGN(x, N_DATADDR(x)+x.a_data))
|
|
52 #define N_TRELOFF(x) N_RELOFF(x)
|
|
53 #endif
|
|
54 #else /* NO_SHARED_LIBS */
|
|
55 #ifdef __FreeBSD__ /* shared libs are available, but the user prefers
|
|
56 not to use them. */
|
|
57 #define LD_SWITCH_SYSTEM -Bstatic
|
|
58 #define A_TEXT_OFFSET(x) (sizeof (struct exec))
|
|
59 #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
|
|
60 #endif /* __FreeBSD__ */
|
|
61 #endif /* NO_SHARED_LIBS */
|
|
62
|
|
63 #define HAVE_GETLOADAVG
|
|
64 #define NO_TERMIO
|
|
65 #define DECLARE_GETPWUID_WITH_UID_T
|
|
66
|
|
67 /* freebsd uses OXTABS instead of the expected TAB3. */
|
|
68 #define TABDLY OXTABS
|
|
69 #define TAB3 OXTABS
|
|
70
|
|
71 /* this silences a few compilation warnings */
|
|
72 #undef BSD
|
|
73 #if __FreeBSD__ == 1
|
|
74 #define BSD 199103
|
|
75 #elif __FreeBSD__ == 2
|
149
|
76 #if __FreeBSD_version < 199701
|
|
77 # define BSD 199306
|
|
78 #else
|
|
79 # define BSD 199506
|
|
80 #endif
|
122
|
81 #elif __FreeBSD__ == 3
|
|
82 #define BSD 199506
|
0
|
83 #endif
|
|
84
|
|
85 /* Needed to avoid hanging when child process writes an error message
|
|
86 and exits -- enami tsugutomo <enami@ba2.so-net.or.jp>. */
|
|
87 #define vfork fork
|