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