1 /* s/ file for freebsd system. */
3 /* '__FreeBSD__' is defined by the preprocessor on FreeBSD-1.1 and up.
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. */
12 #if 0 /* This much, alone, seemed sufficient as of 19.23.
13 But it seems better to be independent of netbsd.h. */
22 /* Get most of the stuff from bsd4.3 */
25 /* For mem-limits.h. */
28 /* These aren't needed, since we have getloadavg. */
32 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
35 #define LIBS_SYSTEM -lutil
36 #define LIBS_TERMCAP -ltermcap
39 #define SYSV_SYSTEM_DIR
41 /* freebsd has POSIX-style pgrp behavior. */
43 #define GETPGRP_NO_ARG
45 #ifndef NO_SHARED_LIBS
46 #define LD_SWITCH_SYSTEM -e start -dc -dp
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
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)
57 #else /* NO_SHARED_LIBS */
58 #ifdef __FreeBSD__ /* shared libs are available, but the user prefers
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 */
66 #define HAVE_WAIT_HEADER
67 #define HAVE_GETLOADAVG
68 /*#define HAVE_GETPAGESIZE /* configure now puts this in config.h */
71 #define DECLARE_GETPWUID_WITH_UID_T
73 /* freebsd uses OXTABS instead of the expected TAB3. */
77 /* this silences a few compilation warnings */
80 #define BSD_SYSTEM 199103
81 #elif __FreeBSD__ == 2
82 #define BSD_SYSTEM 199306
83 #elif __FreeBSD__ == 3
84 #define BSD_SYSTEM 199506
88 /* get this since it won't be included if WAITTYPE is defined */
92 #define WRETCODE(w) (_W_INT(w) >> 8)
94 /* Needed to avoid hanging when child process writes an error message
95 and exits -- enami tsugutomo <enami@ba2.so-net.or.jp>. */
98 /* Don't close pty in process.c to make it as controlling terminal.
99 It is already a controlling terminal of subprocess, because we did
101 #define DONT_REOPEN_PTY