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