Commit | Line | Data |
---|---|---|
60fa73fd RM |
1 | /* s/ file for netbsd system. */ |
2 | ||
3 | /* Get most of the stuff from bsd4.3 */ | |
4 | #include "bsd4-3.h" | |
5 | ||
ea224d5b | 6 | #if defined (__alpha__) && !defined (__ELF__) |
9e30760d RS |
7 | #define NO_SHARED_LIBS |
8 | #endif | |
9 | ||
e7e0c779 CH |
10 | /* For mem-limits.h. */ |
11 | #define BSD4_2 | |
12 | ||
60fa73fd | 13 | #undef KERNEL_FILE |
60fa73fd | 14 | #undef LDAV_SYMBOL |
8fffa182 | 15 | #define HAVE_GETLOADAVG 1 |
60fa73fd | 16 | |
e27fc6d3 RS |
17 | #define HAVE_UNION_WAIT |
18 | ||
60fa73fd RM |
19 | #define SIGNALS_VIA_CHARACTERS |
20 | ||
21 | #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base) | |
22 | ||
e27fc6d3 | 23 | /* netbsd uses OXTABS instead of the expected TAB3. */ |
00c1bef4 | 24 | #define TABDLY OXTABS |
e27fc6d3 RS |
25 | #define TAB3 OXTABS |
26 | ||
60fa73fd RM |
27 | #define A_TEXT_OFFSET(x) (sizeof (struct exec)) |
28 | #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr)) | |
29 | ||
e27fc6d3 RS |
30 | #define HAVE_TERMIOS |
31 | #define NO_TERMIO | |
32 | ||
60fa73fd | 33 | #define LIBS_DEBUG |
e7e0c779 | 34 | /* -lutil is not needed for NetBSD >0.9. */ |
656cdd8d | 35 | /* #define LIBS_SYSTEM -lutil */ |
e7e0c779 | 36 | #define LIBS_TERMCAP -ltermcap |
6c9364e1 | 37 | |
e27fc6d3 | 38 | #define NEED_ERRNO |
6c9364e1 RM |
39 | #define SYSV_SYSTEM_DIR |
40 | ||
e27fc6d3 RS |
41 | /* Netbsd has POSIX-style pgrp behavior. */ |
42 | #undef BSD_PGRPS | |
43 | ||
d7c35c87 RS |
44 | #define GETPGRP_NO_ARG |
45 | ||
12f230a1 | 46 | #if !defined (NO_SHARED_LIBS) && ! defined (__ELF__) |
6c9364e1 RM |
47 | /* These definitions should work for either dynamic or static linking, |
48 | whichever is the default for `cc -nostdlib'. */ | |
d1e08a36 | 49 | #define HAVE_TEXT_START /* No need to define `start_of_text'. */ |
6c9364e1 | 50 | #define START_FILES pre-crt0.o /usr/lib/crt0.o |
e7e0c779 | 51 | #define UNEXEC unexsunos4.o |
6c9364e1 | 52 | #define RUN_TIME_REMAP |
e7e0c779 CH |
53 | |
54 | /* Try to make this work for both 0.9 and >0.9. */ | |
55 | #ifndef N_TRELOFF | |
6c9364e1 RM |
56 | #define N_PAGSIZ(x) __LDPGSZ |
57 | #define N_BSSADDR(x) (N_ALIGN(x, N_DATADDR(x)+x.a_data)) | |
58 | #define N_TRELOFF(x) N_RELOFF(x) | |
e7e0c779 | 59 | #endif |
3a7093d8 KR |
60 | #endif /* not NO_SHARED_LIBS and not ELF */ |
61 | ||
62 | #if !defined (NO_SHARED_LIBS) && defined (__ELF__) | |
7a179ad4 | 63 | #define START_FILES pre-crt0.o /usr/lib/crt0.o START_FILES_1 /usr/lib/crtbegin.o |
3a7093d8 | 64 | #define UNEXEC unexelf.o |
7a179ad4 | 65 | #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o END_FILES_1 |
3a7093d8 KR |
66 | #undef LIB_GCC |
67 | #define LIB_GCC | |
68 | #endif | |
9f145434 | 69 | |
7a179ad4 RS |
70 | #ifdef HAVE_CRTIN |
71 | #define START_FILES_1 /usr/lib/crti.o | |
72 | #define END_FILES_1 /usr/lib/crtn.o | |
0c8b2afa RS |
73 | #else |
74 | #define START_FILES_1 | |
75 | #define END_FILES_1 | |
7a179ad4 RS |
76 | #endif |
77 | ||
b9fdbd74 | 78 | #define HAVE_WAIT_HEADER |
2c32be50 | 79 | #define WAIT_USE_INT |
656cdd8d | 80 | |
845b1a3c | 81 | #define AMPERSAND_FULL_NAME |
12f230a1 RS |
82 | |
83 | #ifdef __ELF__ | |
84 | /* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option | |
85 | says where to find X windows at run time. We convert it to a -rpath option | |
86 | which is what OSF1 uses. */ | |
1270031d | 87 | #define LD_SWITCH_SYSTEM_tmp `echo LD_SWITCH_X_SITE_AUX | sed -e 's/-R/-Wl,-rpath,/'` |
420a345c | 88 | #define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp -Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib |
1270031d GM |
89 | |
90 | /* The following is needed to make `configure' find Xpm, Xaw3d and | |
91 | image include and library files if using /usr/bin/gcc. That | |
92 | compiler seems to be modified to not find headers in | |
93 | /usr/local/include or libs in /usr/local/lib by default. */ | |
94 | ||
a2697022 | 95 | #define C_SWITCH_SYSTEM -I/usr/X11R6/include -I/usr/pkg/include -I/usr/local/include -L/usr/pkg/lib -L/usr/local/lib |
1270031d | 96 | |
7a179ad4 RS |
97 | /* Link temacs with -z nocombreloc so that unexec works right, whether or |
98 | not -z combreloc is the default. GNU ld ignores unknown -z KEYWORD | |
99 | switches, so this also works with older versions that don't implement | |
100 | -z combreloc. */ | |
101 | ||
c124274d | 102 | #define LD_SWITCH_SYSTEM_TEMACS -Wl,-z,nocombreloc |
7a179ad4 | 103 | |
12f230a1 | 104 | #endif /* __ELF__ */ |
ad61e7bc KH |
105 | |
106 | /* On post 1.3 releases of NetBSD, gcc -nostdlib also clears | |
107 | the library search parth, i.e. it won't search /usr/lib | |
108 | for libc and friends. Using -nostartfiles instead avoids | |
109 | this problem, and will also work on earlier NetBSD releases */ | |
110 | ||
111 | #define LINKER $(CC) -nostartfiles | |
2327e4a0 GM |
112 | |
113 | #define NARROWPROTO 1 | |
80fcd514 KR |
114 | |
115 | #define DEFAULT_SOUND_DEVICE "/dev/audio" | |
d276b0cf GM |
116 | |
117 | /* Greg A. Woods <woods@weird.com> says we must include signal.h | |
118 | before syssignal.h is included, to work around interface conflicts | |
119 | that are handled with CPP __RENAME() macro in signal.h. */ | |
120 | ||
6a72fdd1 | 121 | #ifndef NOT_C_CODE |
d276b0cf GM |
122 | #include <signal.h> |
123 | #endif | |
124 | ||
125 | /* Don't close pty in process.c to make it as controlling terminal. | |
126 | It is already a controlling terminal of subprocess, because we did | |
127 | ioctl TIOCSCTTY. */ | |
128 | ||
129 | #define DONT_REOPEN_PTY | |
177c0ea7 | 130 | |
d276b0cf GM |
131 | /* Tell that garbage collector that setjmp is known to save all |
132 | registers relevant for conservative garbage collection in the | |
133 | jmp_buf. */ | |
134 | ||
135 | #define GC_SETJMP_WORKS 1 | |
177c0ea7 | 136 | |
d276b0cf GM |
137 | /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method. */ |
138 | ||
fc40e215 | 139 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS |
d276b0cf | 140 | |
6b61353c KH |
141 | /* arch-tag: e80f364a-04e9-4faf-93cb-f36a0fe95c81 |
142 | (do not change this comment) */ |