]> code.delx.au - gnu-emacs/blob - src/s/sol2-6.h
Nuke arch-tags.
[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, 2011 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-common.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 /* Prefer kstat over kvm in getloadavg.c, kstat doesn't require root.
31 ghazi@caip.rutgers.edu, 7/21/97. Don't redefine if already defined
32 (e.g., by config.h). */
33 #ifndef HAVE_LIBKSTAT
34 #define HAVE_LIBKSTAT
35 #endif
36
37 /* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock
38 rather than sighold/sigrelse, which appear to be BSD4.1 specific.
39 It may also be appropriate for SVR4.x
40 (x<2) but I'm not sure. fnf@cygnus.com */
41 /* This sets the name of the slave side of the PTY. On SysVr4,
42 grantpt(3) forks a subprocess, so keep sigchld_handler() from
43 intercepting that death. If any child but grantpt's should die
44 within, it should be caught after sigrelse(2). */
45
46 #define PTY_TTY_NAME_SPRINTF \
47 { \
48 char *ptsname (), *ptyname; \
49 \
50 sigblock (sigmask (SIGCLD)); \
51 if (grantpt (fd) == -1) \
52 { emacs_close (fd); return -1; } \
53 sigunblock (sigmask (SIGCLD)); \
54 if (unlockpt (fd) == -1) \
55 { emacs_close (fd); return -1; } \
56 if (!(ptyname = ptsname (fd))) \
57 { emacs_close (fd); return -1; } \
58 strncpy (pty_name, ptyname, sizeof (pty_name)); \
59 pty_name[sizeof (pty_name) - 1] = 0; \
60 }
61
62 #define GC_SETJMP_WORKS 1
63 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
64