host.defs revision 69408
1newcode	:
2/* $Header: /src/pub/tcsh/host.defs,v 1.28 2000/11/11 23:03:35 christos Exp $ */
3/*
4 * host.defs: Hosttype/Machtype etc.
5 */
6/*-
7 * Copyright (c) 1980, 1991 The Regents of the University of California.
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 *    notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 *    notice, this list of conditions and the following disclaimer in the
17 *    documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 *    must display the following acknowledgement:
20 *	This product includes software developed by the University of
21 *	California, Berkeley and its contributors.
22 * 4. Neither the name of the University nor the names of its contributors
23 *    may be used to endorse or promote products derived from this software
24 *    without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 */
38#include "sh.h"
39
40RCSID("$Id: host.defs,v 1.28 2000/11/11 23:03:35 christos Exp $")
41
42endcode	:
43
44macro	: M_mipsel : (defined(mips) || defined(__mips)) && (defined(MIPSEL) || defined(__MIPSEL))
45macro	: M_mipseb : (defined(mips) || defined(__mips)) && (defined(MIPSEB) || defined(__MIPSEB))
46macro	: M_i386 : (defined(i386) || defined(__i386__))
47macro	: M_i486 : (defined(i486) || defined(__i486__))
48macro	: M_i586 : (defined(i586) || defined(__i586__))
49macro	: M_intel : (defined(M_i386) || defined(M_i486) || defined(M_i586))
50
51newdef	: defined(ns32000)
52newcode	:
53static char *
54isamultimax(flag)
55    int flag;
56{
57    if (access("/Umax.image", F_OK) == 0)
58	return "multimax";
59    else 
60	return flag ? "mach" : "ns32000";
61}
62endcode	:
63enddef	:
64
65
66newdef	: defined(cray)
67newcode	:
68/*  
69 * On crays, find the current machine type via the target() syscall
70 * We need ctype.h to convert the name returned to lower case
71 */
72# include <sys/target.h> 
73# include <ctype.h>
74# include <string.h>
75
76/* From: hpa@hook.eecs.nwu.edu (H. Peter Anvin) */
77static char *
78getcray()
79{
80# ifdef MC_GET_SYSTEM /* If we have target() */
81    struct target data;
82
83    if (target(MC_GET_SYSTEM, &data) != -1) {
84	static char hosttype_buf[sizeof(data.mc_pmt)+1];
85	char *p = (char *) &(data.mc_pmt);
86	char *q = hosttype_buf;
87	int n;
88
89	/* 
90	 * Copy to buffer and convert to lower case 
91	 * String may not be null-terminated, so keep a counter
92	 */
93	for (n = 0; *p && n < sizeof(data.mc_pmt); n++)
94	  *q++ = tolower(p[n]);
95
96	*q = '\0';
97
98	/* replace dashes with underscores if present */
99	while ((q = strchr(hosttype_buf, '-')) != NULL)
100	    *q = '_';
101	return hosttype_buf; 	/* Return in static buffer */
102    }
103    else
104# endif /* MC_GET_SYSTEM */
105	return "cray";		/* target() failed */
106}
107endcode	:
108enddef	:
109
110
111newdef	: defined(convex)
112newcode	:
113/*  
114 * On convex, find the current machine type via the getsysinfo() syscall
115 */
116#include <sys/sysinfo.h> 
117
118/* From: fox@convex.com (David DeSimone) */
119static char *
120getconvex()
121{
122    struct system_information  sysinfo;
123    static char  result[8];
124
125    if (getsysinfo(SYSINFO_SIZE, &sysinfo) == -1)
126	return "convex";
127
128    switch(sysinfo.cpu_type) {
129#ifdef SI_CPUTYPE_C1
130    case SI_CPUTYPE_C1:
131	return "c1";
132#endif
133
134#ifdef SI_CPUTYPE_C2
135    case SI_CPUTYPE_C2:
136	return "c2";
137#endif
138
139#ifdef SI_CPUTYPE_C2MP
140    case SI_CPUTYPE_C2MP:
141	(void) strcpy(result, "c2X0");
142	result[2] = sysinfo.cpu_count + '0';
143	return result;
144#endif
145
146#ifdef SI_CPUTYPE_C34
147    case SI_CPUTYPE_C34:
148	(void) strcpy(result, "c34X0");
149	result[3] = sysinfo.cpu_count + '0';
150	return result;
151#endif
152
153#ifdef SI_CPUTYPE_C38
154    case SI_CPUTYPE_C38:
155	(void) strcpy(result, "c38X0");
156	result[3] = sysinfo.cpu_count + '0';
157	return result;
158#endif
159
160#ifdef SI_CPUTYPE_C46
161    case SI_CPUTYPE_C46:
162	(void) strcpy(result, "c46X0");
163	result[3] = sysinfo.cpu_count + '0';
164	return result;
165#endif
166
167    default:
168	return "convex";
169    }
170}
171endcode	:
172enddef	:
173
174
175newcode	:
176void
177getmachine()
178{
179     char *hosttype;
180     char *ostype;
181     char *vendor;
182     char *machtype;
183
184endcode	:
185
186
187newdef	: defined(HOSTTYPE)
188hosttype:						: HOSTTYPE
189enddef	:
190
191
192newdef	: defined(__PARAGON__)
193comment	: Intel Paragon running OSF/1
194vendor	:						: "intel"
195hosttype:						: "paragon"
196ostype	:						: "osf1"
197machtype: defined(M_i386) 				: "i386"
198enddef	:
199
200
201newdef	: defined(AMIX)
202comment	: Amiga running Amix 2.02
203vendor	:						: "commodore"
204hosttype:						: "amiga"
205ostype	:						: "Amix"
206machtype:						: "m68k"
207enddef	:
208
209
210newdef	: defined(accel)
211comment	: celerity Accel
212vendor	: 						: "celerity"
213hosttype: 						: "celerityACCEL"
214ostype	:						: "unix"
215machtype:						: "accel"
216enddef	:
217
218
219newdef	: defined(_VMS_POSIX)
220comment	: digital vax or alpha running vms posix
221vendor	:						: "dec"
222hosttype:						: "VMS-POSIX"
223ostype	:						: "vms"
224machtype: defined(__alpha)				: "alpha"
225machtype: defined(__vax) || defined(vax)		: "vax"
226machtype: defined(__vax__) 				: "vax"
227enddef	:
228
229
230newdef	: defined(__hp_osf)
231comment	: Hewlett Packard running OSF/1
232vendor	:						: "hp"
233hosttype: defined(__pa_risc)				: "hp9000s700-osf1"
234hosttype: 						: "hp-osf1"
235ostype	: 						: "osf1"
236machtype: defined(__pa_risc)				: "pa_risc"
237enddef	:
238
239
240newdef	: defined(hp9000)
241comment	: Hewlett Packard running MORE/bsd 
242vendor	: 						: "hp"
243hosttype: defined(hp300)				: "hp300"
244hosttype: defined(hp800)				: "hp800"
245hosttype: 						: "hp9000"
246ostype	: defined(BSD4_4)				: "bsd44"
247ostype	:						: "mtXinu"
248machtype: defined(hp300)				: "m68k"
249machtype: defined(hp800)				: "pa_risc"
250enddef	:
251
252
253newdef	: defined(hpux) || defined(__hpux)
254comment	: Hewlett Packard running HP/UX
255vendor	:						: "hp"
256hosttype: defined(__hp9000s700)				: "hp9000s700"
257hosttype: defined(__hp9000s800) || defined(hp9000s800)  : "hp9000s800"
258hosttype: defined(hp9000s500)				: "hp9000s500"
259hosttype: defined(__hp9000s300) || defined(hp9000s300)  : "hp9000s300"
260hosttype: 						: "hp"
261ostype	:						: "hpux"
262machtype: defined(__hp9000s700)				: "pa_risc"
263machtype: defined(__hp9000s800) || defined(hp9000s800)  : "pa_risc"
264machtype: defined(hp9000s500)				: "m68k"
265machtype: defined(__hp9000s300) || defined(hp9000s300)  : "m68k"
266enddef	:
267
268
269newdef	: defined(apollo)
270comment	: Hewlett Packard apollo running Domain/OS
271vendor	:						: "hp"
272hosttype: 						: "apollo"
273ostype	:						: "DomainOS"
274machtype: 						: "m68k"
275enddef	:
276
277
278newdef	: defined(sun) || defined(__sun__)
279comment	: Sun Microsystems series 2 workstation (68010 based)
280comment	: Sun Microsystems series 3 workstation (68020 based)
281comment	: Sun Microsystems 386i workstation (386 based)
282comment	: Sun Microsystems series 4 workstation (SPARC based)
283vendor	:						: "sun"
284hosttype: defined(M_i386) && !defined(__SVR4)		: "sun386i"
285hosttype: defined(M_i386) && defined(__SVR4)		: "i86pc"
286hosttype: defined(mc68010) || defined(__mc68010__)	: "sun2"
287hosttype: defined(mc68020) || defined(__mc68020__)	: "sun3"
288hosttype: defined(sparc) || defined(__sparc__)		: "sun4"
289hosttype: 						: "sun"
290ostype	: defined(SUNOS3)				: "sunos3"
291ostype	: defined(SUNOS4)				: "sunos4"
292ostype	: defined(SOLARIS2)				: "solaris"
293machtype: defined(mc68010) || defined(__mc68010__)	: "m68k"
294machtype: defined(mc68020) || defined(__mc68020__)	: "m68k"
295machtype: defined(sparc) || defined(__sparc__)		: "sparc"
296machtype: defined(M_i386)				: "i386"
297enddef	:
298
299
300newdef	: defined(pyr)
301comment	: Pyramid Technology
302vendor	:						: "pyramid"
303hosttype:						: "pyramid"
304machtype:						: "pyramid"
305enddef	:
306
307
308newdef	: defined(hcx) || defined(_CX_UX)
309comment	: Harris Tahoe running CX/UX
310vendor	:						: "harris"
311hosttype:						: "hcx"
312ostype	:						: "hcx"
313machtype:						: "tahoe"
314enddef	:
315
316
317newdef	: defined(tahoe)
318comment	: Harris Tahoe
319vendor	:						: "harris"
320hosttype:						: "tahoe"
321machtype:						: "tahoe"
322enddef	:
323
324
325newdef	: defined(ibm032)
326comment	: RT running IBM AOS4.3 or MACH
327vendor	:						: "ibm"
328hosttype:						: "rt"
329ostype	: defined(MACH)					: "mach"
330ostype	: 						: "aos"
331machtype:						: "ibm032"
332enddef	:
333
334
335newdef	: defined(aiws)
336comment	: RT running IBM aix2.x
337vendor	:						: "ibm"
338hosttype:						: "rtpc"
339ostype	:						: "aix"
340machtype:						: "ibm032"
341enddef	:
342
343
344newdef	: defined(_AIX370)
345comment	: IBM/370 running aix
346vendor	:						: "ibm"
347hosttype:						: "aix370"
348ostype	:						: "aix"
349machtype:						: "ibm370"
350enddef	:
351
352
353newdef	: defined(_IBMESA)
354comment	: IBM/ESA running aix
355vendor	:						: "ibm"
356hosttype:						: "aixESA"
357ostype	:						: "aix"
358machtype:						: "esa"
359enddef	:
360
361
362newdef	: defined(_IBMR2)
363comment	: IBM/RS6000 running aix
364vendor	:						: "ibm"
365hosttype:						: "rs6000"
366ostype	:						: "aix"
367machtype:						: "rs6000"
368enddef	:
369
370
371newdef	: defined(_AIXPS2)
372comment	: IBM/PS2 running aix
373vendor	:						: "ibm"
374hosttype:						: "ps2"
375ostype	:						: "aix"
376machtype:						: "i386"
377enddef	:
378
379
380newdef	: defined(OREO)
381comment	: Macintosh running AU/X
382vendor	:						: "apple"
383hosttype:						: "mac2"
384ostype	:						: "aux"
385machtype: defined(mc68020)				: "m68k"
386enddef	:
387
388
389newdef	: defined(u3b20d)
390comment	: AT&T 3B/20 series running SVR2/3 
391vendor	:						: "att"
392hosttype:						: "att3b20"
393machtype:						: "u3b20"
394enddef	:
395
396
397newdef	: defined(u3b15)
398comment	: AT&T 3B/15 series running SVR2/3 
399vendor	:						: "att"
400hosttype:						: "att3b15"
401machtype:						: "u3b15"
402enddef	:
403
404
405newdef	: defined(u3b5)
406comment	: AT&T 3B/5 series running SVR2/3 
407vendor	:						: "att"
408hosttype:						: "att3b5"
409machtype:						: "u3b5"
410enddef	:
411
412
413newdef	: defined(u3b2)
414comment	: AT&T 3B/2 series running SVR2/3 
415vendor	:						: "att"
416hosttype:						: "att3b2"
417machtype:						: "u3b2"
418enddef	:
419
420
421newdef	: defined(UNIXPC)
422comment	: AT&T UnixPC att3b1/att7300
423vendor	:						: "att"
424hosttype:						: "unixpc"
425machtype: defined(u3b1)					: "u3b1"
426machtype: defined(att7300)				: "att7300"
427enddef	:
428
429
430newdef	: defined(_MINIX)
431comment	: Andy Tanenbaum's minix
432vendor	: defined(M_i386)				: "intel"
433hosttype: defined(M_i386)				: "minix386"
434hosttype:						: "minix"
435ostype	:						: "minix"
436machtype: defined(M_i386)				: "i386"
437enddef	:
438
439
440newdef	: defined(linux)
441comment	: Linus Torvalds's linux
442vendor	: defined(M_intel)				: "intel"
443hosttype: defined(M_i586) 				: "i586-linux"
444hosttype: defined(M_i486) 				: "i486-linux"
445hosttype: defined(M_i386)				: "i386-linux"
446ostype	: !defined(PPC) 				: "linux"
447ostype	: defined(PPC)					: "mklinux"
448machtype: defined(M_i586) 				: "i586"
449machtype: defined(M_i486) 				: "i486"
450machtype: defined(M_i386)				: "i386"
451vendor	: defined(__alpha)				: "dec"
452vendor	: defined(PPC)					: "apple"
453hosttype: defined(__alpha)				: "alpha"
454hosttype: defined(PPC)					: "powerpc"
455machtype: defined(__alpha)				: "alpha"
456machtype: defined(PPC)					: "powerpc"
457enddef	:
458
459
460newdef	: defined(__EMX__)
461comment	: OS/2 EMX [unix emulation under OS/2]
462vendor	: defined(M_intel)				: "intel"
463hosttype: defined(M_i386)				: "i386-emx"
464ostype	:						: "os2"
465machtype: defined(M_i386)				: "i386"
466enddef	:
467
468
469newdef	: defined(__NetBSD__) 
470comment	: NetBSD
471vendor	: defined(arm32)				: "acorn"
472vendor	: defined(alpha)				: "digital"
473vendor	: defined(amiga)				: "commodore"
474vendor	: defined(atari)				: "atari"
475vendor	: defined(hp300)				: "hp"
476vendor	: defined(M_intel)				: "intel"
477vendor	: defined(m68k)					: "motorola"
478vendor	: defined(mac68k)				: "apple"
479vendor	: defined(pc532)				: "national-semi"
480vendor	: defined(pmax)	|| defined(mips)		: "dec"
481vendor	: defined(M_mipsel)				: "dec"
482vendor	: defined(sparc)				: "sun"
483vendor	: defined(sun3)					: "sun"
484vendor	: defined(vax)					: "digital"
485hosttype: 						: "NetBSD"
486ostype	: 						: "NetBSD"
487machtype: defined(arm32)				: "arm32"
488machtype: defined(sparc)				: "sparc"
489machtype: defined(mc68020)				: "m68k"
490machtype: defined(M_i386)				: "i386"
491machtype: defined(M_mipsel)				: "mipsel"
492machtype: defined(M_mipseb)				: "mipseb"
493machtype: defined(mips)					: "mips"
494machtype: defined(pc532)				: "pc532"
495machtype: defined(vax)					: "vax"
496machtype: defined(alpha)				: "alpha"
497enddef	:
498
499
500newdef	: defined(__FreeBSD__) 
501comment	: FreeBSD
502vendor	: defined(M_intel)				: "intel"
503hosttype:						: "FreeBSD"
504ostype	:						: "FreeBSD"
505machtype:						: "i386"
506enddef	:
507
508
509newdef	: defined(__386BSD__)
510comment	: Bill Jolitz's 386BSD
511vendor	: defined(M_intel)				: "intel"
512hosttype:						: "386BSD"
513ostype	:						: "386BSD"
514machtype:						: "i386"
515enddef	:
516
517
518newdef	: defined(bsdi)
519comment	: BSDI's unix
520vendor	: defined(M_intel)				: "intel"
521vendor	: defined(sparc)				: "sun"
522vendor	: defined(__powerpc__)				: "motorola"
523hosttype: defined(M_intel)				: "bsd386"
524hosttype: defined(sparc)				: "bsd-sparc"
525hosttype: defined(__powerpc__)				: "bsd-powerpc"
526ostype	:						: "bsdi"
527machtype: defined(M_i386)				: "i386"
528machtype: defined(sparc)				: "sparc"
529machtype: defined(__powerpc__)				: "powerpc"
530enddef	:
531
532
533newdef	: defined(COHERENT)
534comment	: COHERENT's unix
535vendor	: defined(_I386)				: "intel"
536hosttype:						: "coh386"
537hosttype:						: "coherent"
538ostype	:						: "coherent"
539machtype: defined(_I386)				: "i386"
540enddef	:
541
542newdef	: defined(SCO)
543comment	: SCO UNIX System V/386 Release 3.2
544vendor	:						: "sco"
545hosttype:						: "sco386"
546ostype	:						: "sco_unix"
547machtype:						: "i386"
548enddef	:
549
550newdef	: defined(M_XENIX) && !defined(M_UNIX)
551comment	: SCO XENIX
552vendor	:						: "sco"
553hosttype:						: "sco_xenix"
554ostype	:						: "sco_xenix"
555machtype: defined(M_I386)				: "i386"
556machtype: defined(M_I286)				: "i286"
557enddef	:
558
559
560newdef	: defined(ISC) || defined(ISC202)
561comment	: Interactive Unix
562vendor	:						: "isc"
563hosttype:						: "isc386"
564ostype	: defined(POSIX)				: "POSIX"
565ostype	: 						: "SVR3"
566machtype: defined(M_i386)				: "i386"
567enddef	:
568
569
570newdef	: defined(INTEL)
571comment	: Intel Unix
572vendor	:						: "intel"
573hosttype:						: "intel386"
574ostype	:						: "intel_unix"
575machtype: defined(M_i386)				: "i386"
576enddef	:
577
578
579newdef	: defined(MACH)
580comment	: cmu's mach
581vendor	:						: "cmu"
582hosttype: defined(M_i386)				: "i386-mach"
583ostype	:						: "mach"
584machtype: defined(M_i386)				: "i386"
585enddef	:
586
587
588newdef	: defined(alliant)
589comment	: Alliants FSX
590vendor	:						: "alliant"
591hosttype: defined(mc68000)				: "alliant-fx80"
592hosttype: defined(i860)					: "alliant-fx2800"
593hosttype:						: "alliant"
594ostype	:						: "fsx"
595machtype: defined(mc68000)				: "mc68000"
596machtype: defined(i860)					: "i860"
597enddef	:
598
599
600newdef	: defined(_FTX)
601comment	: Stratus Computer, Inc FTX2 (i860 based)
602comment	: Stratus Computer, Inc FTX3 (HPPA based)
603vendor	:						: "stratus"
604hosttype: defined(i860) && defined(_FTX)		: "atlantic"
605hosttype: defined(__hppa) && defined(_FTX)		: "continuum"
606ostype	: defined(i860) && defined(_FTX)		: "ftx2"
607ostype	: defined(__hppa) && defined(_FTX)		: "ftx3"
608machtype: defined(i860)					: "i860"
609machtype: defined(__hppa)				: "hppa"
610enddef	:
611
612
613newdef	: defined(sequent) || defined(_SEQUENT_)
614comment	: Sequent Balance (32000 based)
615comment	: Sequent Symmetry running DYNIX/ptx (386/486 based)
616comment	: Sequent Symmetry running DYNIX 3 (386/486 based)
617vendor	:						: "sequent"
618hosttype: defined(M_i386) && defined(sequent)		: "symmetry"
619hosttype: defined(M_i386)				: "ptx"
620hosttype: 						: "balance"
621ostype	: defined(M_i386) && !defined(sequent)		: "ptx"
622ostype	: 						: "dynix3"
623machtype: defined(M_i386)				: "i386"
624machtype: defined(ns32000)				: "ns32000"
625enddef	:
626
627
628newdef	: defined(ns32000)
629comment	: Encore Computer Corp. Multimax (32000 based)
630vendor	:						: "encore"
631hosttype: defined(CMUCS)				: "multimax"
632hosttype: 						: isamultimax(0)
633ostype	: defined(CMUCS)				: "mach"
634ostype	:						: isamultimax(1)
635machtype:						: "ns32000"
636enddef	:
637
638
639newdef	: defined(iconuxv)
640comment	: Icon 88k running Unix
641vendor	:						: "icon"
642hosttype:						: "icon"
643ostype	:						: "iconuxv"
644machtype: defined(m88k) || defined(__m88k__)		: "m88k"
645enddef	:
646
647
648newdef	: defined(_CRAY) && defined(_CRAYCOM)
649comment	: Cray Computer Corp. running CSOS
650vendor	:						: "ccc"
651hosttype: defined(_CRAY2)				: "cray"
652hosttype: defined(_CRAY3)				: "cray"
653hosttype: defined(_CRAY4)				: "cray"
654ostype	:						: "CSOS"
655machtype: defined(_CRAY2)				: "cray2"
656machtype: defined(_CRAY3)				: "cray3"
657machtype: defined(_CRAY4)				: "cray4"
658enddef	:
659
660
661newdef	: defined(cray) && !defined(_CRAYMPP)
662comment	: Cray Research Inc. PVP running UNICOS
663vendor	:						: "cri"
664hosttype:						: getcray()
665ostype	:						: "unicos"
666machtype:						: getcray()
667enddef	:
668
669
670newdef  : defined(cray) && defined(_CRAYT3D)
671comment : Cray Research Inc. running UNICOS MAX
672vendor  :                                               : "cri"
673hosttype:                                               : getcray()
674ostype  :                                               : "unicosmax"
675machtype:                                               : getcray()
676enddef  :
677
678
679newdef	: defined(cray) && defined(_CRAYT3E)
680comment	: Cray Research Inc. running UNICOS/mk
681vendor	:						: "cri"
682hosttype:						: getcray()
683ostype	:						: "unicosmk"
684machtype:						: getcray()
685enddef	:
686
687
688newdef	: defined(convex)
689comment	: Convex
690vendor	: 						: "convex"
691hosttype:						: "convex"
692ostype	:						: "convexos"
693machtype:						: getconvex()
694enddef	:
695
696
697newdef	: defined(butterfly)
698comment	: BBN Butterfly 1000
699vendor	:						: "bbn"
700hosttype:						: "butterfly"
701machtype: defined(mc68020) || defined(__mc68020__)	: "m68k"
702enddef	:
703
704
705newdef	: defined(NeXT)
706comment	: NeXTStep
707vendor	:						: "next"
708hosttype: defined(mc68020) || defined(__mc68020__)	: "next"
709hosttype: defined(M_i386)  || defined(__i386__)		: "intel-pc"
710hosttype: defined(hppa)    || defined(__hppa__)		: "hp"
711hosttype: defined(sparc)   || defined(__sparc__)	: "sun"
712ostype	:						: "nextstep"
713machtype: defined(mc68020) || defined(__mc68020__)	: "m68k"
714machtype: defined(M_i386)  || defined(__i386__)		: "i386"
715machtype: defined(hppa)    || defined(__hppa__)		: "hppa"
716machtype: defined(sparc)   || defined(__sparc__)	: "sparc"
717enddef	:
718
719
720newdef	: defined(__APPLE__)
721comment	: Rhapsody
722vendor	:						: "apple"
723hosttype: defined(__i386__)				: "intel-pc"
724hosttype: defined(__ppc__)				: "macintosh"
725ostype	:						: "rhapsody"
726machtype: defined(__i386__)				: "i386"
727machtype: defined(__ppc__)				: "powerpc"
728enddef	:
729
730
731newdef	: defined(sony_news)
732comment	: Sony NEWS 800 or 1700 workstation
733vendor	:						: "sony"
734hosttype: defined(mips)					: "news_mips"
735hosttype: defined(mc68020) || defined(__mc68020__)	: "news_m68k"
736ostype	:						: "News"
737machtype: defined(mc68020) || defined(__mc68020__)	: "m68k"
738machtype: defined(M_mipsel)				: "mipsel"
739machtype: defined(M_mipseb)				: "mipseb"
740enddef	:
741
742
743newdef	: defined(sgi)
744comment	: Silicon Graphics
745vendor	:						: "sgi"
746hosttype: defined(M_mipsel)				: "iris4d"
747hosttype: defined(M_mipseb)				: "iris4d"
748hosttype: defined(mc68000) 				: "iris3d"
749ostype	:						: "irix"
750machtype: defined(M_mipsel)				: "mipsel"
751machtype: defined(M_mipseb)				: "mipseb"
752machtype: defined(mc68000) 				: "mc68000"
753enddef	:
754
755
756newdef	: defined(ultrix) || defined(__ultrix)
757comment	: Digital's Ultrix 
758vendor	:						: "dec"
759hosttype: defined(M_mipsel)				: "decstation"
760hosttype: defined(M_mipseb)				: "decmips"
761hosttype: defined(vax) || defined(__vax)		: "vax"
762hosttype: defined(__vax__) 				: "vax"
763ostype	:						: "ultrix"
764machtype: defined(M_mipsel)				: "mipsel"
765machtype: defined(M_mipseb)				: "mipseb"
766machtype: defined(vax) || defined (__vax)		: "vax"
767hosttype: defined(__vax__) 				: "vax"
768enddef	:
769
770
771newdef	: defined(MIPS)
772comment	: Mips OS
773vendor	:						: "mips"
774hosttype: defined(M_mipsel) 				: "mips"
775hosttype: defined(M_mipseb)				: "mips"
776ostype	:						: "mips"
777machtype: defined(M_mipsel)				: "mipsel"
778machtype: defined(M_mipseb)				: "mipseb"
779enddef	:
780
781
782newdef	: defined(DECOSF1)
783comment	: Digital's alpha running osf1
784vendor	:						: "dec"
785ostype	:						: "osf1"
786hosttype: defined(__alpha)				: "alpha"
787machtype: defined(__alpha)				: "alpha"
788enddef	:
789
790
791newdef	: defined(Lynx)
792comment	: Lynx OS 2.1
793vendor	:						: "Lynx"
794hosttype: defined(M_mipsel)				: "lynxos-mips"
795hosttype: defined(M_mipseb)				: "lynxos-mips"
796hosttype: defined(M_i386)				: "lynxos-i386"
797hosttype: defined(i860) || defined(__i860__)		: "lynxos-i860"
798hosttype: defined(m68k)					: "lynxos-m68k"
799hosttype: defined(m88k)					: "lynxos-m88k"
800hosttype: defined(sparc)				: "lynxos-sparc"
801hosttype: 						: "lynxos-unknown"
802ostype	:						: "LynxOS"
803machtype: defined(M_mipsel)				: "mipsel"
804machtype: defined(M_mipseb)				: "mipseb"
805machtype: defined(M_i386)				: "i386"
806machtype: defined(i860) || defined(__i860__)		: "i860"
807machtype: defined(m68k)					: "m68k"
808machtype: defined(m88k)					: "m88k"
809machtype: defined(sparc)				: "sparc"
810enddef	:
811
812
813newdef	: defined(masscomp)
814comment	: Masscomp
815vendor	:						: "masscomp"
816hosttype:						: "masscomp"
817ostype	:						: "masscomp"
818enddef	:
819
820newdef	: defined(__MACHTEN__)
821comment	: Machintosh
822vendor	:						: "Tenon"
823hosttype:						: "Macintosh"
824ostype	: 						: "MachTen"
825machtype:						: "Macintosh"
826enddef	:
827
828
829
830newdef	: defined(GOULD_NP1)
831comment	: Gould
832vendor	:						: "gould"
833hosttype:						: "gould_np1"
834machtype:						: "gould"
835enddef	:
836
837
838newdef	: defined(MULTIFLOW)
839comment	: Multiflow running 4.3BSD
840vendor	:						: "multiflow"
841hosttype:						: "multiflow"
842machtype:						: "multiflow"
843ostype	:						: "bsd43"
844enddef	:
845
846
847newdef	: defined(SXA)
848comment	: PFU/Fujitsu A-xx computer
849vendor	:						: "sxa"
850hosttype:						: "pfa50"
851ostype	: defined(_BSDX_)				: "e60-bsdx"
852ostype	: 						: "e60"
853machtype:						: "pfa50"
854enddef	:
855
856
857newdef	: defined(titan)
858comment	: (St)Ardent Titan
859vendor	:						: "ardent"
860hosttype:						: "titan"
861enddef	:
862
863
864newdef	: defined(stellar)
865comment	: Stellar
866vendor	:						: "stellar"
867hosttype:						: "stellar"
868ostype	:						: "stellix"
869enddef	:
870
871
872newdef	: defined(atari)
873comment	: Atari TT running SVR4. This machine was never
874comment	: commercially available.
875vendor	:						: "atari"
876hosttype:						: "atari"
877ostype	:						: "asv"
878enddef	:
879
880
881newdef	: defined(OPUS)
882comment	: ???
883vendor	:						: "opus"
884hosttype:						: "opus"
885enddef	:
886
887
888newdef	: defined(eta10)
889comment	: ETA running SVR3
890vendor	:						: "eta"
891hosttype:						: "eta10"
892enddef	:
893
894
895newdef	: defined(hk68)
896comment	: Heurikon HK68 running Uniplus+ 5.0
897vendor	:						: "heurikon"
898hosttype:						: "hk68"
899ostype	:						: "uniplus"
900enddef	:
901
902
903newdef	: defined(NDIX)
904comment	: Norsk Data ND 500/5000 running Ndix
905vendor	:						: "norsk"
906hosttype:						: "nd500"
907ostype	:						: "ndix"
908enddef	:
909
910
911newdef	: defined(AMIGA)
912comment	: Amiga running AmigaOS+GG
913vendor	:						: "commodore"
914hosttype:						: "amiga"
915ostype	:						: "AmigaOS"
916machtype:						: "m68k"
917enddef	:
918
919
920newdef	: defined(uts)
921comment	: Amdahl running uts 2.1
922vendor	: 						: "amdahl"
923hosttype:						: "amdahl"
924ostype	:						: "uts"
925machtype:						: "amdahl"
926enddef	:
927
928
929newdef	: defined(UTek)
930comment	: Tektronix 4300 running UTek (BSD 4.2 / 68020 based)
931vendor	:						: "tektronix"
932hosttype: 						: "tek4300"
933enddef	:
934
935
936newdef	: defined(UTekV)
937comment	: Tektronix XD88/10 running UTekV 3.2e (SVR3/88100 based)
938vendor	:						: "tektronix"
939hosttype: 						: "tekXD88"
940enddef	:
941
942
943newdef	: defined(__DGUX__)
944comment	: Data-General AViiON running DGUX
945hosttype:						: "aviion"
946ostype	:						: "dgux"
947vendor	:						: "dg"
948machtype: defined(__m88k__)				: "m88k"
949machtype: defined(__i386__)				: "pentium"
950enddef	:
951
952
953newdef	: defined(sysV68)
954comment	: Motorola MPC running System V/68 R32V2 (SVR3/68020 based)
955vendor	:						: "motorola"
956hosttype: 						: "sysV68"
957machtype:						: "m68k"
958enddef	:
959
960
961newdef	: defined(supermax)
962comment	: DDE Supermax running System V/68 R3 (SVR3/68020 based)
963vendor	:						: "supermax"
964hosttype: 						: "supermax"
965machtype:						: "m68k"
966enddef	:
967
968
969newdef	: defined(sysV88)
970comment	: Motorola MPC running System V/88 R32V2 (SVR3/88100 based)
971vendor	:						: "motorola"
972hosttype: 						: "sysV88"
973machtype:						: "m88k"
974enddef	:
975
976
977newdef	: defined(__clipper__)
978comment	: Clipper Chipset (Intergraph)
979vendor	:						: "intergraph"
980hosttype:						: "clipper"
981machtype:						: "clipper"
982enddef	:
983
984
985newdef	: defined(SNI) || defined(sinix)
986comment	: Siemens Nixdorf Informationssysteme SINIX
987vendor	:						: "sni"
988hosttype: defined(M_intel)				: "wx200i"
989hosttype: defined(MIPSEB)				: "rm400"
990ostype	: defined(sinix)				: "sinix"
991machtype: defined(M_i586)				: "i586"
992machtype: defined(M_i486)				: "i486"
993machtype: defined(M_i386)				: "i386"
994machtype: defined(M_mipsel)				: "mipsel"
995machtype: defined(M_mipseb)				: "mipseb"
996machtype:						: "mips"
997enddef	:
998
999newdef	: defined(_OSD_POSIX)
1000comment	: Siemens Nixdorf Informationssysteme BS2000 POSIX (mainframe, EBCDIC)
1001vendor	:						: "sni"
1002hosttype: defined(M_intel)				: "bs2000"
1003ostype	: 						: "posix"
1004machtype:						: "bs2000"
1005enddef	:
1006
1007newdef	: defined(__MVS__)
1008comment	: ibm uss s/390 (mainframe, EBCDIC)
1009vendor	:						: "ibm"
1010hosttype:					 	: "s390"
1011ostype	: 						: "os390"
1012machtype:						: "s390"
1013enddef	:
1014
1015newdef	: defined(_SX)
1016comment : NEC Corporation (SX-4)
1017vendor	: 						: "nec"
1018ostype	:						: "superux"
1019hosttype:						: "sx4"
1020machtype:						: "sx4"
1021enddef	:
1022
1023newdef  : !defined(SOLARIS2) && (SYSVREL == 4)
1024comment : Unix System V Release 4.0
1025vendor  : defined(DELL)					: "dell"
1026hosttype: defined(M_i386)				: "i386"
1027ostype  :						: "svr4"
1028machtype: defined(M_i386)				: "i386"
1029enddef	:
1030
1031newdef	: defined(__uxp__) || defined(__uxps__)
1032comment	: FUJITSU DS/90 7000
1033vendor	:						: "fujitsu"
1034hosttype:						: "ds90"
1035ostype	:						: "sysv4"
1036machtype:						: "sparc"
1037enddef	:
1038
1039newdef  : defined(_UWIN)
1040comment : AT&T Research Unix for Windows
1041vendor  :               				: "att"
1042hosttype:                       			: "win32.i386"
1043machtype:                       			: "i386"
1044enddef	:
1045
1046
1047newdef	: defined(mc68000) || defined(__mc68000__) || defined(mc68k32) || defined(m68k) || defined(mc68010) || defined(mc68020)
1048hosttype:						: "m68k"
1049vendor	: defined(m68k)					: "motorola"
1050machtype:						: "m68k"
1051enddef	:
1052
1053
1054newdef	: defined(m88k) || defined(__m88k__)
1055hosttype:						: "m88k"
1056machtype:						: "m88k"
1057enddef	:
1058
1059
1060newdef	: defined(M_intel)
1061hosttype: defined(M_i586)				: "i586"
1062hosttype: defined(M_i486)				: "i486"
1063hosttype: defined(M_i386)				: "i386"
1064vendor	: 						: "intel"
1065machtype: defined(M_i586)				: "i586"
1066machtype: defined(M_i486)				: "i486"
1067machtype: defined(M_i386)				: "i386"
1068enddef	:
1069
1070
1071newdef	: defined(sparc) || defined(__sparc__)
1072hosttype:						: "sparc"
1073machtype:						: "sparc"
1074enddef	:
1075
1076
1077newdef	: defined(i860) || defined(__i860__)
1078hosttype:						: "i860"
1079machtype:						: "i860"
1080enddef	:
1081
1082
1083newdef	: defined(osf1)
1084ostype	:						: "osf1"
1085enddef	:
1086
1087
1088newdef	: SYSVREL == 0
1089ostype	: defined(BSD4_4)				: "bsd44"
1090ostype	: defined(BSD)					: "bsd"
1091ostype	: defined(POSIX)				: "posix"
1092enddef	:
1093
1094
1095newdef	: SYSVREL == 1
1096ostype	: 						: "svr1"
1097enddef	:
1098
1099
1100newdef	: SYSVREL == 2
1101ostype	: 						: "svr2"
1102enddef	:
1103
1104
1105newdef	: SYSVREL == 3
1106ostype	: 						: "svr3"
1107enddef	:
1108
1109
1110newdef	: SYSVREL == 4
1111ostype	: 						: "svr4"
1112enddef	:
1113
1114
1115newcode	:
1116#ifndef _hosttype_
1117    hosttype = "unknown";
1118#endif
1119#ifndef _ostype_
1120    ostype = "unknown";
1121#endif
1122#ifndef _vendor_
1123    vendor = "unknown";
1124#endif
1125#ifndef _machtype_
1126    machtype = "unknown";
1127#endif
1128    tsetenv(STRHOSTTYPE, str2short(hosttype));
1129    tsetenv(STRVENDOR,   str2short(vendor));
1130    tsetenv(STROSTYPE,   str2short(ostype));
1131    tsetenv(STRMACHTYPE, str2short(machtype));
1132} /* end setmachine */
1133endcode	:
1134