1/* Definitions file for GNU Emacs running on Sequent DYNIX/ptx 1.x/2.x
2   Copyright (C) 1987, 1990, 1999, 2001, 2002, 2003, 2004,
3                 2005, 2006, 2007  Free Software Foundation, Inc.
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 2, or (at your option)
10any 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; see the file COPYING.  If not, write to
19the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20Boston, MA 02110-1301, USA.  */
21
22/* This file was written by Bill Burton <billb@progress.com>.  Parts were
23   adapted from m-ptx1-2.h and process.c as distributed with the Emacs 18.57
24   on the Sequent Public software tape. Other parts were adapted from
25   usg5-4.h. */
26
27/* Use the SysVr3 file for base configuration even though much is changed.  */
28#include "usg5-3.h"
29
30/* Undo these defines because they are incorrect or need to be changed.  */
31#undef LIB_X11_LIB
32#undef LIBX10_SYSTEM
33#undef LIBX11_SYSTEM
34#undef USG_SHARED_LIBRARIES
35
36/* <sys/stat.h> *defines* stat as a static function.  If "static"
37   is blank, then many files will have a public definition for stat.  */
38#undef static
39
40/* PTX supports job control.  */
41#undef NOMULTIPLEJOBS
42
43/* PTX has System V streams.  */
44#define SYSV_STREAMS
45
46/* Leave out -lPW since it conflicts with term.o and because we're not sure
47   if the alloca found there by autoconf should be trusted on PTX.  */
48#define LIB_STANDARD -lc
49
50/* Local define.  If TCP/IP is not installed, comment this out.  */
51#define TCPIP_INSTALLED
52
53#ifdef TCPIP_INSTALLED
54#define HAVE_SOCKETS
55#else
56#undef subprocesses
57#endif
58
59#ifdef HAVE_X_WINDOWS
60
61#define LIBX11_SYSTEM -lsocket -linet -lnsl
62/* This is also defined so that lib-src/profile can link.  */
63#define LIBS_SYSTEM -lseq
64
65#else /* ! HAVE_X_WINDOWS */
66
67#ifdef HAVE_SOCKETS
68#define LIBS_SYSTEM -lsocket -linet -lnsl -lseq
69#else
70#define LIBS_SYSTEM -lseq
71#endif
72
73#endif /* ! HAVE_X_WINDOWS */
74
75/* No <sioctl.h> */
76#define NO_SIOCTL_H
77
78/* If we have X windows, configure should find gettimeofday in -lX11.
79   Since we emulate gettimeofday below, we really have it anyway.  */
80#ifndef HAVE_GETTIMEOFDAY
81#define HAVE_GETTIMEOFDAY
82#endif
83
84#ifdef emacs
85#include <sys/stropts.h>	/* Support for pty's */
86#include <sys/conf.h>
87
88/*#define BROKEN_SIGIO*/	/* BROKEN_SIGIO is already defined. PTX
89                                   has SIGIO, but it's just an alias for
90                                   SIGPOLL.  */
91
92/* Emulate gettimeofday() except for the time zone information which Emacs
93   doesn't use anyway.  Get_process_stats() is in -lseq.  */
94#include <sys/procstats.h>
95#define gettimeofday(tp, tzp) get_process_stats (tp, PS_SELF, 0, 0)
96
97/* Define timezone since it's not in sys/time.h.  Unfortunately, this causes
98   trouble when building with X since this struct is defined in
99   <X11/Xos.h>.  */
100struct timezone
101{
102  int tz_minuteswest;
103  int tz_dsttime;
104};
105
106/* Unfortunately, this define is not checked in all files including
107   <X11/Xos.h> so we can't use it.  */
108/* #define XOS_NEEDS_TIME_H */
109
110/* In ptx/WINDOWS, this prevents problems with the timezone struct being
111   redefined in <X11/Xos.h>.  It seems the necessary include files are
112   included via systime.h so leaving them out here is not a problem.  This
113   may not work in X11R5 or X11R6.  */
114#define __TIMEVAL__
115
116#endif  /* emacs */
117
118/* PTX doesn't have FIONREAD at all. */
119#undef INTERRUPT_INPUT
120#define BROKEN_FIONREAD
121
122/* We can support this */
123#define CLASH_DETECTION
124
125/* PTX has termios */
126#define HAVE_TERMIOS
127#undef HAVE_TERMIO
128#undef BROKEN_TIOCGWINSZ
129#undef BROKEN_TIOCGETC
130
131/* It is possible to receive SIGCHLD when there are no children
132   waiting, because a previous waitsys cleaned up the carcass of child
133   without clearing the SIGCHLD pending info.  So, use a non-blocking
134   wait3 instead, which maps to waitpid in SysVr4.  */
135/* Not sure if this is used but PTX does support waitpid.  */
136/*#define HAVE_WAIT_HEADER*/
137/*#define WAITTYPE int*/
138#define wait3(status, options, rusage) \
139  waitpid ((pid_t) -1, (status), (options))
140/*#define WRETCODE(w) (w >> 8)*/
141
142/* PTX has pty's but not like System V */
143#define HAVE_PTYS
144#undef SYSV_PTYS
145
146/* Provide pty support which is defined into process.c:allocate_pty.
147   Basic ideas for handling getpseudotty were lifted from process.c in
148   Emacs 18.57 included on the Sequent Public Software tape.  However, this
149   implementation bears almost no resemblance to the original and does not
150   require that process.c be patched.  */
151#define PTY_ITERATION						\
152  char *mastername, *slavename;					\
153  while (1)
154
155#define PTY_OPEN						\
156  if (failed_count++ >= 5) break;				\
157  if ((fd = getpseudotty (&slavename, &mastername)) < 0) {	\
158    error("Out of ptys.");					\
159    continue;							\
160  }								\
161  strcpy (pty_name, slavename);
162
163/* Define these to prevent the default logic in process.c:allocate_pty
164   from being used.  */
165#define PTY_NAME_SPRINTF
166#define PTY_TTY_NAME_SPRINTF
167
168/* PTX doesn't seem to have memmove.  */
169#define MEMMOVE_MISSING
170
171/* Kenneth Stailey <kstailey@eagle.dol-esa.gov> says this is needed.  */
172#define POSIX_SIGNALS
173
174/* arch-tag: 4f5e3abc-643b-413a-bae6-ed212d3af997
175   (do not change this comment) */
176