]> code.delx.au - gnu-emacs/blob - src/s/sol2-6.h
Merge from emacs-23
[gnu-emacs] / src / s / sol2-6.h
1 /* Definitions file for GNU Emacs running on Solaris 2.6.
2
3 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
4 2008, 2009, 2010 Free Software Foundation, Inc.
5
6 This file is part of GNU Emacs.
7
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.
12
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.
17
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/>. */
20
21 #include "usg5-4.h"
22
23 #define SOLARIS2
24
25 /* This triggers a conditional in xfaces.c. */
26 #define XOS_NEEDS_TIME_H
27
28 #define POSIX
29
30 #define LIBS_SYSTEM -lsocket -lnsl -lkstat
31
32 /* Prefer kstat over kvm in getloadavg.c, kstat doesn't require root.
33 ghazi@caip.rutgers.edu, 7/21/97. Don't redefine if already defined
34 (e.g., by config.h). */
35 #ifndef HAVE_LIBKSTAT
36 #define HAVE_LIBKSTAT
37 #endif
38
39 /* inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
40 XIM support. */
41
42 #define INHIBIT_X11R6_XIM
43
44 /* Must use the system's termcap, if we use any termcap.
45 It does special things. */
46
47 #ifndef TERMINFO
48 #define LIBS_TERMCAP -ltermcap
49 #endif
50
51 /* This is the same definition as in usg5-4.h, but with sigblock/sigunblock
52 rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't
53 work if POSIX_SIGNALS is defined. It may also be appropriate for SVR4.x
54 (x<2) but I'm not sure. fnf@cygnus.com */
55 /* This sets the name of the slave side of the PTY. On SysVr4,
56 grantpt(3) forks a subprocess, so keep sigchld_handler() from
57 intercepting that death. If any child but grantpt's should die
58 within, it should be caught after sigrelse(2). */
59
60 #define PTY_TTY_NAME_SPRINTF \
61 { \
62 char *ptsname (), *ptyname; \
63 \
64 sigblock (sigmask (SIGCLD)); \
65 if (grantpt (fd) == -1) \
66 { emacs_close (fd); return -1; } \
67 sigunblock (sigmask (SIGCLD)); \
68 if (unlockpt (fd) == -1) \
69 { emacs_close (fd); return -1; } \
70 if (!(ptyname = ptsname (fd))) \
71 { emacs_close (fd); return -1; } \
72 strncpy (pty_name, ptyname, sizeof (pty_name)); \
73 pty_name[sizeof (pty_name) - 1] = 0; \
74 }
75
76 /* `#ifdef USE_MOTIF' won't work here, since USE_MOTIF isn't defined yet.
77 Instead, dynamically check whether USE_MOTIF expands to something. */
78 #define NOT_USING_MOTIF { set x USE_MOTIF; test "$$2" = "USE_MOTIF"; }
79
80 #ifndef __GNUC__
81 #define LD_SWITCH_SYSTEM_TEMACS -L/usr/ccs/lib LD_SWITCH_X_SITE_AUX \
82 `NOT_USING_MOTIF || echo ' -R/usr/dt/lib'`
83 #else /* GCC */
84 /* We use ./prefix-args because we don't know whether LD_SWITCH_X_SITE_AUX
85 has anything in it. It can be empty.
86 This works ok in temacs. */
87 #define LD_SWITCH_SYSTEM_TEMACS -L/usr/ccs/lib \
88 `./prefix-args -Xlinker LD_SWITCH_X_SITE_AUX` \
89 `NOT_USING_MOTIF || echo ' -R/usr/dt/lib -L/usr/dt/lib'`
90
91 /* Get rid of -traditional and let const really do its thing. */
92 #undef C_SWITCH_SYSTEM
93 #undef const
94 #endif /* GCC */
95
96 /* Gregory Neil Shapiro <gshapiro@hhmi.org> reports the Motif header files
97 are in this directory on Solaris 2.4. */
98 #define C_SWITCH_X_SYSTEM -I/usr/dt/include
99
100 /* -lgen is needed for the regex and regcmp functions
101 which are used by Motif. In the future we can try changing
102 regex.c to provide them in Emacs, but this is safer for now. */
103 #define LIB_MOTIF -lXm -lgen
104
105 /* This is the only known way to avoid some crashes
106 that seem to relate to screwed up malloc data
107 after deleting a frame. */
108 /* rms: I think the problems using ralloc had to do with system
109 libraries that called the system malloc even if we linked in the
110 GNU malloc. I could not see any way to fix the problem except to
111 have just one malloc and that had to be the system one. */
112 /* This is not always necessary. Turned off at present for testers to
113 identify any problems with gmalloc more accurately. */
114 /* #define SYSTEM_MALLOC */
115
116 /* Probably OK also on earlier versions. */
117 #define GC_SETJMP_WORKS 1
118 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
119
120 /* arch-tag: 71ea3857-89dc-4395-9623-77964e6ed3ca
121 (do not change this comment) */