Whitespace cleanup in src/s
[sxemacs] / src / s / ptx.h
1 /* Definitions file for GNU Emacs running on Sequent DYNIX/ptx 1.x/2.x
2    Copyright (C) 1987, 1990 Free Software Foundation, Inc.
3
4 This file is part of SXEmacs
5
6 SXEmacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 SXEmacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
18
19
20 /* Synched up with: FSF 19.31. */
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 #define DONT_DEFINE_NO_REMAP    /* `static' hack not needed */
29 #include "usg5-3.h"
30
31 /* Undo these defines because they are incorrect or need to be changed.  */
32 #undef USG_SHARED_LIBRARIES
33
34 /* PTX has System V streams.  */
35 #define SYSV_STREAMS
36
37 /* Leave out -lPW since it conflicts with term.o and because we're not sure
38    if the alloca found there by autoconf should be trusted on PTX.  */
39 #define LIB_STANDARD "-lc"
40
41 #ifndef HAVE_SOCKETS            /* determined by configure */
42 #define NO_SUBPROCESSES
43 #endif
44
45 #ifdef HAVE_X_WINDOWS
46
47 /* This is also defined so that lib-src/profile can link.  */
48 #define LIBS_SYSTEM "-lseq"
49
50 #else                           /* ! HAVE_X_WINDOWS */
51
52 #ifdef HAVE_SOCKETS
53 #define LIBS_SYSTEM "-lsocket -linet -lnsl -lseq"
54 #else
55 #define LIBS_SYSTEM "-lseq"
56 #endif
57
58 #endif                          /* ! HAVE_X_WINDOWS */
59
60 /* No <sioctl.h> */
61 #define NO_SIOCTL_H
62
63 /* If we have X windows, configure should find gettimeofday in -lX11.
64    Since we emulate gettimeofday below, we really have it anyway.  */
65 #ifndef HAVE_GETTIMEOFDAY
66 #define HAVE_GETTIMEOFDAY
67 #endif
68
69 #ifdef emacs
70 #include <sys/conf.h>
71
72                                 /*#define BROKEN_SIGIO*//* SIGIO is already undef'd elsewhere. PTX
73                                    has SIGIO, but it's just an alias for
74                                    SIGPOLL.  */
75
76 /* Emulate gettimeofday() except for the time zone information which Emacs
77    doesn't use anyway.  Get_process_stats() is in -lseq.  */
78 #include <sys/procstats.h>
79 #define gettimeofday(tp, tzp) get_process_stats (tp, PS_SELF, 0, 0)
80
81 /* Define timezone since it's not in sys/time.h.  Unfortunately, this causes
82    trouble when building with X since this struct is defined in
83    <X11/Xos.h>.  */
84 struct timezone {
85         int tz_minuteswest;
86         int tz_dsttime;
87 };
88
89 /* Unfortunately, this define is not checked in all files including
90    <X11/Xos.h> so we can't use it.  */
91 /* #define XOS_NEEDS_TIME_H */
92
93 /* In ptx/WINDOWS, this prevents problems with the timezone struct being
94    redefined in <X11/Xos.h>.  It seems the necessary include files are
95    included via systime.h so leaving them out here is not a problem.  This
96    may not work in X11R5 or X11R6.  */
97 #define __TIMEVAL__
98
99 #endif                          /* emacs */
100
101 /* PTX has termios */
102 #undef BROKEN_TIOCGWINSZ
103 #undef BROKEN_TIOCGETC
104
105 /* PTX has pty's but not like System V */
106 #define HAVE_PTYS
107 #undef SYSV_PTYS
108
109 /* Provide pty support which is defined into process.c:allocate_pty.
110    Basic ideas for handling getpseudotty were lifted from process.c in
111    Emacs 18.57 included on the Sequent Public Software tape.  However, this
112    implementation bears almost no resemblance to the original and does not
113    require that process.c be patched.  */
114 #define PTY_ITERATION                                           \
115   char *mastername, *slavename;                                 \
116   while (1)
117
118 #define PTY_OPEN                                                \
119   if (failed_count++ >= 5) break;                               \
120   if ((fd = getpseudotty (&slavename, &mastername)) < 0) {      \
121     error("Out of ptys.");                                      \
122     continue;                                                   \
123   }                                                             \
124   strcpy (pty_name, slavename);
125
126 /* Define these to prevent the default logic in process.c:allocate_pty
127    from being used.  */
128 #define PTY_NAME_SPRINTF
129 #define PTY_TTY_NAME_SPRINTF
130
131 /* PTX doesn't seem to have memmove.  */
132 #define MEMMOVE_MISSING