]> git.ipfire.org Git - thirdparty/bash.git/blame - machines.h
Imported from ../bash-1.14.7.tar.gz.
[thirdparty/bash.git] / machines.h
CommitLineData
726f6388
JA
1/* machines.h --
2 Included file in the makefile that gets run through Cpp. This file
3 tells which machines have what features based on the unique machine
4 identifier present in Cpp. */
5
6/* Copyright (C) 1993 Free Software Foundation, Inc.
7
8 This file is part of GNU Bash, the Bourne Again SHell.
9
10 Bash is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free
12 Software Foundation; either version 2, or (at your option) any later
13 version.
14
15 Bash is distributed in the hope that it will be useful, but WITHOUT ANY
16 WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 for more details.
19
20 You should have received a copy of the GNU General Public License along
21 with Bash; see the file COPYING. If not, write to the Free Software
22 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
23
24/* **************************************************************** */
25/* */
26/* Global Assumptions (true for most systems). */
27/* */
28/* **************************************************************** */
29
30/* We make some global assumptions here. This can be #undef'ed in
31 various machine specific entries. */
32
33/* If this file is being processed with Gcc, then the user has Gcc. */
34#if defined (__GNUC__) && !defined (NeXT) && !defined (__FreeBSD__)
35# if !defined (HAVE_GCC)
36# define HAVE_GCC
37# endif /* HAVE_GCC */
38#endif /* __GNUC__ && !NeXT && !__FreeBSD__ */
39
40/* Assume that all machines have the getwd () system call. We unset it
41 for USG systems. */
42#define HAVE_GETWD
43
44/* Assume that all systems have a working getcwd () call. We unset it for
45 ISC systems. */
46#define HAVE_GETCWD
47
48/* Most (but not all) systems have a good, working version of dup2 ().
49 For systems that don't have the call (HP/UX), and for systems
50 that don't set the open-on-exec flag for the dup'ed file descriptors,
51 (Sequents running Dynix, Ultrix), #undef HAVE_DUP2 in the machine
52 description. */
53#define HAVE_DUP2
54
55/* Every machine that has Gcc has alloca as a builtin in Gcc. If you are
56 compiling Bash without Gcc, then you must have alloca in a library,
57 in your C compiler, or be able to assemble or compile the alloca source
58 that we ship with Bash. */
59#define HAVE_ALLOCA
60
61/* We like most machines to use the GNU Malloc routines supplied in the
62 source code because they provide high quality error checking. On
63 some machines, our malloc () cannot be used (because of library
64 conflicts, for example), and for those, you should specifically
65 #undef USE_GNU_MALLOC in the machine description. */
66#define USE_GNU_MALLOC
67
68/* This causes the Gnu malloc library (from glibc) to be used. */
69/* #define USE_GNU_MALLOC_LIBRARY */
70
71/* Assume that every operating system supplies strchr () and strrchr ()
72 in a standard library until proven otherwise. */
73#define HAVE_STRCHR
74
75/* Hardware-dependent CFLAGS. */
76#define MACHINE_CFLAGS
77
78/* **************************************************************** */
79/* */
80/* Sun Microsystems Machines */
81/* */
82/* **************************************************************** */
83
84/* NetBSD running on a sparc. */
85#if defined (sparc) && defined (__NetBSD__)
86# define M_MACHINE "sun4"
87# define M_OS "NetBSD"
88# define SYSDEP_CFLAGS -DOPENDIR_NOT_ROBUST -DINT_GROUPS_ARRAY \
89 -DRLIMTYPE=quad_t
90# define SYSDEP_LDFLAGS -static
91# define HAVE_SYS_SIGLIST
92# define HAVE_SETLINEBUF
93# define HAVE_GETGROUPS
94# define HAVE_VFPRINTF
95# define HAVE_STRERROR
96# define VOID_SIGHANDLER
97# define HAVE_DIRENT
98# define HAVE_STRCASECMP
99# undef USE_GNU_MALLOC
100#endif /* sparc && __NetBSD__ */
101
102/* BSDI BSD/OS running on a sparc. */
103#if defined (sparc) && defined (__bsdi__)
104# define M_MACHINE "sun4"
105# define M_OS "BSD_OS"
106# define SYSDEP_CFLAGS -DOPENDIR_NOT_ROBUST -DRLIMTYPE=quad_t
107# define HAVE_SYS_SIGLIST
108# define HAVE_SETLINEBUF
109# define HAVE_GETGROUPS
110# define HAVE_VFPRINTF
111# define HAVE_STRERROR
112# define VOID_SIGHANDLER
113# define HAVE_DIRENT
114# define HAVE_STRCASECMP
115#endif /* sparc && __bsdi__ */
116
117#if defined (sun) && !defined (M_MACHINE)
118/* We aren't currently using GNU Malloc on Suns because of a bug in Sun's
119 YP which bites us when Sun free ()'s an already free ()'ed address.
120 When Sun fixes their YP, we can start using our winning malloc again. */
121#undef USE_GNU_MALLOC
122
123/* Most Sun systems have signal handler functions that are void. */
124# define VOID_SIGHANDLER
125
126/* Most Sun systems have the following. */
127# define HAVE_SYS_SIGLIST
128# define HAVE_SETLINEBUF
129# define HAVE_VFPRINTF
130# define HAVE_GETGROUPS
131
132/* Check for SunOS4 or greater. */
133# if defined (SunOS5)
134# define M_OS "SunOS5"
135# define SYSDEP_CFLAGS -DUSGr4 -DUSG -DSolaris -DOPENDIR_NOT_ROBUST \
136 -DNO_SBRK_DECL -DINT_GROUPS_ARRAY
137# define EXTRA_LIB_SEARCH_PATH /usr/ccs/lib
138# if !defined (HAVE_GCC)
139# define REQUIRED_LIBRARIES -ldl
140# define SYSDEP_LDFLAGS -Bdynamic
141# endif /* !HAVE_GCC */
142# define HAVE_STRERROR
143# undef HAVE_GETWD
144# undef HAVE_SETLINEBUF
145# endif /* SunOS5 */
146
147# if defined (SunOS4)
148# define M_OS "SunOS4"
149# define SYSDEP_CFLAGS -DBSD_GETPGRP -DOPENDIR_NOT_ROBUST -DTERMIOS_LDISC \
150 -DINT_GROUPS_ARRAY
151# define HAVE_DIRENT
152# endif /* SunOS4 */
153
154# if !defined (SunOS4) && !defined (SunOS5)
155# define M_OS "SunOS3"
156# if !defined (sparc) && !defined (__sparc__)
157# undef VOID_SIGHANDLER
158# endif /* !sparc */
159# endif /* !SunOS4 && !SunOS5 */
160
161# if defined (mc68010)
162# define sun2
163# define M_MACHINE "sun2"
164# endif
165# if defined (mc68020)
166# define sun3
167# define M_MACHINE "sun3"
168# endif
169# if defined (sparc) || defined (__sparc__)
170# define sun4
171# define M_MACHINE "sparc"
172# endif
173# if defined (i386)
174# define done386
175# if !defined (SunOS5)
176# define Sun386i
177# define M_MACHINE "Sun386i"
178# else
179# define M_MACHINE "i386"
180# endif
181# endif /* i386 */
182
183#endif /* sun && !M_MACHINE */
184
185/* **************************************************************** */
186/* */
187/* DEC Machines (vax, decstations) */
188/* */
189/* **************************************************************** */
190
191/* ************************ */
192/* */
193/* Alpha with OSF/1 */
194/* */
195/* ************************ */
196#if defined (__alpha) || defined (alpha)
197# define M_MACHINE "alpha"
198# define M_OS "OSF1"
199# define HAVE_SYS_SIGLIST
200# define HAVE_SETLINEBUF
201# define HAVE_VFPRINTF
202# define HAVE_STRERROR
203# define HAVE_GETGROUPS
204# define VOID_SIGHANDLER
205# define USE_TERMCAP_EMULATION
206# if !defined (__GNUC__)
207# define SYSDEP_CFLAGS -DNLS -D_BSD
208# endif /* !__GNUC__ */
209# undef HAVE_ALLOCA
210# undef USE_GNU_MALLOC
211#endif /* __alpha || alpha */
212
213/* ************************ */
214/* */
215/* NetBSD/pmax (DEC mips) */
216/* */
217/* ************************ */
218#if defined(mips) && defined(__NetBSD__)
219# define M_MACHINE "mips"
220# define M_OS "NetBSD"
221# define SYSDEP_CFLAGS -DOPENDIR_NOT_ROBUST -DINT_GROUPS_ARRAY \
222 -DRLIMTYPE=quad_t
223# define HAVE_SYS_SIGLIST
224# define HAVE_SETLINEBUF
225# define HAVE_GETGROUPS
226# define HAVE_VFPRINTF
227# define HAVE_STRERROR
228# define VOID_SIGHANDLER
229# define HAVE_DIRENT
230# define HAVE_STRCASECMP
231#endif /* mips && __NetBSD__ */
232
233/* ************************ */
234/* */
235/* Ultrix */
236/* */
237/* ************************ */
238#if defined (ultrix)
239# if defined (MIPSEL)
240# undef HAVE_ALLOCA_H
241# define M_MACHINE "MIPSEL"
242# else /* !MIPSEL */
243# define M_MACHINE "vax"
244# endif /* !MIPSEL */
245# define SYSDEP_CFLAGS -DBSD_GETPGRP -DTERMIOS_MISSING -DTERMIOS_LDISC \
246 -DINT_GROUPS_ARRAY
247# define M_OS "Ultrix"
248# define HAVE_DIRENT
249# define VOID_SIGHANDLER
250# define HAVE_SYS_SIGLIST
251# define HAVE_SETLINEBUF
252# define HAVE_VFPRINTF
253# define HAVE_GETGROUPS
254# undef HAVE_DUP2
255#endif /* ultrix */
256
257/* ************************ */
258/* */
259/* VAX 4.3 BSD */
260/* */
261/* ************************ */
262#if defined (vax) && !defined (ultrix)
263# define M_MACHINE "vax"
264# define M_OS "Bsd"
265# define HAVE_SETLINEBUF
266# define HAVE_SYS_SIGLIST
267# define HAVE_GETGROUPS
268# define USE_VFPRINTF_EMULATION
269#endif /* vax && !ultrix */
270
271/* ************************ */
272/* */
273/* Tahoe 4.3 BSD */
274/* */
275/* ************************ */
276#if defined (tahoe)
277# define M_MACHINE "tahoe"
278# define M_OS "Bsd"
279# define HAVE_SETLINEBUF
280# define HAVE_SYS_SIGLIST
281# define HAVE_GETGROUPS
282# define HAVE_VFPRINTF
283#endif /* tahoe */
284
285/* **************************************************************** */
286/* */
287/* Machines with MIPSco processors */
288/* */
289/* **************************************************************** */
290
291/* **************************************** */
292/* */
293/* SGI Iris/IRIX */
294/* */
295/* **************************************** */
296#if defined (sgi)
297# if defined (Irix3)
298# define M_OS "Irix3"
299# if !defined (HAVE_GCC)
300# undef MACHINE_CFLAGS
301# define MACHINE_CFLAGS -real_frameptr -Wf,-XNl3072
302# endif
303# undef HAVE_ALLOCA
304# endif /* Irix3 */
305# if defined (Irix4)
306# define M_OS "Irix4"
307# if !defined (HAVE_GCC)
308# undef MACHINE_CFLAGS
309# define MACHINE_CFLAGS -Wf,-XNl3072
310# endif
311# endif /* Irix4 */
312# if defined (Irix5)
313# define M_OS "Irix5"
314# if !defined (HAVE_GCC)
315# undef MACHINE_CFLAGS
316# define MACHINE_CFLAGS -Wf,-XNl3072
317# endif
318# endif /* Irix5 */
319# if defined (Irix6)
320# define M_OS "Irix6"
321# if !defined (HAVE_GCC)
322# undef MACHINE_CFLAGS
323# define MACHINE_CFLAGS -mips2
324# endif /* !HAVE_GCC */
325# endif /* Irix6 */
326# define M_MACHINE "sgi"
327# define HAVE_GETGROUPS
328# define VOID_SIGHANDLER
329# define HAVE_SYS_SIGLIST
330# define HAVE_SETLINEBUF
331# define HAVE_VFPRINTF
332# define REQUIRED_LIBRARIES -lsun
333 /* SGI cc uses ansi c features *without* defining __STDC__ */
334# if defined (__EXTENSIONS__) && !defined (__STDC__)
335# define ANSIC -D__STDC__
336# else
337# define ANSIC
338# endif /* !__EXTENSIONS__ || __STDC__ */
339# if defined (Irix5) || defined (Irix6)
340# define SGI_CFLAGS -DUSG -DPGRP_PIPE -DHAVE_BCOPY -DHAVE_GETPW_DECLS \
341 -DHAVE_SOCKETS -DNO_SBRK_DECL
342# else
343# define SGI_CFLAGS -DUSG -DPGRP_PIPE -DHAVE_BCOPY -DHAVE_GETPW_DECLS \
344 -DHAVE_SOCKETS
345# endif /* !Irix5 */
346# define SYSDEP_CFLAGS SGI_CFLAGS MACHINE_CFLAGS ANSIC
347# define SYSDEP_LDFLAGS MACHINE_CFLAGS
348#endif /* sgi */
349
350/* ************************ */
351/* */
352/* NEC EWS 4800 */
353/* */
354/* ************************ */
355#if defined (nec_ews)
356# if defined (SYSTYPE_SYSV) || defined (USGr4)
357# define M_MACHINE "ews4800"
358# define M_OS "USG"
359# define HAVE_VFPRINTF
360# define VOID_SIGHANDLER
361# define HAVE_STRERROR
362# define HAVE_DUP2
363# undef HAVE_GETWD
364# undef HAVE_RESOURCE /* ? */
365 /* Alloca requires either Gcc or cc with -lucb. */
366# if !defined (HAVE_GCC)
367# define EXTRA_LIB_SEARCH_PATH /usr/ucblib
368# define REQUIRED_LIBRARIES -lc -lucb
369# endif /* !HAVE_GCC */
370# if defined (MIPSEB)
371# if !defined (HAVE_GCC)
372# undef MACHINE_CFLAGS
373# define MACHINE_CFLAGS -Wf,-XNl3072
374# endif
375# define SYSDEP_CFLAGS MACHINE_CFLAGS -DUSGr4 -DUSGr3 -D_POSIX_JOB_CONTROL
376# else /* !MIPSEB */
377# define SYSDEP_CFLAGS -DUSGr4
378# endif /* MIPSEB */
379# else /* !SYSTYPE_SYSV && !USGr4 */
380# define M_OS "Bsd"
381# endif /* !SYSTYPE_SYSV && !USGr4 */
382# define HAVE_SYS_SIGLIST
383# define HAVE_SETLINEBUF
384# define HAVE_GETGROUPS
385#endif /* nec_ews */
386
387/* ************************ */
388/* */
389/* Generic MIPS SVR4, 4.2 */
390/* */
391/* ************************ */
392#if defined (MIPSEB) && defined (USGr4)
393# define M_MACHINE "MIPSEB"
394# define M_OS "USG"
395# if defined (sony) && !defined (HAVE_GCC)
396# undef MACHINE_CFLAGS
397# define MACHINE_CFLAGS -Wf,-XNl3072
398# endif
399/* XXX - os/svr4.h -- for the future -- XXX */
400# undef HAVE_GETWD
401# define HAVE_DIRENT
402# define HAVE_STRERROR
403# define HAVE_VFPRINTF
404# define VOID_SIGHANDLER
405# define HAVE_SYS_SIGLIST
406# define HAVE_SETLINEBUF
407# define HAVE_GETGROUPS
408/* alloca */
409# if !defined (HAVE_GCC)
410# define EXTRA_LIB_SEARCH_PATH /usr/ucblib
411# define REQUIRED_LIBRARIES -lc -lucb
412# endif /* !HAVE_GCC */
413# if defined (USGr4_2)
414# define SYSDEP_CFLAGS MACHINE_CFLAGS -DUSGr4 -DUSGr4_2
415# else
416# define SYSDEP_CFLAGS MACHINE_CFLAGS -DUSGr4
417# endif /* !USGr4_2 */
418#endif
419
420/* ************************ */
421/* */
422/* Sony */
423/* */
424/* ************************ */
425#if defined (sony) && !defined (M_MACHINE)
426# if defined (MIPSEB)
427# define M_MACHINE "MIPSEB"
428# else /* !MIPSEB */
429# define M_MACHINE "sony"
430# endif /* !MIPSEB */
431
432# if defined (SYSTYPE_SYSV) || defined (USGr4)
433# define M_OS "USG"
434# undef HAVE_GETWD
435# define HAVE_DIRENT
436# define HAVE_STRERROR
437# define HAVE_VFPRINTF
438# define VOID_SIGHANDLER
439 /* Alloca requires either Gcc or cc with -lucb. */
440# if !defined (HAVE_GCC)
441# define EXTRA_LIB_SEARCH_PATH /usr/ucblib
442# define REQUIRED_LIBRARIES -lc -lucb
443# endif /* !HAVE_GCC */
444# if defined (MIPSEB)
445# if !defined (HAVE_GCC)
446# undef MACHINE_CFLAGS
447# define MACHINE_CFLAGS -Wf,-XNl3072
448# endif
449# define SYSDEP_CFLAGS MACHINE_CFLAGS -DUSGr4
450# else /* !MIPSEB */
451# define SYSDEP_CFLAGS -DUSGr4
452# endif /* !MIPSEB */
453# else /* !SYSTYPE_SYSV && !USGr4 */
454# define M_OS "Bsd"
455# define SYSDEP_CFLAGS -DHAVE_UID_T
456# endif /* !SYSTYPE_SYSV && !USGr4 */
457# define HAVE_SYS_SIGLIST
458# define HAVE_SETLINEBUF
459# define HAVE_GETGROUPS
460#endif /* sony */
461
462/* ******************************* */
463/* */
464/* Ardent Titan OS v2.2 and later */
465/* */
466/* ******************************* */
467#if defined (ardent)
468# define M_MACHINE "Ardent Titan"
469# define M_OS "Bsd"
470# if defined (titan)
471# undef HAVE_GETGROUPS
472# else
473# define HAVE_GETGROUPS
474# endif /* !titan */
475# define HAVE_SYS_SIGLIST
476# define HAVE_SETLINEBUF
477# define SYSDEP_CFLAGS -43 -w
478# define SYSDEP_LDFLAGS -43
479# undef HAVE_ALLOCA
480# undef USE_GNU_MALLOC
481# undef HAVE_VFPRINTF
482# undef HAVE_DIRENT_H
483#endif /* ardent */
484
485/* ************************ */
486/* */
487/* Stardent */
488/* */
489/* ************************ */
490#if defined (stardent) && !defined (M_MACHINE)
491# define M_MACHINE "Stardent"
492# define M_OS "USG"
493# define HAVE_SYS_SIGLIST
494# define USE_TERMCAP_EMULATION
495# define VOID_SIGHANDLER
496# undef HAVE_GETWD
497# undef HAVE_ALLOCA
498#endif /* stardent */
499
500/* ******************************** */
501/* */
502/* MIPS RISC/os */
503/* */
504/* ******************************** */
505
506/* Notes on compiling with "make":
507
508 * Place /bsd43/bin in your PATH before /bin.
509 * Use `$(CC) -E' instead of `/lib/cpp' in Makefile.
510*/
511#if defined (mips) && ((!defined (M_MACHINE) && !defined (__nonstopux)) || defined (RiscOS))
512
513# if defined (MIPSEB)
514# define M_MACHINE "MIPSEB"
515# else /* !MIPSEB */
516# if defined (MIPSEL)
517# define M_MACHINE "MIPSEL"
518# else /* !MIPSEL */
519# define M_MACHINE "mips"
520# endif /* !MIPSEL */
521# endif /* !MIPSEB */
522
523# define M_OS "Bsd"
524
525 /* Special things for machines from MIPS Co. */
526# define MIPS_CFLAGS -DOPENDIR_NOT_ROBUST -DPGRP_PIPE
527
528# if !defined (HAVE_GCC)
529# undef MACHINE_CFLAGS
530# define MACHINE_CFLAGS -Wf,-XNl3072 -systype bsd43
531# define SYSDEP_LDFLAGS -systype bsd43
532# endif /* !HAVE_GCC */
533# define SYSDEP_CFLAGS MACHINE_CFLAGS MIPS_CFLAGS
534# define HAVE_SYS_SIGLIST
535# define HAVE_SETLINEBUF
536# define HAVE_VFPRINTF
537# define HAVE_GETGROUPS
538# undef HAVE_UNISTD_H
539# if !defined (HAVE_RESOURCE)
540# define HAVE_RESOURCE
541# endif /* !HAVE_RESOURCE */
542 /* /usr/include/sys/wait.h appears not to work correctly, so why use it? */
543# undef HAVE_WAIT_H
544#endif /* mips */
545
546/* ************************ */
547/* */
548/* Pyramid */
549/* */
550/* ************************ */
551#if defined (pyr)
552# define M_MACHINE "Pyramid"
553# define M_OS "Bsd"
554# if !defined (HAVE_GCC)
555# undef HAVE_ALLOCA
556# endif /* HAVE_GCC */
557# define HAVE_SYS_SIGLIST
558# define HAVE_SETLINEBUF
559# define HAVE_GETGROUPS
560#endif /* pyr */
561
562/* ************************ */
563/* */
564/* IBMRT */
565/* */
566/* ************************ */
567#if defined (ibm032)
568# define M_MACHINE "IBMRT"
569# define M_OS "Bsd"
570# define HAVE_SYS_SIGLIST
571# define HAVE_SETLINEBUF
572# define USE_VFPRINTF_EMULATION
573 /* Alloca requires either gcc or hc or pcc with -ma in SYSDEP_CFLAGS. */
574# if !defined (HAVE_GCC)
575# define SYSDEP_CFLAGS -ma -U__STDC__
576# endif /* !HAVE_GCC */
577# define HAVE_GETGROUPS
578/* #define USE_GNU_TERMCAP */
579#endif /* ibm032 */
580
581/* **************************************************************** */
582/* */
583/* All Intel 386 Processor Machines are Defined Here! */
584/* */
585/* **************************************************************** */
586
587#if defined (i386)
588
589/* Sequent Symmetry running Dynix/ptx 2.x */
590# if !defined (done386) && defined (_SEQUENT_)
591# define done386
592# define M_MACHINE "Symmetry"
593# define M_OS "Dynix"
594# define DYNIX_CFLAGS -DHAVE_GETDTABLESIZE -DHAVE_SETDTABLESIZE \
595 -DHAVE_GETPW_DECLS -DHAVE_SOCKETS
596# define SYSDEP_CFLAGS -DUSG -DUSGr3 DYNIX_CFLAGS
597# define HAVE_DIRENT
598# define HAVE_VFPRINTF
599# define VOID_SIGHANDLER
600/* Might need to add -lsocket -linet -lnsl to the list of libraries. */
601# define REQUIRED_LIBRARIES -lPW -lseq
602# undef HAVE_GETWD
603# undef HAVE_RESOURCE
604# undef HAVE_ALLOCA
605# endif /* _SEQUENT_ */
606
607/* Sequent Symmetry running Dynix (4.2 BSD) */
608# if !defined (done386) && defined (sequent)
609# define done386
610# define M_MACHINE "Symmetry"
611# define M_OS "Bsd"
612# define SYSDEP_CFLAGS -DCPCC -DHAVE_SETDTABLESIZE
613# define HAVE_SETLINEBUF
614# define HAVE_SYS_SIGLIST
615# define HAVE_GETGROUPS
616# define LD_HAS_NO_DASH_L
617# undef HAVE_DUP2
618# endif /* Sequent 386 */
619
620/* NeXT 3.x on i386 */
621# if !defined (done386) && defined (NeXT)
622# define done386
623# define M_MACHINE "i386"
624# define M_OS "NeXTstep"
625# define HAVE_VFPRINTF
626# define HAVE_SYS_SIGLIST
627# define HAVE_GETGROUPS
628# define HAVE_STRERROR
629# define VOID_SIGHANDLER
630# if !defined (HAVE_RESOURCE)
631# define HAVE_RESOURCE
632# endif
633# define HAVE_STRCASECMP
634# define GCC_STANDARD
635# undef HAVE_GETWD
636# undef HAVE_GETCWD
637# undef USE_GNU_MALLOC
638# undef HAVE_DIRENT_H
639# define SYSDEP_CFLAGS -DNeXT -DMKFIFO_MISSING -DRLOGIN_PGRP_BUG
640# endif
641
642/* Generic 386 clone running Mach (4.3 BSD-compatible). */
643# if !defined (done386) && defined (MACH)
644# define done386
645# define M_MACHINE "i386"
646# define M_OS "Bsd"
647# define HAVE_SETLINEBUF
648# define HAVE_SYS_SIGLIST
649# define HAVE_GETGROUPS
650# endif /* i386 && MACH */
651
652/* AIX PS/2 1.[23] for the [34]86. */
653# if !defined (done386) && defined (aixpc)
654# define done386
655# define M_MACHINE "aixpc"
656# define M_OS "AIX"
657# define HAVE_VFPRINTF
658# define VOID_SIGHANDLER
659# if defined (AIX_13) /* AIX PS/2 1.3 */
660# define SYSDEP_CFLAGS -DTERMIOS_LDISC
661# define REQUIRED_LIBRARIES -lc_s
662# else
663# define SYSDEP_CFLAGS -D_BSD -DTERMIOS_LDISC
664# define REQUIRED_LIBRARIES -lbsd -lc_s
665# endif /* !AIX_13 */
666# define HAVE_GETGROUPS
667# if !defined (HAVE_GCC)
668# undef HAVE_ALLOCA
669# undef HAVE_ALLOCA_H
670# endif /* !HAVE_GCC */
671# define USE_TERMCAP_EMULATION
672# endif /* AIXPC i386 */
673
674/* System V Release 4 on the 386 */
675# if !defined (done386) && defined (USGr4)
676# define done386
677# define M_MACHINE "i386"
678# define M_OS "USG"
679# define HAVE_DIRENT
680# define HAVE_SYS_SIGLIST
681# define HAVE_VFPRINTF
682# define VOID_SIGHANDLER
683 /* Alloca requires either Gcc or cc with -lucb. */
684# if !defined (HAVE_GCC)
685# define EXTRA_LIB_SEARCH_PATH /usr/ucblib
686# define REQUIRED_LIBRARIES -lc -lucb
687# endif /* !HAVE_GCC */
688# define HAVE_GETGROUPS
689# if defined (USGr4_2)
690# define SYSDEP_CFLAGS -DUSGr4 -DUSGr4_2 -DNO_SBRK_DECL
691# else
692# define SYSDEP_CFLAGS -DUSGr4
693# endif /* ! USGr4_2 */
694# undef HAVE_GETWD
695# endif /* System V Release 4 on i386 */
696
697/* 386 box running Interactive Unix 2.2 or greater. */
698# if !defined (done386) && defined (isc386)
699# define done386
700# define M_MACHINE "isc386"
701# define M_OS "USG"
702# define HAVE_DIRENT
703# define HAVE_VFPRINTF
704# define VOID_SIGHANDLER
705# define HAVE_GETGROUPS
706# define USE_TERMCAP_EMULATION
707# if defined (HAVE_GCC)
708# define SYSDEP_LDFLAGS -posix
709# define ISC_POSIX
710# else
711# define REQUIRED_LIBRARIES -lPW
712# define SYSDEP_LDFLAGS -Xp
713# define ISC_POSIX -Xp
714# endif
715# define ISC_SYSDEPS -DUSGr3 -DPGRP_PIPE -DHAVE_GETPW_DECLS -D_POSIX_SOURCE -DOPENDIR_NOT_ROBUST -DMEMMOVE_MISSING -DWAITPID_BROKEN
716# if defined (__STDC__)
717# if defined (HAVE_GCC)
718# define ISC_EXTRA -DO_NDELAY=O_NONBLOCK
719# else
720# define ISC_EXTRA -Dmode_t="unsigned short" -DO_NDELAY=O_NONBLOCK
721# endif /* HAVE_GCC */
722# else
723# define ISC_EXTRA
724# endif /* __STDC__ */
725# define SYSDEP_CFLAGS ISC_SYSDEPS ISC_POSIX ISC_EXTRA
726# undef HAVE_GETWD
727# if !defined (ISC_4)
728# undef HAVE_GETCWD
729# else
730# undef HAVE_RESOURCE
731# endif /* ISC_4 */
732# endif /* isc386 */
733
734/* Xenix386 machine (with help from Ronald Khoo <ronald@robobar.co.uk>). */
735# if !defined (done386) && defined (Xenix386)
736# define done386
737# define M_MACHINE "i386"
738# define M_OS "Xenix"
739# define XENIX_CFLAGS -DUSG -DUSGr3 -DMEMMOVE_MISSING
740
741# if defined (XENIX_22)
742# define XENIX_EXTRA -DREVERSED_SETVBUF_ARGS
743# define REQUIRED_LIBRARIES -lx
744# else /* !XENIX_22 */
745# define HAVE_DIRENT
746# if defined (XENIX_23)
747# define XENIX_EXTRA -DLD_HAS_NO_DASH_L
748# define REQUIRED_LIBRARIES -ldir
749# else /* !XENIX_23 */
750# define XENIX_EXTRA -xenix
751# define SYSDEP_LDFLAGS -xenix
752# define REQUIRED_LIBRARIES -ldir -l2.3
753# endif /* !XENIX_23 */
754# endif /* !XENIX_22 */
755
756# define SYSDEP_CFLAGS XENIX_CFLAGS XENIX_EXTRA
757# define HAVE_VFPRINTF
758# define VOID_SIGHANDLER
759# define ALLOCA_ASM x386-alloca.s
760# define ALLOCA_OBJ x386-alloca.o
761# undef HAVE_ALLOCA
762# undef HAVE_GETWD
763# undef HAVE_RESOURCE
764# endif /* Xenix386 */
765
766/* SCO UNIX 3.2 chip@count.tct.com (Chip Salzenberg) */
767# if !defined (done386) && defined (M_UNIX)
768# define done386
769# define M_MACHINE "i386"
770# define M_OS "SCO"
771# define SCO_CFLAGS -DUSG -DUSGr3 -DPGRP_PIPE
772# if defined (SCOv4) || defined (SCOv5)
773# define SYSDEP_CFLAGS SCO_CFLAGS -DWAITPID_BROKEN
774# else /* !SCOv4 && !SCOv5 */
775# define SYSDEP_CFLAGS SCO_CFLAGS -DOPENDIR_NOT_ROBUST -DMUST_UNBLOCK_CHILD
776# endif /* !SCOv4 && !SCOv5 */
777# define HAVE_VFPRINTF
778# define VOID_SIGHANDLER
779# define HAVE_GETGROUPS
780# undef HAVE_GETWD
781# undef HAVE_RESOURCE
782/* advice from wbader@cess.lehigh.edu and Eduard.Vopicka@vse.cz */
783# if !defined (HAVE_GCC)
784# define REQUIRED_LIBRARIES -lc_s -lc -lPW
785# else
786# define REQUIRED_LIBRARIES -lc_s -lc
787# endif /* !HAVE_GCC */
788# endif /* SCO Unix on 386 boxes. */
789
790# if !defined (done386) && defined (__OSF1__)
791# define done386
792# define M_MACHINE "i386"
793# define M_OS "OSF1"
794# define HAVE_SYS_SIGLIST
795# define HAVE_SETLINEBUF
796# define HAVE_VFPRINTF
797# define HAVE_STRERROR
798# define HAVE_GETGROUPS
799# define VOID_SIGHANDLER
800# define HAVE_BCOPY
801# define USE_TERMCAP_EMULATION
802# define SYSDEP_CFLAGS -D_BSD
803# define REQUIRED_LIBRARIES -lbsd
804# endif /* OSF/1 */
805
806/* BSDI BSD/OS running on a 386 or 486. */
807# if !defined (done386) && defined (__bsdi__)
808# define done386
809# define M_MACHINE "i386"
810# if defined (BSDI2)
811# define M_OS "BSD_OS"
812# define SYSDEP_CFLAGS -DOPENDIR_NOT_ROBUST -DRLIMTYPE=quad_t
813# else
814# define M_OS "BSD386"
815# define SYSDEP_CFLAGS -DOPENDIR_NOT_ROBUST -DINT_GROUPS_ARRAY
816# endif
817# define HAVE_SYS_SIGLIST
818# define HAVE_SETLINEBUF
819# define HAVE_GETGROUPS
820# define HAVE_VFPRINTF
821# define HAVE_STRERROR
822# define VOID_SIGHANDLER
823# define HAVE_DIRENT
824# define HAVE_STRCASECMP
825# endif /* !done386 && bsdi */
826
827/* NetBSD running on a 386 or 486. */
828# if !defined (done386) && defined (__NetBSD__)
829# define done386
830# define M_MACHINE "i386"
831# define M_OS "NetBSD"
832# define SYSDEP_CFLAGS -DOPENDIR_NOT_ROBUST -DINT_GROUPS_ARRAY \
833 -DRLIMTYPE=quad_t
834# define HAVE_SYS_SIGLIST
835# define HAVE_SETLINEBUF
836# define HAVE_GETGROUPS
837# define HAVE_VFPRINTF
838# define HAVE_STRERROR
839# define VOID_SIGHANDLER
840# define HAVE_DIRENT
841# define HAVE_STRCASECMP
842# endif /* !done386 && __NetBSD__ */
843
844/* FreeBSD running on a 386 or 486. */
845# if !defined (done386) && defined (__FreeBSD__)
846# define done386
847# define M_MACHINE "i386"
848# define M_OS "FreeBSD"
849# if __FreeBSD__ > 1
850# define SYSDEP_CFLAGS -D__BSD_4_4__ -DRLIMTYPE=quad_t
851# else
852# define SYSDEP_CFLAGS -DOPENDIR_NOT_ROBUST -DINT_GROUPS_ARRAY
853# endif
854# define HAVE_SYS_SIGLIST
855# define HAVE_SETLINEBUF
856# define HAVE_GETGROUPS
857# define HAVE_VFPRINTF
858# define HAVE_STRERROR
859# define VOID_SIGHANDLER
860# define HAVE_DIRENT
861# define HAVE_STRCASECMP
862# define GCC_STANDARD
863# endif /* !done386 && __FreeBSD__ */
864
865/* Jolitz 386BSD running on a 386 or 486. */
866# if !defined (done386) && defined (__386BSD__)
867# define done386
868# define M_MACHINE "i386"
869# define M_OS "_386BSD"
870# define SYSDEP_CFLAGS -DOPENDIR_NOT_ROBUST -DINT_GROUPS_ARRAY
871# define HAVE_SYS_SIGLIST
872# define HAVE_SETLINEBUF
873# define HAVE_GETGROUPS
874# define HAVE_VFPRINTF
875# define HAVE_STRERROR
876# define VOID_SIGHANDLER
877# define HAVE_DIRENT
878# define HAVE_STRCASECMP
879# endif /* !done386 && __386BSD__ */
880
881# if !defined (done386) && (defined (__linux__) || defined (linux))
882# define done386
883# define M_MACHINE "i386"
884# define M_OS "Linux"
885# define SYSDEP_CFLAGS -DHAVE_GETDTABLESIZE -DHAVE_BCOPY \
886 -DHAVE_GETPW_DECLS -DHAVE_GETHOSTNAME
887# define REQUIRED_LIBRARIES
888# define HAVE_GETGROUPS
889# define HAVE_STRERROR
890# define VOID_SIGHANDLER
891# define HAVE_SYS_SIGLIST
892# define HAVE_VFPRINTF
893# define HAVE_VARARGS_H
894# define SEARCH_LIB_NEEDS_SPACE
895# if defined (__GNUC__)
896# define HAVE_FIXED_INCLUDES
897# endif /* __GNUC__ */
898# undef USE_GNU_MALLOC
899# undef HAVE_SETLINEBUF
900# undef HAVE_GETWD
901# endif /* !done386 && __linux__ */
902
903/* QNX 4.2 with GCC pt@flard.ocunix.on.ca (Paul Trunley) */
904# if !defined (done386) && defined (qnx)
905# define done386
906# define M_MACHINE "i386"
907# define M_OS "QNX"
908# define SYSDEP_CFLAGS -D_POSIX_SOURCE -O2 -DUSG
909# define HAVE_VFPRINTF
910# define VOID_SIGHANDLER
911# define HAVE_GCC
912# define HAVE_FIXED_INCLUDES
913# define HAVE_STRERROR
914# define HAVE_GETGROUPS
915# undef USE_GNU_MALLOC
916# endif /* QNX 4.2 with GCC */
917
918/* Lynx 2.1.0 (Mike Brennen <mbrennen@maverick.intecom.com>) */
919# if !defined (done386) && (defined (__Lynx__) || defined (Lynx))
920# define done386
921# define M_MACHINE "i386"
922# define M_OS "Lynx"
923# define SYSDEP_CFLAGS -DHAVE_GETDTABLESIZE -DHAVE_BCOPY
924# define REQUIRED_LIBRARIES -lc_p
925# define HAVE_GETGROUPS
926# define VOID_SIGHANDLER
927# define HAVE_SYS_SIGLIST
928# define HAVE_VFPRINTF
929# define HAVE_VARARGS_H
930# if defined (__GNUC__)
931# define HAVE_FIXED_INCLUDES
932# endif /* __GNUC__ */
933/* Actually, Lynx does have unistd.h, but it defines _POSIX_VERSION,
934 and doesn't supply a fully compatible job control package. We just
935 pretend that it doesn't have it. */
936# undef HAVE_UNISTD_H
937/* Lynx's wait structure reverses w_Stopval and w_Stopsig - don't use it */
938# undef HAVE_WAIT_H
939# undef HAVE_DIRENT_H
940# endif /* !done386 && __Lynx__ */
941
942/* Assume a generic 386 running Sys V Release 3. */
943# if !defined (done386)
944# define done386
945# define M_MACHINE "i386"
946# define M_OS "USG"
947# define SYSDEP_CFLAGS -DUSGr3
948# define HAVE_VFPRINTF
949# define VOID_SIGHANDLER
950 /* Alloca requires either Gcc or cc with libPW.a */
951# if !defined (HAVE_GCC)
952# define REQUIRED_LIBRARIES -lPW
953# endif /* !HAVE_GCC */
954# undef HAVE_GETWD
955# endif /* Generic i386 Box running Sys V release 3. */
956#endif /* All i386 Machines with an `i386' define in cpp. */
957
958/* **************************************************************** */
959/* */
960/* Alliant FX/800 */
961/* */
962/* **************************************************************** */
963/* Original descs flushed. FX/2800 machine desc 1.13 bfox@ai.mit.edu.
964 Do NOT use -O with the stock compilers. If you must optimize, use
965 -uniproc with fxc, and avoid using scc. */
966#if defined (alliant)
967# define M_MACHINE "alliant"
968# define M_OS "Concentrix"
969# define HAVE_SYS_SIGLIST
970# define HAVE_SETLINEBUF
971# define HAVE_GETGROUPS
972# define HAVE_VFPRINTF
973# define HAVE_RESOURCE
974# define VOID_SIGHANDLER
975# define HAVE_STRERROR
976# define USE_GNU_MALLOC
977# define LD_HAS_NO_DASH_L
978# define SYSDEP_CFLAGS -DTERMIOS_MISSING -DMKFIFO_MISSING \
979 -DBSD_GETPGRP -DRLOGIN_PGRP_BUG -w
980 /* Actually, Alliant does have unistd.h, but it defines _POSIX_VERSION,
981 and doesn't supply a fully compatible job control package. We just
982 pretend that it doesn't have it. */
983# undef HAVE_UNISTD_H
984# undef HAVE_ALLOCA
985#endif /* alliant */
986
987/* ********************* */
988/* */
989/* Linux/m68k */
990/* */
991/* ********************* */
992#if defined (mc68000) && (defined (__linux__) || defined (linux))
993# define M_MACHINE "m68k"
994# define M_OS "Linux"
995# define SYSDEP_CFLAGS -DHAVE_BCOPY -DHAVE_GETPW_DECLS -DHAVE_GETHOSTNAME
996# define REQUIRED_LIBRARIES
997# define HAVE_GETGROUPS
998# define HAVE_STRERROR
999# define VOID_SIGHANDLER
1000# define HAVE_SYS_SIGLIST
1001# define HAVE_VFPRINTF
1002# define HAVE_VARARGS_H
1003# if defined (__GNUC__)
1004# define HAVE_FIXED_INCLUDES
1005# endif /* __GNUC__ */
1006# undef USE_GNU_MALLOC
1007# undef HAVE_SETLINEBUF
1008# define HAVE_STRCASECMP
1009#endif /* mc68000 && __linux__ */
1010
1011/* **************************************************************** */
1012/* */
1013/* Motorola Delta series running System V R3V6/7 */
1014/* */
1015/* **************************************************************** */
1016/* Contributed by Robert L. McMillin (rlm@ms_aspen.hac.com). */
1017
1018#if defined (m68k) && defined (sysV68)
1019# define M_MACHINE "Delta"
1020# define M_OS "USG"
1021# define SYSDEP_CFLAGS -DUSGr3 -DMEMMOVE_MISSING
1022# define VOID_SIGHANDLER
1023# define HAVE_VFPRINTF
1024# define REQUIRED_LIBRARIES -lm881
1025# undef HAVE_GETWD
1026# undef HAVE_RESOURCE
1027# undef HAVE_DUP2
1028# undef HAVE_ALLOCA
1029#endif /* Delta series */
1030
1031/* **************************************************************** */
1032/* */
1033/* Gould 9000 - UTX/32 R2.1A */
1034/* */
1035/* **************************************************************** */
1036#if defined (gould) /* Maybe should be GOULD_PN ? */
1037# define M_MACHINE "gould"
1038# define M_OS "Bsd"
1039# define HAVE_SYS_SIGLIST
1040# define HAVE_SETLINEBUF
1041# define HAVE_GETGROUPS
1042#endif /* gould */
1043
1044/* ************************ */
1045/* */
1046/* NeXT */
1047/* */
1048/* ************************ */
1049#if defined (NeXT) && !defined (M_MACHINE)
1050# define M_MACHINE "NeXT"
1051# define M_OS "NeXTstep"
1052# define HAVE_VFPRINTF
1053# define HAVE_SYS_SIGLIST
1054# define HAVE_GETGROUPS
1055# define HAVE_STRERROR
1056# define VOID_SIGHANDLER
1057# if !defined (HAVE_RESOURCE)
1058# define HAVE_RESOURCE
1059# endif
1060# define HAVE_STRCASECMP
1061# define GCC_STANDARD
1062# undef HAVE_GETWD
1063# undef HAVE_GETCWD
1064# undef HAVE_DIRENT_H
1065# define SYSDEP_CFLAGS -DMKFIFO_MISSING -DRLOGIN_PGRP_BUG
1066# undef USE_GNU_MALLOC
1067#endif /* NeXT */
1068
1069/* ********************** */
1070/* */
1071/* m68k NetBSD */
1072/* */
1073/* ********************** */
1074#if defined (m68k) && defined (__NetBSD__)
1075# include <machine/param.h>
1076# define M_MACHINE MACHINE
1077# define M_OS "NetBSD"
1078/* os/netbsd.h */
1079# define SYSDEP_CFLAGS -DOPENDIR_NOT_ROBUST -DINT_GROUPS_ARRAY \
1080 -DRLIMTYPE=quad_t
1081# define HAVE_SYS_SIGLIST
1082# define HAVE_SETLINEBUF
1083# define HAVE_GETGROUPS
1084# define HAVE_VFPRINTF
1085# define HAVE_STRERROR
1086# define VOID_SIGHANDLER
1087# define HAVE_DIRENT
1088# define HAVE_STRCASECMP
1089#endif /* m68k && __NetBSD__ */
1090
1091/* ************************ */
1092/* */
1093/* hp9000 4.4 BSD */
1094/* */
1095/* ************************ */
1096#if defined (hp9000) && defined (__BSD_4_4__)
1097# define M_MACHINE "hp9000"
1098# define M_OS "BSD_4_4"
1099# define HAVE_SYS_SIGLIST
1100# define HAVE_SETLINEBUF
1101# define HAVE_GETGROUPS
1102# define HAVE_STRERROR
1103# define HAVE_VFPRINTF
1104# define VOID_SIGHANDLER
1105# define HAVE_STRCASECMP
1106# define SYSDEP_CFLAGS -DHAVE_GETDTABLESIZE -DHAVE_BCOPY -DHAVE_RESOURCE
1107# undef HAVE_ALLOCA
1108#endif /* hp9000 && __BSD_4_4__ */
1109
1110/* ************************ */
1111/* */
1112/* hp9000 4.3 BSD */
1113/* */
1114/* ************************ */
1115#if defined (hp9000) && !defined (hpux) && !defined (M_MACHINE)
1116# define M_MACHINE "hp9000"
1117# define M_OS "Bsd"
1118# undef HAVE_ALLOCA
1119# define HAVE_SYS_SIGLIST
1120# define HAVE_SETLINEBUF
1121# define HAVE_GETGROUPS
1122# define USE_VFPRINTF_EMULATION
1123#endif /* hp9000 && !hpux */
1124
1125/* ************************ */
1126/* */
1127/* hpux */
1128/* */
1129/* ************************ */
1130#if defined (hpux)
1131
1132/* HPUX comes in several different flavors, from pre-release 6.2 (basically
1133 straight USG), to Posix compliant 9.0. */
1134
1135 /* HP machines come in several processor types.
1136 They are distinguished here. */
1137# if defined (hp9000s200) && !defined (hp9000s300)
1138# define M_MACHINE "hp9000s200"
1139# endif /* hp9000s200 */
1140# if defined (hp9000s300) && !defined (M_MACHINE)
1141# define M_MACHINE "hp9000s300"
1142# endif /* hp9000s300 */
1143# if defined (hp9000s500) && !defined (M_MACHINE)
1144# define M_MACHINE "hp9000s500"
1145# endif /* hp9000s500 */
1146# if defined (hp9000s700) && !defined (M_MACHINE)
1147# define M_MACHINE "hp9000s700"
1148# endif /* hp9000s700 */
1149# if defined (hp9000s800) && !defined (M_MACHINE)
1150# define M_MACHINE "hp9000s800"
1151# endif /* hp9000s800 */
1152# if defined (hppa) && !defined (M_MACHINE)
1153# define M_MACHINE "hppa"
1154# endif /* hppa */
1155
1156/* Define the OS as the particular type that we are using. */
1157/* This is for HP-UX systems earlier than HP-UX 6.2 -- no job control. */
1158# if defined (HPUX_USG)
1159# define M_OS "USG"
1160# define HPUX_CFLAGS -Dhpux
1161# define REQUIRED_LIBRARIES -lPW -lBSD
1162# undef HAVE_WAIT_H
1163# define HPUX_EXTRA
1164# else /* !HPUX_USG */
1165
1166/* All of the other operating systems need HPUX to be defined. */
1167# define HPUX_EXTRA -DHPUX -Dhpux -DHAVE_GETHOSTNAME -DUSG
1168
1169 /* HPUX 6.2 .. 6.5 require -lBSD for getwd (), and -lPW for alloca (). */
1170# if defined (HPUX_6)
1171# define M_OS "hpux_6"
1172# define REQUIRED_LIBRARIES -lPW -lBSD
1173# undef HAVE_ALLOCA
1174# undef HAVE_WAIT_H
1175# endif /* HPUX_6 */
1176
1177 /* On HP-UX 7.x, we do not link with -lBSD, so we don't have getwd (). */
1178# if defined (HPUX_7)
1179# define M_OS "hpux_7"
1180# define REQUIRED_LIBRARIES -lPW
1181# define HPUX_CFLAGS -DHAVE_SOCKETS
1182# undef HAVE_GETWD
1183# undef USE_GNU_MALLOC
1184# endif /* HPUX_7 */
1185
1186 /* HP-UX 8.x systems do not have a working alloca () on all platforms.
1187 This can cause us problems, especially when globbing. HP has the
1188 same YP bug as Sun, so we #undef USE_GNU_MALLOC. */
1189# if defined (HPUX_8)
1190# define M_OS "hpux_8"
1191# if !defined (__GNUC__)
1192# undef HAVE_ALLOCA
1193# define HPUX_ANSI +O3 -Aa -D_HPUX_SOURCE
1194# else
1195# define HPUX_ANSI
1196# endif
1197# undef HAVE_GETWD
1198# undef USE_GNU_MALLOC
1199# define HPUX_CFLAGS -DNO_SBRK_DECL -DHAVE_SOCKETS HPUX_ANSI
1200# endif /* HPUX_8 */
1201
1202 /* HP-UX 9.0 reportedly fixes the alloca problems present in the 8.0
1203 release. If so, -lPW is required to include it. */
1204# if defined (HPUX_9)
1205# define M_OS "hpux_9"
1206# if !defined (__GNUC__)
1207# undef HAVE_ALLOCA
1208# define HPUX_ANSI +O3 -Ae
1209# else
1210# define HPUX_ANSI
1211# endif
1212# undef HAVE_GETWD
1213# undef USE_GNU_MALLOC
1214# undef HAVE_RESOURCE
1215# define HPUX_CFLAGS -DNO_SBRK_DECL -DHAVE_SOCKETS -DHAVE_GETHOSTNAME HPUX_ANSI
1216# endif /* HPUX_9 */
1217
1218# if defined (HPUX_10)
1219# define M_OS "hpux_10"
1220# if !defined (__GNUC__)
1221# undef HAVE_ALLOCA
1222# define HPUX_ANSI +O3 -Ae
1223# else
1224# define HPUX_ANSI
1225# endif
1226# undef HAVE_GETWD
1227# undef USE_GNU_MALLOC
1228# undef HAVE_RESOURCE
1229# define HPUX_CFLAGS -DNO_SBRK_DECL -DHAVE_SOCKETS -DHAVE_GETHOSTNAME -DBSD_GETPGRP HPUX_ANSI
1230# endif /* HPUX_9 */
1231
1232# endif /* !HPUX_USG */
1233
1234 /* All of the HPUX systems that we have tested have the following. */
1235# define HAVE_DIRENT
1236# define HAVE_VFPRINTF
1237# define VOID_SIGHANDLER
1238# define HAVE_GETGROUPS
1239# define HAVE_STRERROR
1240# define USE_TERMCAP_EMULATION
1241# define SEARCH_LIB_NEEDS_SPACE
1242
1243# if defined (HPUX_CFLAGS)
1244# define SYSDEP_CFLAGS HPUX_CFLAGS HPUX_EXTRA
1245# else /* !HPUX_CFLAGS */
1246# define SYSDEP_CFLAGS HPUX_EXTRA
1247# endif /* !HPUX_CFLAGS */
1248
1249#endif /* hpux */
1250
1251/* ************************ */
1252/* */
1253/* MIPS OSF/1 */
1254/* */
1255/* ************************ */
1256# if defined (MIPSEL) && defined (__OSF1__)
1257# define M_MACHINE "mips"
1258# define M_OS "OSF1"
1259# define HAVE_SYS_SIGLIST
1260# define HAVE_SETLINEBUF
1261# define HAVE_VFPRINTF
1262# define HAVE_STRERROR
1263# define HAVE_GETGROUPS
1264# define VOID_SIGHANDLER
1265# define HAVE_BCOPY
1266# define USE_TERMCAP_EMULATION
1267# define SYSDEP_CFLAGS -D_BSD
1268# define REQUIRED_LIBRARIES -lbsd
1269# endif /* MIPSEL && __OSF1__ */
1270
1271/* ************************ */
1272/* */
1273/* HP OSF/1 */
1274/* */
1275/* ************************ */
1276#if defined (__hp_osf)
1277# define M_MACHINE "HPOSF1"
1278# define M_OS "OSF1"
1279# define SYSDEP_CFLAGS -q no_sl_enable
1280# define SYSDEP_LDFLAGS -q lang_level:classic
1281# define REQUIRED_LIBRARIES -lPW
1282# define HAVE_SETLINEBUF
1283# define HAVE_VFPRINTF
1284# define VOID_SIGHANDLER
1285# define HAVE_GETGROUPS
1286# define HAVE_STRERROR
1287# undef HAVE_ALLOCA
1288#endif /* __hp_osf */
1289
1290/* ************************ */
1291/* */
1292/* KSR1 OSF/1 */
1293/* */
1294/* ************************ */
1295#if defined (__ksr1__)
1296# define M_MACHINE "KSR1"
1297# define M_OS "OSF1"
1298# define HAVE_SETLINEBUF
1299# define HAVE_VFPRINTF
1300# define VOID_SIGHANDLER
1301# define HAVE_GETGROUPS
1302# define HAVE_STRERROR
1303# define SYSDEP_CFLAGS -DHAVE_GETDTABLESIZE -DHAVE_BCOPY -DHAVE_UID_T
1304# undef HAVE_ALLOCA
1305# undef USE_GNU_MALLOC
1306#endif /* ksr1 */
1307
1308/* ************************ */
1309/* */
1310/* Intel Paragon - OSF/1 */
1311/* */
1312/* ************************ */
1313#if defined (__i860) && defined (__PARAGON__)
1314# define M_MACHINE "Paragon"
1315# define M_OS "OSF1"
1316# define HAVE_GETGROUPS
1317# define HAVE_SETLINEBUF
1318# define HAVE_VFPRINTF
1319# define VOID_SIGHANDLER
1320# define HAVE_STRERROR
1321# define HAVE_SYS_SIGLIST
1322#endif /* __i860 && __PARAGON__ */
1323
1324/* ************************ */
1325/* */
1326/* IBM AIX/ESA (OSF/1) */
1327/* */
1328/* ************************ */
1329#if defined(AIXESA) || (defined(__ibmesa) && defined(_AIX))
1330# define M_MACHINE "IBMESA"
1331# define M_OS "OSF1"
1332# define HAVE_GETGROUPS
1333# define HAVE_SETLINEBUF
1334# define HAVE_VPRINTF
1335# define VOID_SIGHANDLER
1336# define HAVE_STRERROR
1337# define HAVE_SYS_SIGLIST
1338# define HAVE_ALLOCA_H /* hack for AIX/ESA, which has malloc.h */
1339# undef USE_GNU_MALLOC
1340#endif /* AIXESA || (__ibmesa && _AIX) */
1341
1342/* ************************ */
1343/* */
1344/* Intel i860 -- SVR4 */
1345/* */
1346/* ************************ */
1347#if defined (__i860) && defined (USGr4) && !defined (M_MACHINE)
1348# define M_MACHINE "i860"
1349# define M_OS "USG"
1350# define HAVE_DIRENT
1351# define HAVE_SYS_SIGLIST
1352# define HAVE_VFPRINTF
1353# define VOID_SIGHANDLER
1354# define HAVE_GETGROUPS
1355# if !defined (HAVE_GCC) && !defined (HAVE_ALLOCA_H)
1356# undef HAVE_ALLOCA
1357# endif /* !HAVE_GCC && !HAVE_ALLOCA_H */
1358# if defined (USGr4_2)
1359# define SYSDEP_CFLAGS -DUSGr4 -DUSGr4_2
1360# else
1361# define SYSDEP_CFLAGS -DUSGr4
1362# endif /* ! USGr4_2 */
1363# undef HAVE_GETWD
1364#endif /* __i860 && USGr4 */
1365
1366/* ************************ */
1367/* */
1368/* Xenix286 */
1369/* */
1370/* ************************ */
1371#if defined (Xenix286)
1372# define M_MACHINE "i286"
1373# define M_OS "Xenix"
1374
1375# define XENIX_CFLAGS -DUSG -DUSGr3 -DMEMMOVE_MISSING
1376
1377# if defined (XENIX_22)
1378# define XENIX_EXTRA -DREVERSED_SETVBUF_ARGS
1379# define REQUIRED_LIBRARIES -lx
1380# else /* !XENIX_22 */
1381# define HAVE_DIRENT
1382# if defined (XENIX_23)
1383# define XENIX_EXTRA -DLD_HAS_NO_DASH_L
1384# define REQUIRED_LIBRARIES -ldir
1385# else /* !XENIX_23 */
1386# define XENIX_EXTRA -xenix
1387# define SYSDEP_LDFLAGS -xenix
1388# define REQUIRED_LIBRARIES -ldir -l2.3
1389# endif /* !XENIX_23 */
1390# endif /* !XENIX_22 */
1391
1392# define SYSDEP_CFLAGS XENIX_CFLAGS XENIX_EXTRA
1393# undef HAVE_ALLOCA
1394# undef HAVE_GETWD
1395# undef HAVE_RESOURCE
1396#endif /* Xenix286 */
1397
1398/* ************************ */
1399/* */
1400/* convex */
1401/* */
1402/* ************************ */
1403#if defined (convex)
1404# define M_MACHINE "convex"
1405# define M_OS "Bsd"
1406# undef HAVE_ALLOCA
1407# define HAVE_SETLINEBUF
1408# define HAVE_SYS_SIGLIST
1409# define HAVE_GETGROUPS
1410#endif /* convex */
1411
1412/* ************************ */
1413/* */
1414/* AIX/RT */
1415/* */
1416/* ************************ */
1417#if defined (aix) && !defined (aixpc)
1418# define M_MACHINE "AIXRT"
1419# define M_OS "USG"
1420# define HAVE_DIRENT
1421# define HAVE_VFPRINTF
1422# define HAVE_SYS_SIGLIST
1423# define VOID_SIGHANDLER
1424# define HAVE_GETGROUPS
1425# define USE_TERMCAP_EMULATION
1426# if !defined (HAVE_GCC)
1427# undef MACHINE_CFLAGS
1428# define MACHINE_CFLAGS -a
1429# endif /* !HAVE_GCC */
1430# define SYSDEP_CFLAGS MACHINE_CFLAGS -DNLS -DUSGr3 -DHAVE_BCOPY
1431# undef USE_GNU_MALLOC
1432# undef HAVE_ALLOCA
1433# undef HAVE_RESOURCE
1434#endif /* aix && !aixpc */
1435
1436/* **************************************** */
1437/* */
1438/* IBM RISC 6000 */
1439/* */
1440/* **************************************** */
1441#if defined (RISC6000) || defined (_IBMR2)
1442# define M_MACHINE "RISC6000"
1443# define M_OS "AIX"
1444# define HAVE_DIRENT
1445# define HAVE_SYS_SIGLIST
1446# define HAVE_SETLINEBUF
1447# define HAVE_VFPRINTF
1448# define VOID_SIGHANDLER
1449# define USE_TERMCAP_EMULATION
1450# define HAVE_GETGROUPS
1451# define SYSDEP_CFLAGS -DNLS -DUSGr3 -DHAVE_BCOPY
1452# undef HAVE_ALLOCA
1453# undef HAVE_GETWD
1454# undef USE_GNU_MALLOC
1455#endif /* RISC6000 */
1456
1457/* **************************************** */
1458/* */
1459/* u370 IBM AIX/370 */
1460/* */
1461/* **************************************** */
1462#if defined (u370)
1463# if defined (_AIX370)
1464# define M_MACHINE "AIX370"
1465# define M_OS "Bsd"
1466# define REQUIRED_LIBRARIES -lbsd
1467# define HAVE_SETLINEBUF
1468# define HAVE_VFPRINTF
1469# define SYSDEP_CFLAGS -D_BSD
1470# define HAVE_GETGROUPS
1471# define USE_TERMCAP_EMULATION
1472# undef USE_GNU_MALLOC
1473# endif /* _AIX370 */
1474# if defined (USGr4) /* System V Release 4 on 370 series architecture. */
1475# define M_MACHINE "uxp"
1476# define M_OS "USG"
1477# define HAVE_DIRENT
1478# define HAVE_SYS_SIGLIST
1479# define HAVE_VFPRINTF
1480# define USE_GNU_MALLOC
1481# define VOID_SIGHANDLER
1482# if !defined (HAVE_GCC)
1483# undef HAVE_ALLOCA
1484# define EXTRA_LIB_SEARCH_PATH /usr/ucblib
1485# define REQUIRED_LIBRARIES -lc -lucb
1486# endif /* !HAVE_GCC */
1487# define HAVE_GETGROUPS
1488# define HAVE_RESOURCE
1489# define SYSDEP_CFLAGS -DUSGr4 -DNO_SBRK_DECL
1490# endif /* USGr4 */
1491#endif /* u370 */
1492
1493/* ************************ */
1494/* */
1495/* ATT 3B */
1496/* */
1497/* ************************ */
1498#if defined (att3b) || defined (u3b2)
1499# if defined (att3b)
1500# define M_MACHINE "att3b"
1501# define HAVE_SYS_SIGLIST
1502# else /* !att3b */
1503# define M_MACHINE "u3b2"
1504# endif /* !att3b */
1505# define M_OS "USG"
1506# undef HAVE_GETWD
1507# define HAVE_VFPRINTF
1508# define VOID_SIGHANDLER
1509 /* For an AT&T Unix before V.3 take out the -DUSGr3 and the HAVE_DIRENT. */
1510# define SYSDEP_CFLAGS -DUSGr3
1511# define HAVE_DIRENT
1512 /* Alloca requires either Gcc or cc with libPW.a. */
1513# if !defined (HAVE_GCC)
1514# define REQUIRED_LIBRARIES -lPW
1515# endif /* !HAVE_GCC */
1516#endif /* att3b */
1517
1518/* ************************ */
1519/* */
1520/* ATT 386 */
1521/* */
1522/* ************************ */
1523#if defined (att386)
1524# define M_MACHINE "att386"
1525# define M_OS "USG"
1526# undef HAVE_GETWD
1527 /* Alloca requires either Gcc or cc with libPW.a. */
1528# if !defined (HAVE_GCC)
1529# define REQUIRED_LIBRARIES -lPW
1530# endif /* HAVE_GCC */
1531# define HAVE_SYS_SIGLIST
1532# define HAVE_VFPRINTF
1533# define VOID_SIGHANDLER
1534 /* For an AT&T Unix before V.3 take out the -DUSGr3 and the HAVE_DIRENT. */
1535# define SYSDEP_CFLAGS -DUSGr3
1536# define HAVE_DIRENT
1537#endif /* att386 */
1538
1539/* ************************ */
1540/* */
1541/* ATT UNIX PC */
1542/* */
1543/* ************************ */
1544#if defined (unixpc)
1545# define M_MACHINE "unixpc"
1546# define M_OS "USG"
1547# define HAVE_VFPRINTF
1548# define HAVE_DIRENT
1549# if defined (HAVE_GCC)
1550# define REQUIRED_LIBRARIES -ldirent -shlib
1551# else /* !HAVE_GCC */
1552# define REQUIRED_LIBRARIES -ldirent
1553# endif /* !HAVE_GCC */
1554# undef HAVE_GETWD
1555# undef HAVE_DUP2
1556# undef VOID_SIGHANDLER
1557# undef HAVE_WAIT_H
1558#endif /* unixpc */
1559
1560/* ************************ */
1561/* */
1562/* Encore */
1563/* */
1564/* ************************ */
1565#if defined (MULTIMAX)
1566# if defined (n16)
1567# define M_MACHINE "Multimax32k"
1568# else
1569# define M_MACHINE "Multimax"
1570# endif /* n16 */
1571# if defined (UMAXV)
1572# define M_OS "USG"
1573# define REQUIRED_LIBRARIES -lPW
1574# define SYSDEP_CFLAGS -DUSGr3
1575# define HAVE_DIRENT
1576# define HAVE_VFPRINTF
1577# define USE_TERMCAP_EMULATION
1578# define VOID_SIGHANDLER
1579# else
1580# if defined (CMU)
1581# define M_OS "Mach"
1582# else
1583# define M_OS "Bsd"
1584# endif /* CMU */
1585# define HAVE_SYS_SIGLIST
1586# define HAVE_STRERROR
1587# define HAVE_SETLINEBUF
1588# endif /* UMAXV */
1589# define HAVE_GETGROUPS
1590#endif /* MULTIMAX */
1591
1592/* ******************************************** */
1593/* */
1594/* Encore Series 91 (88K BCS w Job Control) */
1595/* */
1596/* ******************************************** */
1597#if defined (__m88k) && defined (__UMAXV__)
1598# define M_MACHINE "Gemini"
1599# define M_OS "USG"
1600# define REQUIRED_LIBRARIES -lPW
1601# define USE_TERMCAP_EMULATION
1602# define HAVE_DIRENT
1603# define HAVE_GETGROUPS
1604# define HAVE_VFPRINTF
1605# define VOID_SIGHANDLER
1606# define SYSDEP_CFLAGS -q ext=pcc -D_POSIX_JOB_CONTROL -D_POSIX_VERSION \
1607 -Dmalloc=_malloc -Dfree=_free -Drealloc=_realloc
1608#endif /* m88k && __UMAXV__ */
1609
1610/* ******************************************** */
1611/* */
1612/* System V Release 4 on the ICL DRS6000 */
1613/* */
1614/* ******************************************** */
1615#if defined (drs6000)
1616# define M_MACHINE "drs6000"
1617# define M_OS "USG"
1618# define SYSDEP_CFLAGS -Xa -DUSGr4
1619# define SEARCH_LIB_NEEDS_SPACE
1620# define HAVE_DIRENT
1621# define HAVE_SYS_SIGLIST
1622# define HAVE_VFPRINTF
1623# define HAVE_GETGROUPS
1624# define HAVE_STRERROR
1625# define VOID_SIGHANDLER
1626# define USE_GNU_TERMCAP
1627# if !defined (__GNUC__)
1628# undef HAVE_ALLOCA
1629# endif
1630# undef HAVE_ALLOCA_H
1631# undef USE_GNU_MALLOC
1632#endif /* drs6000 */
1633
1634/* ******************************************** */
1635/* */
1636/* System V Release 4 on the Sparc (generic) */
1637/* */
1638/* ******************************************** */
1639#if defined (sparc) && defined (__svr4__) && !defined (M_MACHINE)
1640# define M_MACHINE "sparc"
1641# define M_OS "SVR4"
1642# define SYSDEP_CFLAGS -DUSG -DUSGr4 -DHAVE_UID_T
1643# define HAVE_DIRENT
1644# define HAVE_VFPRINTF
1645# define HAVE_GETGROUPS
1646# define HAVE_STRERROR
1647# define VOID_SIGHANDLER
1648# define USE_GNU_TERMCAP
1649# if !defined (__GNUC__)
1650# undef HAVE_ALLOCA
1651# endif
1652# undef HAVE_BCOPY
1653# undef HAVE_GETWD
1654# undef USE_GNU_MALLOC
1655#endif /* sparc && __svr4__ */
1656
1657/* ******************************************** */
1658/* */
1659/* Commodore Amiga */
1660/* */
1661/* ******************************************** */
1662#if defined (amiga) && defined (__NetBSD__)
1663# define M_MACHINE "amiga"
1664# define M_OS "NetBSD"
1665# define SYSDEP_CFLAGS -DOPENDIR_NOT_ROBUST -DINT_GROUPS_ARRAY \
1666 -DRLIMTYPE=quad_t
1667# define HAVE_SYS_SIGLIST
1668# define HAVE_SETLINEBUF
1669# define HAVE_GETGROUPS
1670# define HAVE_VFPRINTF
1671# define HAVE_STRERROR
1672# define VOID_SIGHANDLER
1673# define HAVE_DIRENT
1674# define HAVE_STRCASECMP
1675#endif /* amiga && __NetBSD__ */
1676
1677#if defined (amiga) && !defined (M_MACHINE)
1678# define M_MACHINE "amiga"
1679# define M_OS "USG"
1680# define SYSDEP_CFLAGS -DUSGr4
1681# if !defined (HAVE_GCC)
1682# define EXTRA_LIB_SEARCH_PATH /usr/ucblib
1683# define REQUIRED_LIBRARIES -lc -lucb
1684# endif /* !HAVE_GCC */
1685# define HAVE_DIRENT
1686# define HAVE_SYS_SIGLIST
1687# define HAVE_VFPRINTF
1688# define VOID_SIGHANDLER
1689# define HAVE_GETGROUPS
1690# define HAVE_STRERROR
1691# undef HAVE_GETWD
1692# undef USE_GNU_MALLOC
1693#endif /* System V Release 4 on amiga */
1694
1695/* ************************ */
1696/* */
1697/* clipper */
1698/* */
1699/* ************************ */
1700/* This is for the Orion 1/05 (A BSD 4.2 box based on a Clipper processor) */
1701#if defined (clipper) && !defined (M_MACHINE)
1702# define M_MACHINE "clipper"
1703# define M_OS "Bsd"
1704# define HAVE_SETLINEBUF
1705# define HAVE_GETGROUPS
1706#endif /* clipper */
1707
1708/* ******************************** */
1709/* */
1710/* Integrated Solutions 68020? */
1711/* */
1712/* ******************************** */
1713#if defined (is68k)
1714# define M_MACHINE "is68k"
1715# define M_OS "Bsd"
1716# define HAVE_SYS_SIGLIST
1717# define HAVE_SETLINEBUF
1718# define HAVE_GETGROUPS
1719# define USE_VFPRINTF_EMULATION
1720# undef HAVE_ALLOCA
1721#endif /* is68k */
1722
1723/* ******************************** */
1724/* */
1725/* Omron Luna/Mach 2.5 */
1726/* */
1727/* ******************************** */
1728#if defined (luna88k)
1729# define M_MACHINE "Luna88k"
1730# define M_OS "Bsd"
1731# define HAVE_SYS_SIGLIST
1732# define USE_GNU_MALLOC
1733# define HAVE_SETLINEBUF
1734# define HAVE_VFPRINTF
1735# define HAVE_GETGROUPS
1736# define HAVE_VFPRINTF
1737#endif /* luna88k */
1738
1739/* ************************ */
1740/* */
1741/* BBN Butterfly GP1000 */
1742/* Mach 1000 v2.5 */
1743/* */
1744/* ************************ */
1745#if defined (butterfly) && defined (BFLY1)
1746#define M_MACHINE "BBN Butterfly"
1747#define M_OS "Mach 1000"
1748#define HAVE_SETLINEBUF
1749#define HAVE_SYS_SIGLIST
1750#define HAVE_GETGROUPS
1751#define HAVE_VFPRINTF
1752# ifdef BUILDING_MAKEFILE
1753MAKE = make
1754# endif /* BUILDING_MAKEFILE */
1755#endif /* butterfly */
1756
1757/* **************************************** */
1758/* */
1759/* Apollo/SR10.2/BSD4.3 */
1760/* */
1761/* **************************************** */
1762/* This is for the Apollo DN3500 running SR10.2 BSD4.3 */
1763#if defined (apollo)
1764# define M_MACHINE "apollo"
1765# define M_OS "Bsd"
1766# define SYSDEP_CFLAGS -D_POSIX_VERSION -D_INCLUDE_BSD_SOURCE \
1767 -D_INCLUDE_POSIX_SOURCE -DTERMIOS_MISSING \
1768 -DBSD_GETPGRP -Dpid_t=int
1769# define HAVE_SYS_SIGLIST
1770# define HAVE_SETLINEBUF
1771# define HAVE_GETGROUPS
1772#endif /* apollo */
1773
1774/* ************************ */
1775/* */
1776/* DG AViiON */
1777/* */
1778/* ************************ */
1779/* This is for the DG AViiON box (runs DG/UX with both AT&T & BSD features.) */
1780/* DG/UX comes standard with Gcc. */
1781#if defined (__DGUX__) || defined (DGUX)
1782# define M_OS "DGUX"
1783# if !defined (_M88KBCS_TARGET)
1784# define M_MACHINE "AViiON"
1785# define REQUIRED_LIBRARIES -ldgc
1786# else /* _M88KBCS_TARGET */
1787# define M_MACHINE "m88kBCS_AV"
1788# undef MACHINE_CFLAGS
1789# define MACHINE_CFLAGS -D_M88K_SOURCE
1790# undef HAVE_RESOURCE
1791# endif /* _M88KBCS_TARGET */
1792# define SYSDEP_CFLAGS MACHINE_CFLAGS -D_DGUX_SOURCE -DPGRP_PIPE -DUSG
1793# define HAVE_GCC
1794# define HAVE_FIXED_INCLUDES
1795# define HAVE_STRERROR
1796# define HAVE_GETGROUPS
1797# define VOID_SIGHANDLER
1798# undef HAVE_GETWD
1799# undef USE_GNU_MALLOC
1800
1801/* If you want to build bash for M88K BCS compliance on a DG/UX 5.4
1802 or above system, do the following:
1803 - If you have built in this directory before run "make clean" to
1804 endure the Bash directory is clean.
1805 - Run "eval `sde-target m88kbcs`" to set the software development
1806 environment to build BCS objects.
1807 - Run "make".
1808 - Do "eval `sde-target default`" to reset the SDE. */
1809#endif /* __DGUX__ */
1810
1811/* ************************ */
1812/* */
1813/* Harris Night Hawk */
1814/* */
1815/* ************************ */
1816/* This is for the Harris Night Hawk family. */
1817#if defined (_CX_UX)
1818# if defined (_M88K)
1819# define M_MACHINE "nh4000"
1820# else /* !_M88K */
1821# if defined (hcx)
1822# define M_MACHINE "nh2000"
1823# else /* !hcx */
1824# if defined (gcx)
1825# define M_MACHINE "nh3000"
1826# endif /* gcx */
1827# endif /* !hcx */
1828# endif /* !_M88K */
1829# define M_OS "USG"
1830# define SYSDEP_CFLAGS -g -Xa -v -Dgetwd=bash_getwd -D_POSIX_SOURCE \
1831 -D_POSIX_JOB_CONTROL
1832# define USE_TERMCAP_EMULATION
1833# define HAVE_VFPRINTF
1834# define HAVE_GETGROUPS
1835# define VOID_SIGHANDLER
1836# undef USE_GNU_MALLOC
1837# undef HAVE_GETWD
1838#endif /* _CX_UX */
1839
1840/* **************************************** */
1841/* */
1842/* Tektronix */
1843/* */
1844/* **************************************** */
1845/* These are unproven as yet. */
1846#if defined (Tek4132)
1847# define M_MACHINE "Tek4132"
1848# define M_OS "Bsd"
1849# define HAVE_SYS_SIGLIST
1850# define HAVE_SETLINEBUF
1851# define HAVE_GETGROUPS
1852#endif /* Tek4132 */
1853
1854#if defined (Tek4300)
1855# define M_MACHINE "Tek4300"
1856# define M_OS "Bsd"
1857# define HAVE_SYS_SIGLIST
1858# define HAVE_SETLINEBUF
1859# define HAVE_GETGROUPS
1860#endif /* Tek4300 */
1861
1862/* ************************ */
1863/* */
1864/* Tektronix XD88 */
1865/* */
1866/* ************************ */
1867#if defined (m88k) && defined (XD88)
1868# define M_MACHINE "XD88"
1869# define M_OS "USG"
1870# define HAVE_DIRENT
1871# define HAVE_VFPRINTF
1872# define HAVE_GETCWD
1873# define VOID_SIGHANDLER
1874# define HAVE_GETGROUPS
1875# undef HAVE_GETWD
1876# undef HAVE_ALLOCA
1877#endif /* m88k && XD88 */
1878
1879/* ************************ */
1880/* */
1881/* Motorola M88100 */
1882/* */
1883/* ************************ */
1884#if defined (m88k) && (defined (M88100) || defined (USGr4))
1885# define M_MACHINE "M88100"
1886# define M_OS "USG"
1887# if defined (USGr4)
1888# define SYSDEP_CFLAGS -DUSGr4 -D_POSIX_JOB_CONTROL
1889# else
1890# define SYSDEP_CFLAGS -D_POSIX_JOB_CONTROL -DWAITPID_BROKEN
1891# endif
1892# define HAVE_DIRENT
1893# define HAVE_VFPRINTF
1894# define VOID_SIGHANDLER
1895# define HAVE_GETGROUPS
1896# undef HAVE_GETWD
1897# if !defined (USGr4)
1898# undef HAVE_GETCWD
1899# endif
1900# undef HAVE_ALLOCA
1901#endif /* m88k && M88100 */
1902
1903/* ************************ */
1904/* */
1905/* Sequent Balances */
1906/* (Dynix 3.x) */
1907/* ************************ */
1908#if defined (sequent) && !defined (M_MACHINE)
1909# define M_MACHINE "Sequent"
1910# define M_OS "Bsd"
1911# define HAVE_SYS_SIGLIST
1912# define HAVE_SETLINEBUF
1913# define HAVE_GETGROUPS
1914# define LD_HAS_NO_DASH_L
1915# undef HAVE_DUP2
1916#endif /* sequent */
1917
1918/* ****************************************** */
1919/* */
1920/* NCR Tower 32, System V Release 3 */
1921/* */
1922/* ****************************************** */
1923#if defined (tower32)
1924# define M_MACHINE "tower32"
1925# define M_OS "USG"
1926# if !defined (HAVE_GCC)
1927# define REQUIRED_LIBRARIES -lPW
1928 /* Disable stack/frame-pointer optimization, incompatible with alloca */
1929# undef MACHINE_CFLAGS
1930# define MACHINE_CFLAGS -W2,-aat
1931# endif /* !HAVE_GCC */
1932# define SYSDEP_CFLAGS -DUSGr3 MACHINE_CFLAGS
1933# define HAVE_VFPRINTF
1934# define USE_TERMCAP_EMULATION
1935# define VOID_SIGHANDLER
1936# undef HAVE_GETWD
1937#endif /* tower32 */
1938
1939/* ************************ */
1940/* */
1941/* Concurrent */
1942/* */
1943/* ************************ */
1944#if defined (concurrent)
1945# define M_MACHINE "Concurrent"
1946# if defined (USE_BSD_UNIVERSE)
1947 /* Use the BSD universe (`universe ucb') */
1948# define M_OS "Bsd"
1949# define HAVE_SYS_SIGLIST
1950# define HAVE_SETLINEBUF
1951# define HAVE_GETGROUPS
1952# else /* !USE_BSD_UNIVERSE */
1953 /* Concurrent 7000 with RTU 6.1A using the ATT universe (`universe att') */
1954# define M_OS "USG"
1955# define SYSDEP_CFLAGS -DHAVE_BCOPY -DHAVE_UID_T -DHAVE_GETDTABLESIZE -Dmc7000
1956# define REQUIRED_LIBRARIES -ljobs
1957# define HAVE_VPRINTF
1958# define HAVE_GETGROUPS
1959# define HAVE_DUP2
1960# define HAVE_DIRENT
1961# define HAVE_SYS_SIGLIST
1962# endif /* !USE_BSD_UNIVERSE */
1963#endif /* concurrent */
1964
1965/* **************************************************************** */
1966/* */
1967/* Honeywell Bull X20 (lele@idea.sublink.org) */
1968/* */
1969/* **************************************************************** */
1970#if defined (hbullx20)
1971# define M_MACHINE "Honeywell"
1972# define M_OS "USG"
1973# define SYSDEP_CFLAGS -DUSG
1974 /* Bull x20 needs -lposix for struct dirent. */
1975# define REQUIRED_LIBRARIES -lPW -lposix
1976# define HAVE_DIRENT
1977# define HAVE_VFPRINTF
1978# define VOID_SIGHANDLER
1979# define USE_TERMCAP_EMULATION
1980# undef HAVE_GETWD
1981#endif /* hbullx20 */
1982
1983/* ************************ */
1984/* */
1985/* CRAY */
1986/* */
1987/* ************************ */
1988#if defined (cray)
1989# include <sys/param.h>
1990# if defined (Cray1) || defined (Cray2)
1991# define M_MACHINE "Cray"
1992# define CRAY_STACK
1993# endif
1994# if defined (CrayXMP) && !defined (M_MACHINE)
1995# define M_MACHINE "CrayXMP"
1996# define CRAY_STACK -DCRAY_STACKSEG_END=getb67
1997# endif
1998# if defined (CrayYMP) && !defined (M_MACHINE)
1999# define M_MACHINE "CrayYMP"
2000# if RELEASE_LEVEL >= 7000
2001# define CRAY_STACK -DCRAY_STACKSEG_END=_getb67
2002# else
2003# define CRAY_STACK -DCRAY_STACKSEG_END=getb67
2004# endif /* RELEASE_LEVEL < 7000 */
2005# endif
2006# if !defined (M_MACHINE)
2007# define M_MACHINE "Cray"
2008# define CRAY_STACK
2009# endif
2010# define M_OS "Unicos"
2011# define SYSDEP_CFLAGS -DUSG -DPGRP_PIPE -DOPENDIR_NOT_ROBUST \
2012 -DHAVE_BCOPY CRAY_STACK
2013# define HAVE_VFPRINTF
2014# define HAVE_MULTIPLE_GROUPS
2015# define VOID_SIGHANDLER
2016# define USE_TERMCAP_EMULATION
2017# undef HAVE_ALLOCA
2018# undef HAVE_RESOURCE
2019# undef USE_GNU_MALLOC
2020#endif /* cray */
2021
2022/* ************************ */
2023/* */
2024/* MagicStation */
2025/* */
2026/* ************************ */
2027#if defined (MagicStation)
2028# define M_MACHINE "MagicStation"
2029# define M_OS "USG"
2030# define SYSDEP_CFLAGS -DUSGr4
2031# define HAVE_DIRENT
2032# define HAVE_GETGROUPS
2033# define HAVE_STRERROR
2034# define VOID_SIGHANDLER
2035# undef HAVE_ALLOCA
2036# undef HAVE_GETWD
2037#endif /* MagicStation */
2038
2039/* ************************ */
2040/* */
2041/* Plexus */
2042/* */
2043/* ************************ */
2044#if defined (plexus)
2045# define M_MACHINE "plexus"
2046# define M_OS "USG"
2047# define REQUIRED_LIBRARIES -lndir
2048# define USE_TERMCAP_EMULATION
2049# undef HAVE_DUP2
2050# undef HAVE_GETWD
2051# define HAVE_VFPRINTF
2052# undef HAVE_ALLOCA /* -lPW doesn't work w/bash-cc? */
2053#endif /* plexus */
2054
2055/* ************************ */
2056/* */
2057/* Siemens MX500 */
2058/* (SINIX 5.2x) */
2059/* ************************ */
2060#ifdef sinix
2061#define M_MACHINE "Siemens MX500"
2062#define M_OS "SINIX V5.2x"
2063#define USG
2064#define HAVE_GETCWD
2065#define VOID_SIGHANDLER
2066#define HAVE_STRERROR
2067#define HAVE_GETGROUPS
2068#define HAVE_VFPRINTF
2069#define HAVE_POSIX_SIGNALS
2070#define HAVE_RESOURCE
2071#define USE_GNU_MALLOC
2072#define SYSDEP_CFLAGS -DUSGr3 -DUSG
2073#define REQUIRED_LIBRARIES syscalls.o
2074#undef HAVE_ALLOCA
2075#undef HAVE_GETWD
2076#endif /* sinix */
2077
2078/* ************************ */
2079/* */
2080/* Symmetric 375 (4.2 BSD) */
2081/* */
2082/* ************************ */
2083#if defined (scs) && !defined (M_MACHINE)
2084# define M_MACHINE "Symmetric_375"
2085# define M_OS "Bsd"
2086# define HAVE_SYS_SIGLIST
2087# define HAVE_GETGROUPS
2088# define HAVE_SETLINEBUF
2089# define USE_VFPRINTF_EMULATION
2090# define USE_GNU_MALLOC
2091# undef HAVE_STRCHR
2092#endif /* scs */
2093
2094/* ************************ */
2095/* */
2096/* Tandem */
2097/* */
2098/* ************************ */
2099/* I don't know what this is supposed to be (Greg Lehey, LEMIS, 29 May 1995).
2100 * Tandem had two very different machines which ran SVR3: the LXN, based on
2101 * a Motorola 68000, and the S2, based on a MIPS R3000. Both are obsolete
2102 * (well, S2s should now be running NonStop UX version B, which is a flavour
2103 * of SVR4). I'm leaving this here and will test for NonStop UX B with the
2104 * preprocessor variable __nonstopux, which is set by the native compiler and
2105 * should also be set by any other compiler, such as gcc (caveat portor: you'$
2106 * need to fix gcc config to to get this). */
2107#if defined (tandem) && !defined (M_MACHINE)
2108# define M_MACHINE "tandem"
2109# define M_OS "USG"
2110# define SYSDEP_CFLAGS -DUSGr3
2111# define HAVE_VFPRINTF
2112# define VOID_SIGHANDLER
2113 /* Alloca requires either Gcc or cc with libPW.a */
2114# if !defined (HAVE_GCC)
2115# define REQUIRED_LIBRARIES -lPW
2116# endif /* !HAVE_GCC */
2117# undef HAVE_GETWD
2118#endif /* Tandem running SVR3 */
2119
2120/* This is for NonStop UX Bxx, which is SVR4, but there's a very good
2121 * chance it will trigger on NonStop UX Axx (SVR3). If this happens,
2122 * fix it or upgrade your OS. */
2123#if defined (mips) && defined (__nonstopux) /* Integrity, NonStop UX */
2124# define M_MACHINE "Integrity"
2125# define M_OS "NonStop_UX"
2126# undef HAVE_GETWD
2127# define HAVE_DIRENT
2128# define HAVE_STRERROR
2129# define HAVE_VFPRINTF
2130# define VOID_SIGHANDLER
2131# define HAVE_SYS_SIGLIST
2132# define HAVE_SETLINEBUF
2133# define HAVE_GETGROUPS
2134# undef HAVE_ALLOCA
2135#endif
2136
2137/* ****************** */
2138/* */
2139/* Fujitsu UXP/M */
2140/* */
2141/* ****************** */
2142
2143#if defined (__uxpm__)
2144# define M_MACHINE "VP"
2145# define M_OS "USG"
2146# define VOID_SIGHANDLER
2147# define HAVE_POSIX_SIGNALS
2148# define HAVE_VFPRINTF
2149# define HAVE_DIRENT
2150# define HAVE_SETVBUF
2151# define HAVE_STRCHR
2152# define HAVE_STRERROR
2153# define HAVE_GETGROUPS
2154# define HAVE_DUP2
2155# undef HAVE_ALLOCA
2156# undef HAVE_GETWD
2157# define HAVE_GETCWD
2158# define HAVE_SYS_SIGLIST
2159# define NO_SBRK_DECL
2160# define SYSDEP_CFLAGS -DHAVE_UID_T -Dsys_siglist=_sys_siglist -DUSGr4
2161# define EXTRA_LIB_SEARCH_PATH /usr/ucblib
2162# define REQUIRED_LIBRARIES -lc -lucb
2163#endif
2164
2165/* ****************** */
2166/* */
2167/* Amdahl UTS */
2168/* */
2169/* ****************** */
2170
2171#if defined (UTS) && !defined (M_MACHINE)
2172# define M_MACHINE "uts"
2173# define M_OS "systemV"
2174# define SYSDEP_CFLAGS -DUSG -DMEMMOVE_MISSING
2175# define REQUIRED_LIBRARIES
2176# undef HAVE_SYS_SIGLIST
2177# undef HAVE_GETWD
2178# undef HAVE_ALLOCA
2179# define HAVE_VFPRINTF
2180# define HAVE_DIRENT
2181# undef HAVE_RESOURCE
2182#endif /* UTS */
2183
2184/* ************************ */
2185/* */
2186/* Stratus i860 running FTX (jonathan@sybase.com (Jonathan Stockley)) */
2187/* */
2188/* ************************ */
2189/* Use 'make CPP_DEFINES=-D_FTX' to build as /usr/ccs/lib/cpp doesn't set
2190 anything other than i860 which may be set on other i860 machines.
2191 The C compiler, cc, sets _FTX & i860 but, unfortunately it barfs at stuff
2192 in cpp-Makefile that has a # in it (it has it's own builtin cpp).
2193*/
2194#if defined(_FTX) && defined (i860) && !defined (M_MACHINE)
2195#define M_MACHINE "Stratus_i860"
2196#define M_OS "FTX"
2197#define VOID_SIGHANDLER
2198#define HAVE_POSIX_SIGNALS
2199#define HAVE_VFPRINTF
2200#define HAVE_SETVBUF
2201#define REVERSED_SETVBUF_ARGS
2202#define HAVE_STRCHR
2203#define HAVE_STRERROR
2204#define HAVE_GETGROUPS
2205#define HAVE_DUP2
2206#undef HAVE_ALLOCA
2207#undef HAVE_GETWD
2208#define HAVE_GETCWD
2209#define HAVE_SYS_SIGLIST
2210#define SYSDEP_CFLAGS -DHAVE_UID_T -Dsys_siglist=_sys_siglist -DUSGr4
2211#define EXTRA_LIB_SEARCH_PATH /usr/ucblib
2212#define REQUIRED_LIBRARIES -lc -lucb
2213#endif /* _FTX */
2214
2215/* ************************ */
2216/* */
2217/* PCS Cadmus System */
2218/* */
2219/* ************************ */
2220#if defined (cadmus) && !defined (M_MACHINE)
2221# define M_MACHINE "cadmus"
2222# define M_OS "BrainDeath"
2223# define SYSDEP_CFLAGS -DUSG
2224# define HAVE_DIRENT
2225# define HAVE_VFPRINTF
2226# define VOID_SIGHANDLER
2227# define USE_TERMCAP_EMULATION
2228# undef HAVE_GETWD
2229# undef HAVE_ALLOCA
2230# undef HAVE_WAIT_H
2231#endif /* cadmus */
2232
2233/* **************************************************************** */
2234/* */
2235/* Generic Entry */
2236/* */
2237/* **************************************************************** */
2238
2239/* Use this entry for your machine if it isn't represented here. It
2240 is loosely based on a Vax running 4.3 BSD. */
2241
2242#if !defined (M_MACHINE)
2243# define UNKNOWN_MACHINE
2244#endif
2245
2246#if defined (UNKNOWN_MACHINE)
2247# define M_MACHINE "UNKNOWN_MACHINE"
2248# define M_OS "UNKNOWN_OS"
2249
2250/* Required libraries for building on this system. */
2251# define REQUIRED_LIBRARIES
2252
2253/* Define HAVE_SYS_SIGLIST if your system has sys_siglist[]. */
2254# define HAVE_SYS_SIGLIST
2255
2256/* Undef HAVE_GETWD if your C library does not provide a working version
2257 of getwd(). */
2258/* # undef HAVE_GETWD */
2259
2260/* Undef HAVE_GETCWD if your C library does not provide a working version
2261 of getcwd(). */
2262/* # undef HAVE_GETCWD */
2263
2264/* Undef HAVE_ALLOCA if you are not using Gcc, and neither your library
2265 nor compiler has a version of alloca (). In that case, we will use
2266 our version of alloca () in alloca.c */
2267/* # undef HAVE_ALLOCA */
2268
2269/* Undef USE_GNU_MALLOC if there appear to be library conflicts, or if you
2270 especially desire to use your OS's version of malloc () and friends. We
2271 reccommend against this because GNU Malloc has debugging code built in. */
2272/* # undef USE_GNU_MALLOC */
2273
2274/* Define USE_GNU_TERMCAP if you want to use the GNU termcap library
2275 instead of your system termcap library. */
2276/* # define USE_GNU_TERMCAP */
2277
2278/* Define HAVE_SETLINEBUF if your machine has the setlinebuf ()
2279 stream library call. Otherwise, setvbuf () will be used. If
2280 neither of them work, you can edit in your own buffer control
2281 based upon your machines capabilities. */
2282# define HAVE_SETLINEBUF
2283
2284/* Define HAVE_VFPRINTF if your machines has the vfprintf () library
2285 call. Otherwise, printf will be used. */
2286# define HAVE_VFPRINTF
2287
2288/* Define USE_VFPRINTF_EMULATION if you want to use the BSD-compatible
2289 vfprintf() emulation in vprint.c. */
2290/* # define USE_VFPRINTF_EMULATION */
2291
2292/* Define HAVE_GETGROUPS if your OS allows you to be in multiple
2293 groups simultaneously by supporting the `getgroups' system call. */
2294# define HAVE_GETGROUPS
2295
2296/* Define SYSDEP_CFLAGS to be the flags to cc that make your compiler
2297 work. For example, `-ma' on the RT makes alloca () work. */
2298/* This is a summary of the semi-machine-independent definitions that
2299 can go into SYSDEP_CFLAGS:
2300
2301 AFS - The Andrew File System is being used
2302 AFS_CREATE_BUG - AFS has a bug with file creation if O_CREAT is
2303 specified
2304 BSD_GETPGRP - getpgrp(2) takes a pid argument, a la 4.3 BSD
2305 HAVE_BCOPY - bcopy(3) exists and works as in BSD
2306 HAVE_GETDTABLESIZE - getdtablesize(2) exists and works correctly
2307 HAVE_GETHOSTNAME - gethostname(2) or gethostname(3) is present and
2308 works as in BSD
2309 HAVE_GETPW_DECLS - USG machines with the getpw* functions defined in
2310 <pwd.h> that cannot handle redefinitions in the
2311 bash source
2312 HAVE_RESOURCE - <sys/resource.h> and [gs]rlimit exist and work
2313 HAVE_SETDTABLESIZE - setdtablesize(2) exists and works correctly
2314 HAVE_SOCKETS - this system has BSD sockets added to a System V base
2315 HAVE_UID_T - Definitions for uid_t and gid_t are in <sys/types.h>
2316 INT_GROUPS_ARRAY - the second argument to getgroups(3) is an array
2317 of integers
2318 MEMMOVE_MISSING - the system does not have memmove(3)
2319 MKFIFO_MISSING - named pipes do not work or mkfifo(3) is missing
2320 NO_SBRK_DECL - don't declare sbrk as extern char *sbrk() in
2321 lib/malloc/malloc.c
2322 OPENDIR_NOT_ROBUST - opendir(3) allows you to open non-directory files
2323 PGRP_PIPE - Requires parent-child synchronization via pipes to
2324 make job control work right
2325 REVERSED_SETVBUF_ARGS - brain-damaged implementation of setvbuf that
2326 has args 2 and 3 reversed from the SVID and
2327 ANSI standard
2328 RLOGIN_PGRP_BUG - processes started by rlogind have a process group
2329 of 0
2330 TERMIOS_LDISC - system has a c_line line discipline member in struct
2331 termios
2332 TERMIOS_MISSING - the termios(3) functions are not present or don't
2333 work, even though _POSIX_VERSION is defined
2334 USG - The machine is running some sort of System V Unix
2335 USGr3 - The machine is running SVR3.x
2336 USGr4 - The machine is running SVR4
2337 USGr4_2 - The machine is running SVR4.2
2338*/
2339# define SYSDEP_CFLAGS
2340
2341/* Define HAVE_STRERROR if your system supplies a definition for strerror ()
2342 in the C library, or a macro in a header file. */
2343/* # define HAVE_STRERROR */
2344
2345/* Define HAVE_STRCASECMP if your system supplies definitions for the
2346 casel-insensitive string comparison functions strcasecmp and strncasemp
2347 in the C library or one of the system header files. */
2348/* # define HAVE_STRCASECMP */
2349
2350/* Define HAVE_DIRENT if you have the dirent library and a definition of
2351 struct dirent. If not, the BSD directory reading library and struct
2352 direct are assumed. */
2353/* # define HAVE_DIRENT */
2354
2355/* If your system does not supply /usr/lib/libtermcap.a, but includes
2356 the termcap routines as a part of the curses library, then define
2357 this. This is the case on some System V machines. */
2358/* # define USE_TERMCAP_EMULATION */
2359
2360/* Define VOID_SIGHANDLER if your system's signal () returns a pointer to
2361 a function returning void. */
2362/* # define VOID_SIGHANDLER */
2363
2364/* Define EXTRA_LIB_SEARCH_PATH if your required libraries (or standard)
2365 ones for that matter) are not normally in the ld search path. For
2366 example, some machines require /usr/ucblib in the ld search path so
2367 that they can use -lucb. */
2368/* # define EXTRA_LIB_SEARCH_PATH /usr/ucblib */
2369
2370/* Define SEARCH_LIB_NEEDS_SPACE if your native ld requires a space after
2371 the -L argument, which gives the name of an alternate directory to search
2372 for libraries specified with -llib. For example, the HPUX ld requires
2373 this:
2374 -L lib/readline -lreadline
2375 instead of:
2376 -Llib/readline -lreadline
2377 */
2378/* # define SEARCH_LIB_NEEDS_SPACE */
2379
2380/* Define LD_HAS_NO_DASH_L if your ld can't grok the -L flag in any way, or
2381 if it cannot grok the -l<lib> flag, or both. */
2382/* # define LD_HAS_NO_DASH_L */
2383
2384/* Define GCC_STANDARD if the standard `cc' is gcc and you don't want
2385 to use the compiler named `gcc' for some reason. */
2386/* # define GCC_STANDARD */
2387
2388# if defined (LD_HAS_NO_DASH_L)
2389# undef SEARCH_LIB_NEEDS_SPACE
2390# endif /* LD_HAS_NO_DASH_L */
2391
2392#endif /* UNKNOWN_MACHINE */