comparison src/s/sol2-3.h @ 8513:d11ec52807d6

(POSIX_SIGNALS): Define it. (PTY_TTY_NAME_SPRINTF): New overriding definition. (sigsetmask): Add #undefs.
author Richard M. Stallman <rms@gnu.org>
date Thu, 11 Aug 1994 03:42:57 +0000
parents 55588e31b258
children cb9697be9f33
comparison
equal deleted inserted replaced
8512:e357ba54e6fd 8513:d11ec52807d6
14 has anything in it. It can be empty. 14 has anything in it. It can be empty.
15 This works ok in src. Luckily lib-src does not use LD_SWITCH_SYSTEM. */ 15 This works ok in src. Luckily lib-src does not use LD_SWITCH_SYSTEM. */
16 #define LD_SWITCH_SYSTEM -L /usr/ccs/lib \ 16 #define LD_SWITCH_SYSTEM -L /usr/ccs/lib \
17 `./prefix-args -Xlinker LD_SWITCH_X_SITE_AUX` 17 `./prefix-args -Xlinker LD_SWITCH_X_SITE_AUX`
18 #endif /* GCC */ 18 #endif /* GCC */
19
20 /* Info from fnf@cygnus.com suggests this is appropriate. */
21 #define POSIX_SIGNALS
22
23 /* We don't need the definition from usg5-3.h with POSIX_SIGNALS. */
24 #undef sigsetmask
25
26 /* This is the same definition as in usg5-4.h, but with sigblock/sigunblock
27 rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't
28 work if POSIX_SIGNALS is defined. It may also be appropriate for SVR4.x
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
33 within, it should be caught after sigrelse(2). */
34
35 #undef PTY_TTY_NAME_SPRINTF
36 #define PTY_TTY_NAME_SPRINTF \
37 { \
38 char *ptsname(), *ptyname; \
39 \
40 sigblock(sigmask(SIGCLD)); \
41 if (grantpt(fd) == -1) \
42 fatal("could not grant slave pty"); \
43 sigunblock(sigmask(SIGCLD)); \
44 if (unlockpt(fd) == -1) \
45 fatal("could not unlock slave pty"); \
46 if (!(ptyname = ptsname(fd))) \
47 fatal ("could not enable slave pty"); \
48 strncpy(pty_name, ptyname, sizeof(pty_name)); \
49 pty_name[sizeof(pty_name) - 1] = 0; \
50 }