Commit | Line | Data |
---|---|---|
be210740 KH |
1 | /* s/ file for freebsd system. */ |
2 | ||
3051bc72 | 3 | /* '__FreeBSD__' is defined by the preprocessor on FreeBSD-1.1 and up. |
d05c42e4 RS |
4 | Earlier versions do not have shared libraries, so inhibit them. |
5 | You can inhibit them on newer systems if you wish | |
6 | by defining NO_SHARED_LIBS. */ | |
3051bc72 RS |
7 | #ifndef __FreeBSD__ |
8 | #define NO_SHARED_LIBS | |
9 | #endif | |
be210740 | 10 | |
c0096c73 RS |
11 | |
12 | #if 0 /* This much, alone, seemed sufficient as of 19.23. | |
13 | But it seems better to be independent of netbsd.h. */ | |
3051bc72 | 14 | #include "netbsd.h" |
be210740 | 15 | |
3051bc72 RS |
16 | #undef LIB_GCC |
17 | #define LIB_GCC -lgcc | |
18 | #undef NEED_ERRNO | |
c0096c73 RS |
19 | #endif /* 0 */ |
20 | ||
21 | ||
22 | /* Get most of the stuff from bsd4.3 */ | |
23 | #include "bsd4-3.h" | |
24 | ||
25 | /* For mem-limits.h. */ | |
26 | #define BSD4_2 | |
27 | ||
e57d8da0 | 28 | /* These aren't needed, since we have getloadavg. */ |
c0096c73 RS |
29 | #undef KERNEL_FILE |
30 | #undef LDAV_SYMBOL | |
31 | ||
32 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | |
33 | ||
c0096c73 RS |
34 | #define LIBS_DEBUG |
35 | #define LIBS_SYSTEM -lutil | |
36 | #define LIBS_TERMCAP -ltermcap | |
37 | #define LIB_GCC -lgcc | |
38 | ||
c0096c73 RS |
39 | #define SYSV_SYSTEM_DIR |
40 | ||
41 | /* freebsd has POSIX-style pgrp behavior. */ | |
42 | #undef BSD_PGRPS | |
9f9d7a9a | 43 | #define GETPGRP_NO_ARG |
c0096c73 RS |
44 | |
45 | #ifndef NO_SHARED_LIBS | |
e57d8da0 | 46 | #define LD_SWITCH_SYSTEM -e start -dc -dp |
c0096c73 RS |
47 | #define HAVE_TEXT_START /* No need to define `start_of_text'. */ |
48 | #define START_FILES pre-crt0.o /usr/lib/crt0.o | |
49 | #define UNEXEC unexsunos4.o | |
50 | #define RUN_TIME_REMAP | |
51 | ||
52 | #ifndef N_TRELOFF | |
53 | #define N_PAGSIZ(x) __LDPGSZ | |
54 | #define N_BSSADDR(x) (N_ALIGN(x, N_DATADDR(x)+x.a_data)) | |
55 | #define N_TRELOFF(x) N_RELOFF(x) | |
56 | #endif | |
d05c42e4 RS |
57 | #else /* NO_SHARED_LIBS */ |
58 | #ifdef __FreeBSD__ /* shared libs are available, but the user prefers | |
59 | not to use them. */ | |
60 | #define LD_SWITCH_SYSTEM -Bstatic | |
61 | #define A_TEXT_OFFSET(x) (sizeof (struct exec)) | |
62 | #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr)) | |
63 | #endif /* __FreeBSD__ */ | |
64 | #endif /* NO_SHARED_LIBS */ | |
c0096c73 RS |
65 | |
66 | #define HAVE_WAIT_HEADER | |
67 | #define HAVE_GETLOADAVG | |
9f9d7a9a | 68 | /*#define HAVE_GETPAGESIZE /* configure now puts this in config.h */ |
c0096c73 RS |
69 | #define HAVE_TERMIOS |
70 | #define NO_TERMIO | |
d05c42e4 | 71 | #define DECLARE_GETPWUID_WITH_UID_T |
c0096c73 RS |
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 | |
69d87222 | 79 | #if __FreeBSD__ == 1 |
c0096c73 | 80 | #define BSD 199103 |
69d87222 RS |
81 | #elif __FreeBSD__ == 2 |
82 | #define BSD 199306 | |
83 | #endif | |
c0096c73 RS |
84 | |
85 | #define WAITTYPE int | |
86 | /* get this since it won't be included if WAITTYPE is defined */ | |
87 | #ifdef emacs | |
88 | #include <sys/wait.h> | |
89 | #endif | |
90 | #define WRETCODE(w) (_W_INT(w) >> 8) |