1/* Definitions file for GNU Emacs running on Solaris 2.3.
2
3   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
4                 2007  Free Software Foundation, Inc.
5
6This file is part of GNU Emacs.
7
8GNU Emacs is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2, or (at your option)
11any later version.
12
13GNU Emacs is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU Emacs; see the file COPYING.  If not, write to
20the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21Boston, MA 02110-1301, USA.  */
22
23
24#include "sol2.h"
25
26/* Solaris 2.3 has a bug in XListFontsWithInfo.  */
27#define BROKEN_XLISTFONTSWITHINFO
28
29/* Override LD_SWITCH_SYSTEM: add  -L /usr/ccs/lib to the sol2.h value.  */
30
31#undef LD_SWITCH_SYSTEM
32
33#ifndef __GNUC__
34#define LD_SWITCH_SYSTEM -L /usr/ccs/lib LD_SWITCH_X_SITE_AUX
35#else /* GCC */
36/* We use ./prefix-args because we don't know whether LD_SWITCH_X_SITE_AUX
37   has anything in it.  It can be empty.
38   This works ok in src.  Luckily lib-src does not use LD_SWITCH_SYSTEM.  */
39#define LD_SWITCH_SYSTEM -L /usr/ccs/lib \
40 `./prefix-args -Xlinker LD_SWITCH_X_SITE_AUX`
41#endif /* GCC */
42
43/* Info from fnf@cygnus.com suggests this is appropriate.  */
44#define POSIX_SIGNALS
45
46/* We don't need the definition from usg5-3.h with POSIX_SIGNALS.  */
47#undef sigsetmask
48
49/* This is the same definition as in usg5-4.h, but with sigblock/sigunblock
50   rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't
51   work if POSIX_SIGNALS is defined.  It may also be appropriate for SVR4.x
52   (x<2) but I'm not sure.   fnf@cygnus.com */
53/* This sets the name of the slave side of the PTY.  On SysVr4,
54   grantpt(3) forks a subprocess, so keep sigchld_handler() from
55   intercepting that death.  If any child but grantpt's should die
56   within, it should be caught after sigrelse(2). */
57
58#undef PTY_TTY_NAME_SPRINTF
59#define PTY_TTY_NAME_SPRINTF			\
60  {						\
61    char *ptsname (), *ptyname;			\
62						\
63    sigblock (sigmask (SIGCLD));		\
64    if (grantpt (fd) == -1)			\
65      { emacs_close (fd); return -1; }		\
66    sigunblock (sigmask (SIGCLD));		\
67    if (unlockpt (fd) == -1)			\
68      { emacs_close (fd); return -1; }		\
69    if (!(ptyname = ptsname (fd)))		\
70      { emacs_close (fd); return -1; }		\
71    strncpy (pty_name, ptyname, sizeof (pty_name)); \
72    pty_name[sizeof (pty_name) - 1] = 0;	\
73  }
74
75/* arch-tag: a8fe2e15-e517-49cb-a863-f346b80885fe
76   (do not change this comment) */
77