Remove unneeded #define POSIX
[emacs.git] / src / s / sol2-6.h
blob6a7c261054f619d2325ca71a53735a8d1e96a0f3
1 /* Definitions file for GNU Emacs running on Solaris 2.6.
3 Copyright (C) 1999-2012 Free Software Foundation, Inc.
5 This file is part of GNU Emacs.
7 GNU Emacs is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 GNU Emacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 #include "usg5-4-common.h"
22 #define SOLARIS2
24 /* This triggers a conditional in xfaces.c. */
25 #define XOS_NEEDS_TIME_H
27 /* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock
28 rather than sighold/sigrelse, which appear to be BSD4.1 specific.
29 It may also be appropriate for SVR4.x
30 (x<2) but I'm not sure. fnf@cygnus.com */
31 /* This sets the name of the slave side of the PTY. On SysVr4,
32 grantpt(3) forks a subprocess, so keep sigchld_handler() from
33 intercepting that death. If any child but grantpt's should die
34 within, it should be caught after sigrelse(2). */
36 #define PTY_TTY_NAME_SPRINTF \
37 { \
38 char *ptsname (int), *ptyname; \
40 sigblock (sigmask (SIGCLD)); \
41 if (grantpt (fd) == -1) \
42 { emacs_close (fd); return -1; } \
43 sigunblock (sigmask (SIGCLD)); \
44 if (unlockpt (fd) == -1) \
45 { emacs_close (fd); return -1; } \
46 if (!(ptyname = ptsname (fd))) \
47 { emacs_close (fd); return -1; } \
48 snprintf (pty_name, sizeof pty_name, "%s", ptyname); \
51 #define GC_SETJMP_WORKS 1