(post-read-decode-hz)
[emacs.git] / src / s / sol2-3.h
bloba4fc6097905c5d6a4566a18f4c61038157e66d78
1 #include "sol2.h"
3 /* Solaris 2.3 has a bug in XListFontsWithInfo. */
4 #define BROKEN_XLISTFONTSWITHINFO
6 /* Override LD_SWITCH_SYSTEM: add -L /usr/ccs/lib to the sol2.h value. */
8 #undef LD_SWITCH_SYSTEM
10 #ifndef __GNUC__
11 #define LD_SWITCH_SYSTEM -L /usr/ccs/lib LD_SWITCH_X_SITE_AUX
12 #else /* GCC */
13 /* We use ./prefix-args because we don't know whether LD_SWITCH_X_SITE_AUX
14 has anything in it. It can be empty.
15 This works ok in src. Luckily lib-src does not use LD_SWITCH_SYSTEM. */
16 #define LD_SWITCH_SYSTEM -L /usr/ccs/lib \
17 `./prefix-args -Xlinker LD_SWITCH_X_SITE_AUX`
18 #endif /* GCC */
20 /* Info from fnf@cygnus.com suggests this is appropriate. */
21 #define POSIX_SIGNALS
23 /* We don't need the definition from usg5-3.h with POSIX_SIGNALS. */
24 #undef sigsetmask
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). */
35 #undef PTY_TTY_NAME_SPRINTF
36 #define PTY_TTY_NAME_SPRINTF \
37 { \
38 char *ptsname (), *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 strncpy (pty_name, ptyname, sizeof (pty_name)); \
49 pty_name[sizeof (pty_name) - 1] = 0; \