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