* syswait.h: Remove old if 0 code. Do not define WAITTYPE, it was
[bpt/emacs.git] / src / s / netbsd.h
CommitLineData
6e0394c0
GM
1/* s/ file for netbsd system.
2
4b158629
GM
3 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007,
4 2008 Free Software Foundation, Inc.
6e0394c0
GM
5
6This file is part of GNU Emacs.
7
4b158629 8GNU Emacs is free software: you can redistribute it and/or modify
6e0394c0 9it under the terms of the GNU General Public License as published by
4b158629
GM
10the Free Software Foundation, either version 3 of the License, or
11(at your option) any later version.
6e0394c0
GM
12
13GNU Emacs is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
4b158629 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
6e0394c0 20
60fa73fd 21
f2a77c3a
DN
22/* Get most of the stuff from bsd-common */
23#include "bsd-common.h"
60fa73fd 24
ea224d5b 25#if defined (__alpha__) && !defined (__ELF__)
9e30760d
RS
26#define NO_SHARED_LIBS
27#endif
28
e7e0c779
CH
29/* For mem-limits.h. */
30#define BSD4_2
31
60fa73fd 32#undef KERNEL_FILE
60fa73fd 33#undef LDAV_SYMBOL
8fffa182 34#define HAVE_GETLOADAVG 1
60fa73fd
RM
35
36#define SIGNALS_VIA_CHARACTERS
37
38#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
39
e27fc6d3 40/* netbsd uses OXTABS instead of the expected TAB3. */
00c1bef4 41#define TABDLY OXTABS
e27fc6d3
RS
42#define TAB3 OXTABS
43
60fa73fd
RM
44#define A_TEXT_OFFSET(x) (sizeof (struct exec))
45#define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
46
e27fc6d3
RS
47#define HAVE_TERMIOS
48#define NO_TERMIO
49
60fa73fd 50#define LIBS_DEBUG
e7e0c779 51/* -lutil is not needed for NetBSD >0.9. */
656cdd8d 52/* #define LIBS_SYSTEM -lutil */
e7e0c779 53#define LIBS_TERMCAP -ltermcap
6c9364e1 54
e27fc6d3 55#define NEED_ERRNO
6c9364e1
RM
56#define SYSV_SYSTEM_DIR
57
e27fc6d3
RS
58/* Netbsd has POSIX-style pgrp behavior. */
59#undef BSD_PGRPS
60
d7c35c87
RS
61#define GETPGRP_NO_ARG
62
12f230a1 63#if !defined (NO_SHARED_LIBS) && ! defined (__ELF__)
6c9364e1
RM
64/* These definitions should work for either dynamic or static linking,
65 whichever is the default for `cc -nostdlib'. */
d1e08a36 66#define HAVE_TEXT_START /* No need to define `start_of_text'. */
6c9364e1 67#define START_FILES pre-crt0.o /usr/lib/crt0.o
e7e0c779 68#define UNEXEC unexsunos4.o
6c9364e1 69#define RUN_TIME_REMAP
e7e0c779
CH
70
71/* Try to make this work for both 0.9 and >0.9. */
72#ifndef N_TRELOFF
6c9364e1 73#define N_TRELOFF(x) N_RELOFF(x)
e7e0c779 74#endif
3a7093d8
KR
75#endif /* not NO_SHARED_LIBS and not ELF */
76
77#if !defined (NO_SHARED_LIBS) && defined (__ELF__)
7a179ad4 78#define START_FILES pre-crt0.o /usr/lib/crt0.o START_FILES_1 /usr/lib/crtbegin.o
3a7093d8 79#define UNEXEC unexelf.o
7a179ad4 80#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o END_FILES_1
3a7093d8
KR
81#undef LIB_GCC
82#define LIB_GCC
83#endif
9f145434 84
7a179ad4
RS
85#ifdef HAVE_CRTIN
86#define START_FILES_1 /usr/lib/crti.o
87#define END_FILES_1 /usr/lib/crtn.o
0c8b2afa
RS
88#else
89#define START_FILES_1
90#define END_FILES_1
7a179ad4
RS
91#endif
92
845b1a3c 93#define AMPERSAND_FULL_NAME
12f230a1
RS
94
95#ifdef __ELF__
96/* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option
97 says where to find X windows at run time. We convert it to a -rpath option
98 which is what OSF1 uses. */
1270031d 99#define LD_SWITCH_SYSTEM_tmp `echo LD_SWITCH_X_SITE_AUX | sed -e 's/-R/-Wl,-rpath,/'`
420a345c 100#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
101
102/* The following is needed to make `configure' find Xpm, Xaw3d and
103 image include and library files if using /usr/bin/gcc. That
104 compiler seems to be modified to not find headers in
105 /usr/local/include or libs in /usr/local/lib by default. */
106
a2697022 107#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 108
7a179ad4
RS
109/* Link temacs with -z nocombreloc so that unexec works right, whether or
110 not -z combreloc is the default. GNU ld ignores unknown -z KEYWORD
111 switches, so this also works with older versions that don't implement
112 -z combreloc. */
113
c124274d 114#define LD_SWITCH_SYSTEM_TEMACS -Wl,-z,nocombreloc
7a179ad4 115
12f230a1 116#endif /* __ELF__ */
ad61e7bc
KH
117
118/* On post 1.3 releases of NetBSD, gcc -nostdlib also clears
119 the library search parth, i.e. it won't search /usr/lib
120 for libc and friends. Using -nostartfiles instead avoids
121 this problem, and will also work on earlier NetBSD releases */
122
123#define LINKER $(CC) -nostartfiles
2327e4a0
GM
124
125#define NARROWPROTO 1
80fcd514
KR
126
127#define DEFAULT_SOUND_DEVICE "/dev/audio"
d276b0cf
GM
128
129/* Greg A. Woods <woods@weird.com> says we must include signal.h
130 before syssignal.h is included, to work around interface conflicts
131 that are handled with CPP __RENAME() macro in signal.h. */
132
6a72fdd1 133#ifndef NOT_C_CODE
d276b0cf
GM
134#include <signal.h>
135#endif
136
137/* Don't close pty in process.c to make it as controlling terminal.
138 It is already a controlling terminal of subprocess, because we did
139 ioctl TIOCSCTTY. */
140
141#define DONT_REOPEN_PTY
177c0ea7 142
d276b0cf
GM
143/* Tell that garbage collector that setjmp is known to save all
144 registers relevant for conservative garbage collection in the
145 jmp_buf. */
146
147#define GC_SETJMP_WORKS 1
177c0ea7 148
d276b0cf
GM
149/* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method. */
150
fc40e215 151#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
d276b0cf 152
ea7ce821
RS
153/* Use sigprocmask and friends instead of sigblock;
154 sigblock is considered obsolete on NetBSD. */
155
156#define POSIX_SIGNALS 1
157
ab5796a9
MB
158/* arch-tag: e80f364a-04e9-4faf-93cb-f36a0fe95c81
159 (do not change this comment) */