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
|
163
|
31 #define LIBS_SYSTEM "-lutil -lxpg4"
|
98
|
32 #else
|
163
|
33 #define LIBS_SYSTEM "-lutil"
|
98
|
34 #endif
|
151
|
35
|
177
|
36 /* Kludge to work around setlocale(LC_ALL,...) not working after 01/1997 */
|
|
37 #if __FreeBSD_version >= 199701
|
205
|
38 #ifdef HAVE_X_WINDOWS
|
179
|
39 #ifndef NOT_C_CODE
|
175
|
40 #include <X11/Xlocale.h>
|
|
41 #define setlocale(locale_category, locale_spec) setlocale(LC_CTYPE, locale_spec)
|
179
|
42 #endif /* C code */
|
175
|
43 #endif
|
205
|
44 #endif
|
175
|
45
|
163
|
46 #define LIBS_TERMCAP "-ltermcap"
|
0
|
47
|
167
|
48 #ifndef NO_SHARED_LIBS
|
|
49 #if 0 /* mrb */
|
175
|
50 #define LIB_GCC "-lgcc"
|
167
|
51 #define LD_SWITCH_SYSTEM "-dc -dp -e start"
|
|
52 #define START_FILES "pre-crt0.o /usr/lib/crt0.o"
|
|
53 #else /* mrb */
|
|
54 #define ORDINARY_LINK
|
175
|
55 #undef LIB_GCC
|
167
|
56 #undef LD_SWITCH_SYSTEM
|
|
57 #undef START_FILES
|
|
58 #endif /* mrb */
|
0
|
59
|
|
60 #define HAVE_TEXT_START /* No need to define `start_of_text'. */
|
163
|
61 #define UNEXEC "unexfreebsd.o"
|
0
|
62 #define RUN_TIME_REMAP
|
|
63
|
|
64 #ifndef N_TRELOFF
|
|
65 #define N_PAGSIZ(x) __LDPGSZ
|
|
66 #define N_BSSADDR(x) (N_ALIGN(x, N_DATADDR(x)+x.a_data))
|
|
67 #define N_TRELOFF(x) N_RELOFF(x)
|
|
68 #endif
|
|
69 #else /* NO_SHARED_LIBS */
|
|
70 #ifdef __FreeBSD__ /* shared libs are available, but the user prefers
|
|
71 not to use them. */
|
163
|
72 #define LD_SWITCH_SYSTEM "-Bstatic"
|
0
|
73 #define A_TEXT_OFFSET(x) (sizeof (struct exec))
|
|
74 #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
|
|
75 #endif /* __FreeBSD__ */
|
|
76 #endif /* NO_SHARED_LIBS */
|
|
77
|
|
78 #define HAVE_GETLOADAVG
|
177
|
79 /* #define NO_TERMIO */ /* detected in configure */
|
0
|
80 #define DECLARE_GETPWUID_WITH_UID_T
|
|
81
|
|
82 /* freebsd uses OXTABS instead of the expected TAB3. */
|
|
83 #define TABDLY OXTABS
|
|
84 #define TAB3 OXTABS
|
|
85
|
|
86 /* this silences a few compilation warnings */
|
|
87 #undef BSD
|
|
88 #if __FreeBSD__ == 1
|
|
89 #define BSD 199103
|
|
90 #elif __FreeBSD__ == 2
|
149
|
91 #if __FreeBSD_version < 199701
|
|
92 # define BSD 199306
|
|
93 #else
|
|
94 # define BSD 199506
|
|
95 #endif
|
122
|
96 #elif __FreeBSD__ == 3
|
|
97 #define BSD 199506
|
0
|
98 #endif
|
|
99
|
|
100 /* Needed to avoid hanging when child process writes an error message
|
|
101 and exits -- enami tsugutomo <enami@ba2.so-net.or.jp>. */
|
|
102 #define vfork fork
|
209
|
103
|
|
104 /* To avoid a failure of configure's check for timezone ...
|
|
105 FreeBSD actualy has `extern long timezone'. */
|
|
106 #ifndef HAVE_TIMEZONE_DECL
|
|
107 #define HAVE_TIMEZONE_DECL 1
|
|
108 #endif
|
|
109
|