Merge from emacs-24; up to 2012-04-26T03:04:36Z!cyd@gnu.org
[bpt/emacs.git] / src / s / unixware.h
CommitLineData
15d25dc0
DN
1/* s/ file for Unixware.
2
acaf905b 3Copyright (C) 1999-2012 Free Software Foundation, Inc.
15d25dc0
DN
4
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
20
1b231651 21#include "usg5-4-common.h"
15d25dc0 22
15d25dc0
DN
23/* #define HAVE_GETWD (appears to be buggy on SVR4.2) */
24#undef HAVE_GETWD
25
1b231651 26/* This is the same definition as in usg5-4-common.h, but with sigblock/sigunblock
ef03a4e6
DN
27 rather than sighold/sigrelse, which appear to be BSD4.1 specific.
28 It may also be appropriate for SVR4.x
15d25dc0
DN
29 (x<2) but I'm not sure. fnf@cygnus.com */
30/* This sets the name of the slave side of the PTY. On SysVr4,
31 grantpt(3) forks a subprocess, so keep sigchld_handler() from
32 intercepting that death. If any child but grantpt's should die
e05aebe9 33 within, it should be caught after sigrelse(2). */
15d25dc0
DN
34#define PTY_TTY_NAME_SPRINTF \
35 { \
5c1ccb01 36 char *ptsname (int), *ptyname; \
15d25dc0
DN
37 \
38 sigblock(sigmask(SIGCLD)); \
39 if (grantpt(fd) == -1) \
40 fatal("could not grant slave pty"); \
41 sigunblock(sigmask(SIGCLD)); \
42 if (unlockpt(fd) == -1) \
43 fatal("could not unlock slave pty"); \
44 if (!(ptyname = ptsname(fd))) \
45 fatal ("could not enable slave pty"); \
46 strncpy(pty_name, ptyname, sizeof(pty_name)); \
47 pty_name[sizeof(pty_name) - 1] = 0; \
48 }
49
b8098ef8 50#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)
b948ce8b
PE
51
52/* Conservative garbage collection has not been tested, so for now
53 play it safe and stick with the old-fashioned way of marking. */
54#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE