1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
$NetBSD: patch-aa,v 1.4 2017/05/07 06:49:23 tsutsui Exp $
--- src/s/netbsd.h.orig 1995-10-12 10:53:15.000000000 +0000
+++ src/s/netbsd.h
@@ -3,6 +3,10 @@
/* Get most of the stuff from bsd4.3 */
#include "bsd4-3.h"
+#if defined (__alpha__) && !defined (__ELF__)
+#define NO_SHARED_LIBS
+#endif
+
/* For mem-limits.h. */
#define BSD4_2
@@ -30,9 +34,10 @@
#define NO_TERMIO
#define LIBS_DEBUG
-/* -lutil is not needed for NetBSD >0.9. */
-#define LIBS_SYSTEM -lutil -lcrypt
-#define LIBS_TERMCAP -ltermcap
+#define LIBS_SYSTEM -lcrypt
+
+#define TERMINFO
+#define LIBS_TERMCAP -lterminfo
#define NEED_ERRNO
#define SYSV_SYSTEM_DIR
@@ -40,7 +45,9 @@
/* Netbsd has POSIX-style pgrp behavior. */
#undef BSD_PGRPS
-#ifndef NO_SHARED_LIBS
+#define GETPGRP_NO_ARG
+
+#if !defined (NO_SHARED_LIBS) && ! defined (__ELF__)
/* These definitions should work for either dynamic or static linking,
whichever is the default for `cc -nostdlib'. */
#define HAVE_TEXT_START /* No need to define `start_of_text'. */
@@ -54,14 +61,40 @@
#define N_BSSADDR(x) (N_ALIGN(x, N_DATADDR(x)+x.a_data))
#define N_TRELOFF(x) N_RELOFF(x)
#endif
-#endif /* not NO_SHARED_LIBS */
-
-/* Reread the time zone on startup. */
-#define LOCALTIME_CACHE
+#endif /* not NO_SHARED_LIBS and not ELF */
#define HAVE_WAIT_HEADER
+#define WAIT_USE_INT
+
+#define NO_MATHERR
+
+#define AMPERSAND_FULL_NAME
+
+#ifdef __ELF__
+/* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option
+ says where to find X windows at run time. We convert it to a -rpath option
+ which is what OSF1 uses. */
+#define LD_SWITCH_SYSTEM `echo LD_SWITCH_X_SITE_AUX | sed -e 's/-R/-Wl,-rpath,/'` -Wl,-znocombreloc
+
+#define HAVE_TEXT_START /* No need to define `start_of_text'. */
+#define UNEXEC unexelf.o
+#define ORDINARY_LINK
+
+#if defined(__i386__)
+#define DATA_SEG_BITS 0x08000000
+#endif /* __i386__ */
+
+#endif /* __ELF__ */
+
+/* On post 1.3 releases of NetBSD, gcc -nostdlib also clears
+ the library search parth, i.e. it won't search /usr/lib
+ for libc and friends. Using -nostartfiles instead avoids
+ this problem, and will also work on earlier NetBSD releases */
+
+#define LINKER $(CC) -nostartfiles
-/* 94.7.29 by T.Sakakibara <tomo@axis.co.jp> */
#ifdef emacs
-#include <sys/types.h>
+#include <strings.h>
+#include <stdlib.h>
+#include <unistd.h>
#endif
|