3 * host.defs: Hosttype/Machtype etc.
6 * Copyright (c) 1980, 1991 The Regents of the University of California.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 macro : M_mips64el : (defined(mips64) && defined(MIPSEL))
38 macro : M_mips64eb : (defined(mips64) && defined(MIPSEB))
39 macro : M_mipsel : (!defined(M_mips64el) && defined(mips) && defined(MIPSEL))
40 macro : M_mipseb : (!defined(M_mips64eb) && defined(mips) && defined(MIPSEB))
41 macro : M_amd64: (defined(amd64) || defined(x86_64))
42 macro : M_i386 : defined(i386)
43 macro : M_i486 : defined(i486)
44 macro : M_i586 : defined(i586)
45 macro : M_i686 : defined(i686)
46 macro : M_intel : (defined(M_i386) || defined(M_i486) || defined(M_i586))
48 newdef : defined(ns32000)
53 if (access("/Umax.image", F_OK) == 0)
56 return flag ? "mach" : "ns32000";
62 newdef : defined(cray)
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
68 # include <sys/target.h>
72 /* From: hpa@hook.eecs.nwu.edu (H. Peter Anvin) */
76 # ifdef MC_GET_SYSTEM /* If we have target() */
79 if (target(MC_GET_SYSTEM, &data) != -1) {
80 static char hosttype_buf[sizeof(data.mc_pmt)+1];
81 unsigned char *p = (unsigned char *) &(data.mc_pmt);
82 char *q = hosttype_buf;
86 * Copy to buffer and convert to lower case
87 * String may not be null-terminated, so keep a counter
89 for (n = 0; *p && n < sizeof(data.mc_pmt); n++)
94 /* replace dashes with underscores if present */
95 while ((q = strchr(hosttype_buf, '-')) != NULL)
97 return hosttype_buf; /* Return in static buffer */
100 # endif /* MC_GET_SYSTEM */
101 return "cray"; /* target() failed */
107 newdef : defined(convex)
110 * On convex, find the current machine type via the getsysinfo() syscall
112 #include <sys/sysinfo.h>
114 /* From: fox@convex.com (David DeSimone) */
118 struct system_information sysinfo;
119 static char result[8];
121 if (getsysinfo(SYSINFO_SIZE, &sysinfo) == -1)
124 switch(sysinfo.cpu_type) {
135 #ifdef SI_CPUTYPE_C2MP
136 case SI_CPUTYPE_C2MP:
137 (void) strcpy(result, "c2X0");
138 result[2] = sysinfo.cpu_count + '0';
142 #ifdef SI_CPUTYPE_C34
144 (void) strcpy(result, "c34X0");
145 result[3] = sysinfo.cpu_count + '0';
149 #ifdef SI_CPUTYPE_C38
151 (void) strcpy(result, "c38X0");
152 result[3] = sysinfo.cpu_count + '0';
156 #ifdef SI_CPUTYPE_C46
158 (void) strcpy(result, "c46X0");
159 result[3] = sysinfo.cpu_count + '0';
170 newdef : defined(linux) || defined(CYGWIN) || defined(GNU) || defined(GLIBC)
173 #include <sys/utsname.h>
174 static char mach[256];
175 static char host[256];
176 static char ostype[32];
177 static void populate(void)
181 const char *p = short2str(tgetenv(STROSTYPE));
183 #if defined(__ANDROID__)
185 #elif defined(__CYGWIN__)
191 xsnprintf(ostype, sizeof(ostype), "%s", p);
192 xsnprintf(mach, sizeof(mach), "%s", e != -1 ? uts.machine : "unknown");
193 xsnprintf(host, sizeof(host), "%s-%s",
194 e != -1 ? uts.machine : "unknown", ostype);
228 const char *hosttype;
231 const char *machtype;
236 newdef : defined(HOSTTYPE)
241 newdef : defined(PARAGON)
242 comment : Intel Paragon running OSF/1
244 hosttype: : "paragon"
246 machtype: defined(M_i386) : "i386"
250 newdef : defined(AMIX)
251 comment : Amiga running Amix 2.02
252 vendor : : "commodore"
259 newdef : defined(accel)
260 comment : celerity Accel
261 vendor : : "celerity"
262 hosttype: : "celerityACCEL"
268 newdef : defined(_VMS_POSIX)
269 comment : digital vax or alpha running vms posix
271 hosttype: : "VMS-POSIX"
273 machtype: defined(alpha) : "alpha"
274 machtype: defined(vax) : "vax"
278 newdef : defined(hp_osf)
279 comment : Hewlett Packard running OSF/1
281 hosttype: defined(pa_risc) : "hp9000s700-osf1"
282 hosttype: : "hp-osf1"
284 machtype: defined(pa_risc) : "pa_risc"
288 newdef : defined(hp9000)
289 comment : Hewlett Packard running MORE/bsd
291 hosttype: defined(hp300) : "hp300"
292 hosttype: defined(hp800) : "hp800"
294 ostype : defined(BSD4_4) : "bsd44"
296 machtype: defined(hp300) : "m68k"
297 machtype: defined(hp800) : "pa_risc"
301 newdef : defined(hpux)
302 comment : Hewlett Packard running HP/UX
304 hosttype: defined(hp9000s800) : "hp9000s800"
305 hosttype: defined(hp9000s700) : "hp9000s700"
306 hosttype: defined(hp9000s500) : "hp9000s500"
307 hosttype: defined(hp9000s300) : "hp9000s300"
310 machtype: defined(hp9000s800) : "pa_risc"
311 machtype: defined(hp9000s700) : "pa_risc"
312 machtype: defined(hp9000s500) : "m68k"
313 machtype: defined(hp9000s300) : "m68k"
317 newdef : defined(apollo)
318 comment : Hewlett Packard apollo running Domain/OS
321 ostype : : "DomainOS"
326 newdef : defined(sun)
327 comment : Sun Microsystems series 2 workstation (68010 based)
328 comment : Sun Microsystems series 3 workstation (68020 based)
329 comment : Sun Microsystems 386i workstation (386 based)
330 comment : Sun Microsystems series 4 workstation (SPARC based)
332 hosttype: defined(M_i386) && !defined(SVR4) : "sun386i"
333 hosttype: defined(M_i386) && defined(SVR4) : "i86pc"
334 hosttype: defined(M_amd64) : "i86pc"
335 hosttype: defined(mc68010) : "sun2"
336 hosttype: defined(mc68020) : "sun3"
337 hosttype: defined(sparc) : "sun4"
339 ostype : defined(SUNOS3) : "sunos3"
340 ostype : defined(SUNOS4) : "sunos4"
341 ostype : defined(SOLARIS2) : "solaris"
342 machtype: defined(mc68010) : "m68k"
343 machtype: defined(mc68020) : "m68k"
344 machtype: defined(sparcv9) : "sparcv9"
345 machtype: defined(sparc) : "sparc"
346 machtype: defined(M_i386) : "i386"
347 machtype: defined(M_amd64) : "amd64"
351 newdef : defined(pyr)
352 comment : Pyramid Technology
354 hosttype: : "pyramid"
355 machtype: : "pyramid"
359 newdef : defined(hcx) || defined(_CX_UX)
360 comment : Harris Tahoe running CX/UX
368 newdef : defined(tahoe)
369 comment : Harris Tahoe
376 newdef : defined(ibm032)
377 comment : RT running IBM AOS4.3 or MACH
380 ostype : defined(MACH) : "mach"
386 newdef : defined(aiws)
387 comment : RT running IBM aix2.x
395 newdef : defined(_AIX370)
396 comment : IBM/370 running aix
404 newdef : defined(_IBMESA)
405 comment : IBM/ESA running aix
413 newdef : defined(_IBMR2)
414 comment : IBM/RS6000 running aix
422 newdef : defined(_AIXPS2)
423 comment : IBM/PS2 running aix
431 newdef : defined(OREO)
432 comment : Macintosh running AU/X
436 machtype: defined(mc68020) : "m68k"
440 newdef : defined(u3b20d)
441 comment : AT&T 3B/20 series running SVR2/3
443 hosttype: : "att3b20"
448 newdef : defined(u3b15)
449 comment : AT&T 3B/15 series running SVR2/3
451 hosttype: : "att3b15"
456 newdef : defined(u3b5)
457 comment : AT&T 3B/5 series running SVR2/3
464 newdef : defined(u3b2)
465 comment : AT&T 3B/2 series running SVR2/3
472 newdef : defined(UNIXPC)
473 comment : AT&T UnixPC att3b1/att7300
476 machtype: defined(u3b1) : "u3b1"
477 machtype: defined(att7300) : "att7300"
481 newdef : defined(_MINIX)
482 comment : Andy Tanenbaum's minix
483 vendor : defined(M_i386) : "intel"
484 hosttype: defined(M_i386) : "minix386"
487 machtype: defined(M_i386) : "i386"
491 newdef : defined(gnu_hurd)
493 vendor : defined(M_intel) : "intel"
494 hosttype: defined(M_i686) : "i686"
495 hosttype: defined(M_i586) : "i586"
496 hosttype: defined(M_i486) : "i486"
497 hosttype: defined(M_i386) : "i386"
499 machtype: defined(M_i686) : "i686-pc-gnu"
500 machtype: defined(M_i586) : "i586-pc-gnu"
501 machtype: defined(M_i486) : "i486-pc-gnu"
502 machtype: defined(M_i386) : "i386-pc-gnu"
506 newdef : defined(linux) || defined(GNU) || defined(GLIBC)
507 comment : Linus Torvalds's linux
508 vendor : defined(M_intel) : "intel"
509 hosttype: : gethost()
510 ostype : : getostype()
511 machtype: : getmach()
512 vendor : defined(ANDROID) : "linux"
513 vendor : defined(alpha) : "dec"
514 vendor : defined(PPC) : "apple"
518 newdef : defined(EMX)
519 comment : OS/2 EMX [unix emulation under OS/2]
520 vendor : defined(M_intel) : "intel"
521 hosttype: defined(M_i386) : "i386-emx"
523 machtype: defined(M_i386) : "i386"
527 newdef : defined(NetBSD)
529 vendor : defined(algor) : "algoritmics"
530 vendor : defined(arm32) || defined(arm) : "acorn"
531 vendor : defined(alpha) : "digital"
532 vendor : defined(amiga) : "commodore"
533 vendor : defined(atari) : "atari"
534 vendor : defined(hp300) : "hp"
535 vendor : defined(M_intel) : "intel"
536 vendor : defined(m68k) : "motorola"
537 vendor : defined(mac68k) : "apple"
538 vendor : defined(pc532) : "national-semi"
539 vendor : defined(pmax) : "dec"
540 vendor : defined(powerpc) : "motorola"
541 vendor : defined(mips) : "mips"
542 vendor : defined(sparc) : "sun"
543 vendor : defined(sparc64) : "sun"
544 vendor : defined(sun3) : "sun"
545 vendor : defined(vax) : "digital"
546 vendor : defined(M_amd64) : "amd"
549 machtype: defined(alpha) : "alpha"
550 machtype: defined(algor) : "algor"
551 machtype: defined(arm32) || defined(APCS_32) : "arm32"
552 machtype: defined(arm26) || defined(APCS_26) : "arm26"
553 machtype: defined(arm) : "arm"
554 machtype: defined(sparc) : "sparc"
555 machtype: defined(sparc64) : "sparc64"
556 machtype: defined(mc68020) : "m68k"
557 machtype: defined(M_i386) : "i386"
558 machtype: defined(M_mipsel) : "mipsel"
559 machtype: defined(M_mipseb) : "mipseb"
560 machtype: defined(mips) : "mips"
561 machtype: defined(pc532) : "pc532"
562 machtype: defined(powerpc) : "powerpc"
563 machtype: defined(vax) : "vax"
564 machtype: defined(M_amd64) : "x86_64"
567 newdef : defined(OpenBSD)
569 vendor : defined(alpha) : "digital"
570 vendor : defined(M_amd64) : "amd"
571 vendor : defined(arm) : "arm"
572 vendor : defined(hppa) || defined(hppa64) : "hp"
573 vendor : defined(M_intel) : "intel"
574 vendor : defined(m68k) : "motorola"
575 vendor : defined(m88k) : "motorola"
576 vendor : defined(mips) && defined(sgi) : "sgi"
577 vendor : defined(powerpc) : "motorola"
578 vendor : defined(sh) : "io-data"
579 vendor : defined(sparc) || defined(sparc64) : "sun"
580 vendor : defined(vax) : "digital"
581 hosttype: : "OpenBSD"
583 machtype: defined(alpha) : "alpha"
584 machtype: defined(M_amd64) : "amd64"
585 machtype: defined(arm) : "arm"
586 machtype: defined(hppa) : "hppa"
587 machtype: defined(hppa64) : "hppa64"
588 machtype: defined(M_i386) : "i386"
589 machtype: defined(m68k) : "m68k"
590 machtype: defined(m88k) : "m88k"
591 machtype: defined(mips) : "mips"
592 machtype: defined(sh) : "sh"
593 machtype: defined(sparc64) : "sparc64"
594 machtype: defined(sparc) : "sparc"
595 machtype: defined(powerpc) : "powerpc"
596 machtype: defined(vax) : "vax"
600 newdef : defined(FreeBSD)
602 vendor : defined(alpha) : "digital"
603 vendor : defined(arm32) || defined(arm) : "acorn"
604 vendor : defined(M_intel) : "intel"
605 vendor : defined(ia64) : "intel"
606 vendor : defined(mips) : "mips"
607 vendor : defined(powerpc) : "motorola"
608 vendor : defined(sparc) : "sun"
609 vendor : defined(sparc64) : "sun"
610 vendor : defined(M_amd64) : "amd"
611 hosttype: : "FreeBSD"
613 machtype: defined(alpha) : "alpha"
614 machtype: defined(arm32) || defined(APCS_32) : "arm32"
615 machtype: defined(arm) : "arm"
616 machtype: defined(ia64) : "ia64"
617 machtype: defined(M_i386) : "i386"
618 machtype: defined(mips) : "mips"
619 machtype: defined(powerpc) : "powerpc"
620 machtype: defined(sparc) : "sparc"
621 machtype: defined(sparc64) : "sparc64"
622 machtype: defined(M_amd64) : "x86_64"
626 newdef : defined(MidnightBSD)
627 comment : MidnightBSD
628 vendor : defined(M_intel) : "intel"
629 hosttype: : "MidnightBSD"
630 ostype : : "MidnightBSD"
631 machtype: defined(M_i386) : "i386"
635 newdef : defined(__386BSD__)
636 comment : Bill Jolitz's 386BSD
637 vendor : defined(M_intel) : "intel"
644 newdef : defined(bsdi)
645 comment : BSDI's unix
646 vendor : defined(M_intel) : "intel"
647 vendor : defined(sparc) : "sun"
648 vendor : defined(powerpc) : "motorola"
649 hosttype: defined(M_intel) : "bsd386"
650 hosttype: defined(sparc) : "bsd-sparc"
651 hosttype: defined(powerpc) : "bsd-powerpc"
653 machtype: defined(M_i386) : "i386"
654 machtype: defined(sparc) : "sparc"
655 machtype: defined(powerpc) : "powerpc"
659 newdef : defined(COHERENT)
660 comment : COHERENT's unix
661 vendor : defined(_I386) : "intel"
663 hosttype: : "coherent"
664 ostype : : "coherent"
665 machtype: defined(_I386) : "i386"
668 newdef : defined(concurrent)
669 comment : Concurrent PowerHawk
670 vendor : : "concurrent"
671 hosttype: : "powerhawk"
672 ostype : : "powermax_os"
673 machtype: : "powerhawk"
676 newdef : defined(SCO)
677 comment : SCO UNIX System V/386 Release 3.2
680 ostype : : "sco_unix"
684 newdef : defined(M_XENIX) && !defined(M_UNIX)
687 hosttype: : "sco_xenix"
688 ostype : : "sco_xenix"
689 machtype: defined(M_I386) : "i386"
690 machtype: defined(M_I286) : "i286"
694 newdef : defined(ISC) || defined(ISC202)
695 comment : Interactive Unix
698 ostype : defined(POSIX) : "POSIX"
700 machtype: defined(M_i386) : "i386"
704 newdef : defined(INTEL)
707 hosttype: : "intel386"
708 ostype : : "intel_unix"
709 machtype: defined(M_i386) : "i386"
713 newdef : defined(MACH)
716 hosttype: defined(M_i386) : "i386-mach"
718 machtype: defined(M_i386) : "i386"
722 newdef : defined(alliant)
723 comment : Alliants FSX
725 hosttype: defined(mc68000) : "alliant-fx80"
726 hosttype: defined(i860) : "alliant-fx2800"
727 hosttype: : "alliant"
729 machtype: defined(mc68000) : "mc68000"
730 machtype: defined(i860) : "i860"
734 newdef : defined(_FTX)
735 comment : Stratus Computer, Inc FTX2 (i860 based)
736 comment : Stratus Computer, Inc FTX3 (HPPA based)
738 hosttype: defined(i860) && defined(_FTX) : "atlantic"
739 hosttype: defined(hppa) && defined(_FTX) : "continuum"
740 ostype : defined(i860) && defined(_FTX) : "ftx2"
741 ostype : defined(hppa) && defined(_FTX) : "ftx3"
742 machtype: defined(i860) : "i860"
743 machtype: defined(hppa) : "hppa"
747 newdef : defined(sequent) || defined(_SEQUENT_)
748 comment : Sequent Balance (32000 based)
749 comment : Sequent Symmetry running DYNIX/ptx (386/486 based)
750 comment : Sequent Symmetry running DYNIX 3 (386/486 based)
752 hosttype: defined(M_i386) && defined(sequent) : "symmetry"
753 hosttype: defined(M_i386) : "ptx"
754 hosttype: : "balance"
755 ostype : defined(M_i386) && !defined(sequent) : "ptx"
757 machtype: defined(M_i386) : "i386"
758 machtype: defined(ns32000) : "ns32000"
762 newdef : defined(ns32000)
763 comment : Encore Computer Corp. Multimax (32000 based)
765 hosttype: defined(CMUCS) : "multimax"
766 hosttype: : isamultimax(0)
767 ostype : defined(CMUCS) : "mach"
768 ostype : : isamultimax(1)
769 machtype: : "ns32000"
773 newdef : defined(iconuxv)
774 comment : Icon 88k running Unix
778 machtype: defined(m88k) : "m88k"
782 newdef : defined(_CRAY) && defined(_CRAYCOM)
783 comment : Cray Computer Corp. running CSOS
785 hosttype: defined(_CRAY2) : "cray"
786 hosttype: defined(_CRAY3) : "cray"
787 hosttype: defined(_CRAY4) : "cray"
789 machtype: defined(_CRAY2) : "cray2"
790 machtype: defined(_CRAY3) : "cray3"
791 machtype: defined(_CRAY4) : "cray4"
795 newdef : defined(cray) && !defined(_CRAYMPP)
796 comment : Cray Research Inc. PVP running UNICOS
798 hosttype: : getcray()
800 machtype: : getcray()
804 newdef : defined(cray) && defined(_CRAYT3D)
805 comment : Cray Research Inc. running UNICOS MAX
807 hosttype: : getcray()
808 ostype : : "unicosmax"
809 machtype: : getcray()
813 newdef : defined(cray) && defined(_CRAYT3E)
814 comment : Cray Research Inc. running UNICOS/mk
816 hosttype: : getcray()
817 ostype : : "unicosmk"
818 machtype: : getcray()
822 newdef : defined(convex)
826 ostype : : "convexos"
827 machtype: : getconvex()
831 newdef : defined(butterfly)
832 comment : BBN Butterfly 1000
834 hosttype: : "butterfly"
835 machtype: defined(mc68020) : "m68k"
839 newdef : defined(NeXT)
842 hosttype: defined(mc68020) : "next"
843 hosttype: defined(M_i386) : "intel-pc"
844 hosttype: defined(hppa) : "hp"
845 hosttype: defined(sparc) : "sun"
846 ostype : : "nextstep"
847 machtype: defined(mc68020) : "m68k"
848 machtype: defined(M_i386) : "i386"
849 machtype: defined(hppa) : "hppa"
850 machtype: defined(sparc) : "sparc"
854 newdef : defined(APPLE) && defined(MACH)
857 hosttype: defined(i386) : "intel-mac"
858 hosttype: defined(ppc) : "powermac"
859 hosttype: defined(M_amd64) : "intel-mac"
861 machtype: defined(i386) : "i386"
862 machtype: defined(M_amd64) : "x86_64"
863 machtype: defined(ppc) : "powerpc"
867 newdef : defined(sony_news)
868 comment : Sony NEWS 800 or 1700 workstation
870 hosttype: defined(mips) : "news_mips"
871 hosttype: defined(mc68020) : "news_m68k"
873 machtype: defined(mc68020) : "m68k"
874 machtype: defined(M_mipsel) : "mipsel"
875 machtype: defined(M_mipseb) : "mipseb"
879 newdef : defined(sgi)
880 comment : Silicon Graphics
882 hosttype: defined(M_mipsel) : "iris4d"
883 hosttype: defined(M_mipseb) : "iris4d"
884 hosttype: defined(mc68000) : "iris3d"
886 machtype: defined(M_mipsel) : "mipsel"
887 machtype: defined(M_mipseb) : "mipseb"
888 machtype: defined(mc68000) : "mc68000"
892 newdef : defined(ultrix)
893 comment : Digital's Ultrix
895 hosttype: defined(M_mipsel) : "decstation"
896 hosttype: defined(M_mipseb) : "decmips"
897 hosttype: defined(vax) : "vax"
899 machtype: defined(M_mipsel) : "mipsel"
900 machtype: defined(M_mipseb) : "mipseb"
901 machtype: defined(vax) : "vax"
905 newdef : defined(MIPS)
908 hosttype: defined(M_mipsel) : "mips"
909 hosttype: defined(M_mipseb) : "mips"
911 machtype: defined(M_mipsel) : "mipsel"
912 machtype: defined(M_mipseb) : "mipseb"
916 newdef : defined(DECOSF1)
917 comment : Digital's alpha running osf1
920 hosttype: defined(alpha) : "alpha"
921 machtype: defined(alpha) : "alpha"
925 newdef : defined(Lynx)
926 comment : Lynx OS 2.1
928 hosttype: defined(M_mipsel) : "lynxos-mips"
929 hosttype: defined(M_mipseb) : "lynxos-mips"
930 hosttype: defined(M_i386) : "lynxos-i386"
931 hosttype: defined(i860) : "lynxos-i860"
932 hosttype: defined(m68k) : "lynxos-m68k"
933 hosttype: defined(m88k) : "lynxos-m88k"
934 hosttype: defined(sparc) : "lynxos-sparc"
935 hosttype: : "lynxos-unknown"
937 machtype: defined(M_mipsel) : "mipsel"
938 machtype: defined(M_mipseb) : "mipseb"
939 machtype: defined(M_i386) : "i386"
940 machtype: defined(i860) : "i860"
941 machtype: defined(m68k) : "m68k"
942 machtype: defined(m88k) : "m88k"
943 machtype: defined(sparc) : "sparc"
947 newdef : defined(masscomp)
949 vendor : : "masscomp"
950 hosttype: : "masscomp"
951 ostype : : "masscomp"
954 newdef : defined(MACHTEN)
957 hosttype: : "Macintosh"
959 machtype: : "Macintosh"
964 newdef : defined(GOULD_NP1)
967 hosttype: : "gould_np1"
972 newdef : defined(MULTIFLOW)
973 comment : Multiflow running 4.3BSD
974 vendor : : "multiflow"
975 hosttype: : "multiflow"
976 machtype: : "multiflow"
981 newdef : defined(SXA)
982 comment : PFU/Fujitsu A-xx computer
985 ostype : defined(_BSDX_) : "e60-bsdx"
991 newdef : defined(titan)
992 comment : (St)Ardent Titan
998 newdef : defined(stellar)
1000 vendor : : "stellar"
1001 hosttype: : "stellar"
1002 ostype : : "stellix"
1006 newdef : defined(atari)
1007 comment : Atari TT running SVR4. This machine was never
1008 comment : commercially available.
1015 newdef : defined(OPUS)
1022 newdef : defined(eta10)
1023 comment : ETA running SVR3
1029 newdef : defined(hk68)
1030 comment : Heurikon HK68 running Uniplus+ 5.0
1031 vendor : : "heurikon"
1033 ostype : : "uniplus"
1037 newdef : defined(NDIX)
1038 comment : Norsk Data ND 500/5000 running Ndix
1045 newdef : defined(AMIGA)
1046 comment : Amiga running AmigaOS+GG
1047 vendor : : "commodore"
1049 ostype : : "AmigaOS"
1054 newdef : defined(uts)
1055 comment : Amdahl running uts 2.1
1057 hosttype: : "amdahl"
1059 machtype: : "amdahl"
1063 newdef : defined(UTek)
1064 comment : Tektronix 4300 running UTek (BSD 4.2 / 68020 based)
1065 vendor : : "tektronix"
1066 hosttype: : "tek4300"
1070 newdef : defined(UTekV)
1071 comment : Tektronix XD88/10 running UTekV 3.2e (SVR3/88100 based)
1072 vendor : : "tektronix"
1073 hosttype: : "tekXD88"
1077 newdef : defined(DGUX)
1078 comment : Data-General AViiON running DGUX
1079 hosttype: : "aviion"
1082 machtype: defined(m88k) : "m88k"
1083 machtype: defined(i386) : "pentium"
1087 newdef : defined(sysV68)
1088 comment : Motorola MPC running System V/68 R32V2 (SVR3/68020 based)
1089 vendor : : "motorola"
1090 hosttype: : "sysV68"
1095 newdef : defined(supermax)
1096 comment : DDE Supermax running System V/68 R3 (SVR3/68020 based)
1097 vendor : : "supermax"
1098 hosttype: : "supermax"
1103 newdef : defined(sysV88)
1104 comment : Motorola MPC running System V/88 R32V2 (SVR3/88100 based)
1105 vendor : : "motorola"
1106 hosttype: : "sysV88"
1111 newdef : defined(clipper)
1112 comment : Clipper Chipset (Intergraph)
1113 vendor : : "intergraph"
1114 hosttype: : "clipper"
1115 machtype: : "clipper"
1118 newdef : defined(QNX)
1122 newdef : (defined(SNI) || defined(sinix)) && !defined(_OSD_POSIX)
1123 comment : Fujitsu Siemens Computers (former "Siemens Nixdorf Informationssysteme"): SINIX aka. ReliantUNIX, a SVR4 derivative
1125 hosttype: defined(M_intel) : "wx200i"
1126 hosttype: defined(MIPSEB) : "rm400"
1127 ostype : defined(sinix) : "sinix"
1128 machtype: defined(M_i586) : "i586"
1129 machtype: defined(M_i486) : "i486"
1130 machtype: defined(M_i386) : "i386"
1131 machtype: defined(M_mipsel) : "mipsel"
1132 machtype: defined(M_mipseb) : "mipseb"
1136 newdef : defined(_OSD_POSIX)
1137 comment : Fujitsu Siemens Computers (former "Siemens Nixdorf Informationssysteme"): BS2000 POSIX (mainframe, EBCDIC)
1139 hosttype: : "bs2000"
1140 ostype : : "osdposix"
1141 machtype: #machine(7500) : "s390"
1142 machtype: #machine(mips) : "mips"
1143 machtype: #machine(sparc) : "sparc"
1144 machtype: : "bs2000"
1147 newdef : defined(MVS)
1148 comment : ibm uss s/390 (mainframe, EBCDIC)
1155 newdef : defined(_SX)
1156 comment : NEC Corporation (SX-4)
1158 ostype : : "superux"
1163 newdef : !defined(SOLARIS2) && (SYSVREL == 4)
1164 comment : Unix System V Release 4.0
1165 vendor : defined(DELL) : "dell"
1166 hosttype: defined(M_i386) : "i386"
1168 machtype: defined(M_i386) : "i386"
1171 newdef : defined(uxp) || defined(uxps)
1172 comment : FUJITSU DS/90 7000
1173 vendor : : "fujitsu"
1179 newdef : defined(CYGWIN)
1181 vendor : defined(M_intel) : "intel"
1182 hosttype: : gethost()
1183 ostype : : getostype()
1184 machtype: : getmach()
1187 newdef : defined(_UWIN)
1188 comment : AT&T Research Unix for Windows
1190 hosttype: : "win32.i386"
1195 newdef : defined(mc68000) || defined(mc68k32) || defined(m68k) || defined(mc68010) || defined(mc68020)
1197 vendor : defined(m68k) : "motorola"
1202 newdef : defined(m88k)
1208 newdef : defined(M_intel)
1209 hosttype: defined(M_i586) : "i586"
1210 hosttype: defined(M_i486) : "i486"
1211 hosttype: defined(M_i386) : "i386"
1213 machtype: defined(M_i586) : "i586"
1214 machtype: defined(M_i486) : "i486"
1215 machtype: defined(M_i386) : "i386"
1219 newdef : defined(sparc)
1225 newdef : defined(i860)
1231 newdef : defined(osf1)
1236 newdef : SYSVREL == 0
1237 ostype : defined(BSD4_4) : "bsd44"
1238 ostype : defined(BSD) : "bsd"
1239 ostype : defined(POSIX) : "posix"
1243 newdef : SYSVREL == 1
1248 newdef : SYSVREL == 2
1253 newdef : SYSVREL == 3
1258 newdef : SYSVREL == 4
1265 hosttype = "unknown";
1274 machtype = "unknown";
1276 tsetenv(STRHOSTTYPE, str2short(hosttype));
1277 tsetenv(STRVENDOR, str2short(vendor));
1278 tsetenv(STROSTYPE, str2short(ostype));
1279 tsetenv(STRMACHTYPE, str2short(machtype));
1280 } /* end setmachine */