Convert some consecutive FSF copyright years to ranges; add 2012.
[bpt/emacs.git] / src / s / sol2-6.h
CommitLineData
07e339e4 1/* Definitions file for GNU Emacs running on Solaris 2.6.
e986c175 2
73b0cd50 3Copyright (C) 1999-2011 Free Software Foundation, Inc.
8103074a 4
07e339e4
DN
5This file is part of GNU Emacs.
6
7GNU Emacs is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 3 of the License, or
10(at your option) any later version.
11
12GNU Emacs is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19
1b231651 20#include "usg5-4-common.h"
07e339e4
DN
21
22#define SOLARIS2
23
24/* This triggers a conditional in xfaces.c. */
25#define XOS_NEEDS_TIME_H
26
27#define POSIX
28
07e339e4
DN
29/* Prefer kstat over kvm in getloadavg.c, kstat doesn't require root.
30 ghazi@caip.rutgers.edu, 7/21/97. Don't redefine if already defined
31 (e.g., by config.h). */
32#ifndef HAVE_LIBKSTAT
33#define HAVE_LIBKSTAT
34#endif
35
1b231651 36/* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock
ef03a4e6
DN
37 rather than sighold/sigrelse, which appear to be BSD4.1 specific.
38 It may also be appropriate for SVR4.x
07e339e4
DN
39 (x<2) but I'm not sure. fnf@cygnus.com */
40/* This sets the name of the slave side of the PTY. On SysVr4,
41 grantpt(3) forks a subprocess, so keep sigchld_handler() from
42 intercepting that death. If any child but grantpt's should die
43 within, it should be caught after sigrelse(2). */
44
07e339e4
DN
45#define PTY_TTY_NAME_SPRINTF \
46 { \
5c1ccb01 47 char *ptsname (int), *ptyname; \
07e339e4
DN
48 \
49 sigblock (sigmask (SIGCLD)); \
50 if (grantpt (fd) == -1) \
51 { emacs_close (fd); return -1; } \
52 sigunblock (sigmask (SIGCLD)); \
53 if (unlockpt (fd) == -1) \
54 { emacs_close (fd); return -1; } \
55 if (!(ptyname = ptsname (fd))) \
56 { emacs_close (fd); return -1; } \
57 strncpy (pty_name, ptyname, sizeof (pty_name)); \
58 pty_name[sizeof (pty_name) - 1] = 0; \
59 }
60
07e339e4
DN
61#define GC_SETJMP_WORKS 1
62#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS