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