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