(set-version): Add doc/lispref/vol1.texi,vol2.texi.
[emacs.git] / src / s / netbsd.h
bloba61a4e74366a266aececbb60a1ec372a92f8985f
1 /* s/ file for netbsd system.
3 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007,
4 2008 Free Software Foundation, Inc.
6 This file is part of GNU Emacs.
8 GNU Emacs is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 GNU Emacs is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
22 /* Get most of the stuff from bsd4.3 */
23 #include "bsd4-3.h"
25 #if defined (__alpha__) && !defined (__ELF__)
26 #define NO_SHARED_LIBS
27 #endif
29 /* For mem-limits.h. */
30 #define BSD4_2
32 #undef KERNEL_FILE
33 #undef LDAV_SYMBOL
34 #define HAVE_GETLOADAVG 1
36 #define HAVE_UNION_WAIT
38 #define SIGNALS_VIA_CHARACTERS
40 #define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
42 /* netbsd uses OXTABS instead of the expected TAB3. */
43 #define TABDLY OXTABS
44 #define TAB3 OXTABS
46 #define A_TEXT_OFFSET(x) (sizeof (struct exec))
47 #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
49 #define HAVE_TERMIOS
50 #define NO_TERMIO
52 #define LIBS_DEBUG
53 /* -lutil is not needed for NetBSD >0.9. */
54 /* #define LIBS_SYSTEM -lutil */
55 #define LIBS_TERMCAP -ltermcap
57 #define NEED_ERRNO
58 #define SYSV_SYSTEM_DIR
60 /* Netbsd has POSIX-style pgrp behavior. */
61 #undef BSD_PGRPS
63 #define GETPGRP_NO_ARG
65 #if !defined (NO_SHARED_LIBS) && ! defined (__ELF__)
66 /* These definitions should work for either dynamic or static linking,
67 whichever is the default for `cc -nostdlib'. */
68 #define HAVE_TEXT_START /* No need to define `start_of_text'. */
69 #define START_FILES pre-crt0.o /usr/lib/crt0.o
70 #define UNEXEC unexsunos4.o
71 #define RUN_TIME_REMAP
73 /* Try to make this work for both 0.9 and >0.9. */
74 #ifndef N_TRELOFF
75 #define N_PAGSIZ(x) __LDPGSZ
76 #define N_BSSADDR(x) (N_ALIGN(x, N_DATADDR(x)+x.a_data))
77 #define N_TRELOFF(x) N_RELOFF(x)
78 #endif
79 #endif /* not NO_SHARED_LIBS and not ELF */
81 #if !defined (NO_SHARED_LIBS) && defined (__ELF__)
82 #define START_FILES pre-crt0.o /usr/lib/crt0.o START_FILES_1 /usr/lib/crtbegin.o
83 #define UNEXEC unexelf.o
84 #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o END_FILES_1
85 #undef LIB_GCC
86 #define LIB_GCC
87 #endif
89 #ifdef HAVE_CRTIN
90 #define START_FILES_1 /usr/lib/crti.o
91 #define END_FILES_1 /usr/lib/crtn.o
92 #else
93 #define START_FILES_1
94 #define END_FILES_1
95 #endif
97 #define HAVE_WAIT_HEADER
98 #define WAIT_USE_INT
100 #define AMPERSAND_FULL_NAME
102 #ifdef __ELF__
103 /* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option
104 says where to find X windows at run time. We convert it to a -rpath option
105 which is what OSF1 uses. */
106 #define LD_SWITCH_SYSTEM_tmp `echo LD_SWITCH_X_SITE_AUX | sed -e 's/-R/-Wl,-rpath,/'`
107 #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
109 /* The following is needed to make `configure' find Xpm, Xaw3d and
110 image include and library files if using /usr/bin/gcc. That
111 compiler seems to be modified to not find headers in
112 /usr/local/include or libs in /usr/local/lib by default. */
114 #define C_SWITCH_SYSTEM -I/usr/X11R6/include -I/usr/pkg/include -I/usr/local/include -L/usr/pkg/lib -L/usr/local/lib
116 /* Link temacs with -z nocombreloc so that unexec works right, whether or
117 not -z combreloc is the default. GNU ld ignores unknown -z KEYWORD
118 switches, so this also works with older versions that don't implement
119 -z combreloc. */
121 #define LD_SWITCH_SYSTEM_TEMACS -Wl,-z,nocombreloc
123 #endif /* __ELF__ */
125 /* On post 1.3 releases of NetBSD, gcc -nostdlib also clears
126 the library search parth, i.e. it won't search /usr/lib
127 for libc and friends. Using -nostartfiles instead avoids
128 this problem, and will also work on earlier NetBSD releases */
130 #define LINKER $(CC) -nostartfiles
132 #define NARROWPROTO 1
134 #define DEFAULT_SOUND_DEVICE "/dev/audio"
136 /* Greg A. Woods <woods@weird.com> says we must include signal.h
137 before syssignal.h is included, to work around interface conflicts
138 that are handled with CPP __RENAME() macro in signal.h. */
140 #ifndef NOT_C_CODE
141 #include <signal.h>
142 #endif
144 /* Don't close pty in process.c to make it as controlling terminal.
145 It is already a controlling terminal of subprocess, because we did
146 ioctl TIOCSCTTY. */
148 #define DONT_REOPEN_PTY
150 /* Tell that garbage collector that setjmp is known to save all
151 registers relevant for conservative garbage collection in the
152 jmp_buf. */
154 #define GC_SETJMP_WORKS 1
156 /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method. */
158 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
160 /* Use sigprocmask and friends instead of sigblock;
161 sigblock is considered obsolete on NetBSD. */
163 #define POSIX_SIGNALS 1
165 /* arch-tag: e80f364a-04e9-4faf-93cb-f36a0fe95c81
166 (do not change this comment) */