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