Fix more GCC strict-aliasing warnings.
[emacs.git] / src / s / netbsd.h
blob4a9e31167e202e56f5ba492fefd9173470caf2c3
1 /* s/ file for netbsd system.
3 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007,
4 2008, 2009, 2010, 2011 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 bsd-common */
23 #include "bsd-common.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 PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)
38 /* netbsd uses OXTABS instead of the expected TAB3. */
39 #define TABDLY OXTABS
40 #define TAB3 OXTABS
42 #define HAVE_TERMIOS
43 #define NO_TERMIO
45 #define LIBS_DEBUG
46 /* -lutil is not needed for NetBSD >0.9. */
47 /* #define LIBS_SYSTEM -lutil */
48 #ifdef TERMINFO
49 #define LIBS_TERMCAP -lterminfo
50 #else
51 #define LIBS_TERMCAP -ltermcap
52 #endif
54 #define NEED_ERRNO
55 #define SYSV_SYSTEM_DIR
57 /* Netbsd has POSIX-style pgrp behavior. */
58 #undef BSD_PGRPS
60 #if !defined (NO_SHARED_LIBS) && defined (__ELF__)
61 #define START_FILES pre-crt0.o /usr/lib/crt0.o START_FILES_1 /usr/lib/crtbegin.o
62 #define UNEXEC unexelf.o
63 #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o END_FILES_1
64 #undef LIB_GCC
65 #define LIB_GCC
66 #endif
68 #ifdef HAVE_CRTIN
69 #define START_FILES_1 /usr/lib/crti.o
70 #define END_FILES_1 /usr/lib/crtn.o
71 #else
72 #define START_FILES_1
73 #define END_FILES_1
74 #endif
76 #define AMPERSAND_FULL_NAME
78 #ifdef __ELF__
79 /* Here is how to find X Windows. LD_SWITCH_X_SITE_AUX gives an -R option
80 says where to find X windows at run time. We convert it to a -rpath option
81 which is what OSF1 uses. */
82 #define LD_SWITCH_SYSTEM_tmp `echo LD_SWITCH_X_SITE_AUX | sed -e 's/-R/-Wl,-rpath,/'`
83 #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
85 /* The following is needed to make `configure' find Xpm, Xaw3d and
86 image include and library files if using /usr/bin/gcc. That
87 compiler seems to be modified to not find headers in
88 /usr/local/include or libs in /usr/local/lib by default. */
90 #define C_SWITCH_SYSTEM -I/usr/X11R6/include -I/usr/pkg/include -I/usr/local/include -L/usr/pkg/lib -L/usr/local/lib
92 /* Link temacs with -z nocombreloc so that unexec works right, whether or
93 not -z combreloc is the default. GNU ld ignores unknown -z KEYWORD
94 switches, so this also works with older versions that don't implement
95 -z combreloc. */
97 #define LD_SWITCH_SYSTEM_TEMACS -Wl,-z,nocombreloc
99 #endif /* __ELF__ */
101 /* On post 1.3 releases of NetBSD, gcc -nostdlib also clears
102 the library search parth, i.e. it won't search /usr/lib
103 for libc and friends. Using -nostartfiles instead avoids
104 this problem, and will also work on earlier NetBSD releases */
106 #define LINKER $(CC) -nostartfiles
108 #define NARROWPROTO 1
110 #define DEFAULT_SOUND_DEVICE "/dev/audio"
112 /* Greg A. Woods <woods@weird.com> says we must include signal.h
113 before syssignal.h is included, to work around interface conflicts
114 that are handled with CPP __RENAME() macro in signal.h. */
116 #ifndef NOT_C_CODE
117 #include <signal.h>
118 #endif
120 /* Don't close pty in process.c to make it as controlling terminal.
121 It is already a controlling terminal of subprocess, because we did
122 ioctl TIOCSCTTY. */
124 #define DONT_REOPEN_PTY
126 /* Tell that garbage collector that setjmp is known to save all
127 registers relevant for conservative garbage collection in the
128 jmp_buf. */
130 #define GC_SETJMP_WORKS 1
132 /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method. */
134 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
136 /* Use sigprocmask and friends instead of sigblock;
137 sigblock is considered obsolete on NetBSD. */
139 #define POSIX_SIGNALS 1
141 /* arch-tag: e80f364a-04e9-4faf-93cb-f36a0fe95c81
142 (do not change this comment) */