Lines 1-33
Link Here
|
1 |
--- src/s/freebsd.h.orig Sun Jun 9 13:14:32 1996 |
1 |
--- orig/s/freebsd.h Mon Jun 10 05:14:32 1996 |
2 |
+++ src/s/freebsd.h Wed Dec 3 17:36:40 1997 |
2 |
+++ src/s/freebsd.h Tue Sep 29 11:35:32 1998 |
3 |
@@ -33,9 +33,16 @@ |
3 |
@@ -1,5 +1,15 @@ |
|
|
4 |
/* s/ file for freebsd system. */ |
4 |
|
5 |
|
5 |
#define LIBS_DEBUG |
6 |
+/* Get the correct __FreeBSD_version, even if this is before that was |
6 |
#define LIBS_SYSTEM -lutil |
7 |
+ defined. */ |
7 |
-#define LIBS_TERMCAP -ltermcap |
8 |
+#ifndef __FreeBSD__ |
8 |
#define LIB_GCC -lgcc |
9 |
+#define __FreeBSD_version 199401 |
9 |
|
10 |
+#elif __FreeBSD__ == 1 |
10 |
+#ifdef HAVE_LIBNCURSES |
11 |
+#define __FreeBSD_version 199405 |
11 |
+#define TERMINFO |
|
|
12 |
+#define LIBS_TERMCAP -lncurses |
13 |
+#else |
12 |
+#else |
14 |
+#define LIBS_TERMCAP -ltermcap |
13 |
+#include <osreldate.h> |
15 |
+#endif |
14 |
+#endif |
16 |
+ |
15 |
+ |
17 |
+ |
16 |
/* '__FreeBSD__' is defined by the preprocessor on FreeBSD-1.1 and up. |
|
|
17 |
Earlier versions do not have shared libraries, so inhibit them. |
18 |
You can inhibit them on newer systems if you wish |
19 |
@@ -34,7 +44,6 @@ |
20 |
#define LIBS_DEBUG |
21 |
#define LIBS_SYSTEM -lutil |
22 |
#define LIBS_TERMCAP -ltermcap |
23 |
-#define LIB_GCC -lgcc |
24 |
|
18 |
#define SYSV_SYSTEM_DIR |
25 |
#define SYSV_SYSTEM_DIR |
19 |
|
26 |
|
20 |
/* freebsd has POSIX-style pgrp behavior. */ |
27 |
@@ -42,12 +51,28 @@ |
21 |
@@ -46,7 +53,7 @@ |
28 |
#undef BSD_PGRPS |
|
|
29 |
#define GETPGRP_NO_ARG |
30 |
|
31 |
+#ifdef __ELF__ |
32 |
+ |
33 |
+#define LD_SWITCH_SYSTEM |
34 |
+#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o |
35 |
+#define UNEXEC unexelf.o |
36 |
+#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o |
37 |
+#undef LIB_GCC |
38 |
+#define LIB_GCC |
39 |
+ |
40 |
+#else /* not __ELF__ */ |
41 |
+ |
42 |
#ifndef NO_SHARED_LIBS |
22 |
#define LD_SWITCH_SYSTEM -e start -dc -dp |
43 |
#define LD_SWITCH_SYSTEM -e start -dc -dp |
23 |
#define HAVE_TEXT_START /* No need to define `start_of_text'. */ |
44 |
#define HAVE_TEXT_START /* No need to define `start_of_text'. */ |
|
|
45 |
+#if __FreeBSD_version >= 300002 |
46 |
+#define START_FILES pre-crt0.o /usr/lib/aout/crt0.o |
47 |
+#else /* __FreeBSD_version < 300002 */ |
24 |
#define START_FILES pre-crt0.o /usr/lib/crt0.o |
48 |
#define START_FILES pre-crt0.o /usr/lib/crt0.o |
25 |
-#define UNEXEC unexsunos4.o |
49 |
-#define UNEXEC unexsunos4.o |
|
|
50 |
+#endif /* __FreeBSD_version < 300002 */ |
26 |
+#define UNEXEC unexfreebsd.o |
51 |
+#define UNEXEC unexfreebsd.o |
27 |
#define RUN_TIME_REMAP |
52 |
#define RUN_TIME_REMAP |
|
|
53 |
+#define LIB_GCC -lgcc |
28 |
|
54 |
|
29 |
#ifndef N_TRELOFF |
55 |
#ifndef N_TRELOFF |
30 |
@@ -80,6 +87,8 @@ |
56 |
#define N_PAGSIZ(x) __LDPGSZ |
|
|
57 |
@@ -63,6 +88,8 @@ |
58 |
#endif /* __FreeBSD__ */ |
59 |
#endif /* NO_SHARED_LIBS */ |
60 |
|
61 |
+#endif /* not __ELF__ */ |
62 |
+ |
63 |
#define HAVE_WAIT_HEADER |
64 |
#define HAVE_GETLOADAVG |
65 |
/*#define HAVE_GETPAGESIZE /* configure now puts this in config.h */ |
66 |
@@ -80,6 +107,8 @@ |
31 |
#define BSD 199103 |
67 |
#define BSD 199103 |
32 |
#elif __FreeBSD__ == 2 |
68 |
#elif __FreeBSD__ == 2 |
33 |
#define BSD 199306 |
69 |
#define BSD 199306 |