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(__x86_64__) : "intel-mac" 755hosttype: defined(__i386__) : "intel-mac" 756hosttype: defined(__ppc__) : "powermac" 757ostype : : "darwin" 758machtype: defined(__x86_64__) : "x86_64" 759machtype: defined(__i386__) : "i386" 760machtype: defined(__ppc__) : "powerpc" 761enddef : 762 763 764newdef : defined(sony_news) 765comment : Sony NEWS 800 or 1700 workstation 766vendor : : "sony" 767hosttype: defined(mips) : "news_mips" 768hosttype: defined(mc68020) || defined(__mc68020__) : "news_m68k" 769ostype : : "News" 770machtype: defined(mc68020) || defined(__mc68020__) : "m68k" 771machtype: defined(M_mipsel) : "mipsel" 772machtype: defined(M_mipseb) : "mipseb" 773enddef : 774 775 776newdef : defined(sgi) 777comment : Silicon Graphics 778vendor : : "sgi" 779hosttype: defined(M_mipsel) : "iris4d" 780hosttype: defined(M_mipseb) : "iris4d" 781hosttype: defined(mc68000) : "iris3d" 782ostype : : "irix" 783machtype: defined(M_mipsel) : "mipsel" 784machtype: defined(M_mipseb) : "mipseb" 785machtype: defined(mc68000) : "mc68000" 786enddef : 787 788 789newdef : defined(ultrix) || defined(__ultrix) 790comment : Digital's Ultrix 791vendor : : "dec" 792hosttype: defined(M_mipsel) : "decstation" 793hosttype: defined(M_mipseb) : "decmips" 794hosttype: defined(vax) || defined(__vax) : "vax" 795hosttype: defined(__vax__) : "vax" 796ostype : : "ultrix" 797machtype: defined(M_mipsel) : "mipsel" 798machtype: defined(M_mipseb) : "mipseb" 799machtype: defined(vax) || defined (__vax) : "vax" 800hosttype: defined(__vax__) : "vax" 801enddef : 802 803 804newdef : defined(MIPS) 805comment : Mips OS 806vendor : : "mips" 807hosttype: defined(M_mipsel) : "mips" 808hosttype: defined(M_mipseb) : "mips" 809ostype : : "mips" 810machtype: defined(M_mipsel) : "mipsel" 811machtype: defined(M_mipseb) : "mipseb" 812enddef : 813 814 815newdef : defined(DECOSF1) 816comment : Digital's alpha running osf1 817vendor : : "dec" 818ostype : : "osf1" 819hosttype: defined(__alpha) : "alpha" 820machtype: defined(__alpha) : "alpha" 821enddef : 822 823 824newdef : defined(Lynx) 825comment : Lynx OS 2.1 826vendor : : "Lynx" 827hosttype: defined(M_mipsel) : "lynxos-mips" 828hosttype: defined(M_mipseb) : "lynxos-mips" 829hosttype: defined(M_i386) : "lynxos-i386" 830hosttype: defined(i860) || defined(__i860__) : "lynxos-i860" 831hosttype: defined(m68k) : "lynxos-m68k" 832hosttype: defined(m88k) : "lynxos-m88k" 833hosttype: defined(sparc) : "lynxos-sparc" 834hosttype: : "lynxos-unknown" 835ostype : : "LynxOS" 836machtype: defined(M_mipsel) : "mipsel" 837machtype: defined(M_mipseb) : "mipseb" 838machtype: defined(M_i386) : "i386" 839machtype: defined(i860) || defined(__i860__) : "i860" 840machtype: defined(m68k) : "m68k" 841machtype: defined(m88k) : "m88k" 842machtype: defined(sparc) : "sparc" 843enddef : 844 845 846newdef : defined(masscomp) 847comment : Masscomp 848vendor : : "masscomp" 849hosttype: : "masscomp" 850ostype : : "masscomp" 851enddef : 852 853newdef : defined(__MACHTEN__) 854comment : Machintosh 855vendor : : "Tenon" 856hosttype: : "Macintosh" 857ostype : : "MachTen" 858machtype: : "Macintosh" 859enddef : 860 861 862 863newdef : defined(GOULD_NP1) 864comment : Gould 865vendor : : "gould" 866hosttype: : "gould_np1" 867machtype: : "gould" 868enddef : 869 870 871newdef : defined(MULTIFLOW) 872comment : Multiflow running 4.3BSD 873vendor : : "multiflow" 874hosttype: : "multiflow" 875machtype: : "multiflow" 876ostype : : "bsd43" 877enddef : 878 879 880newdef : defined(SXA) 881comment : PFU/Fujitsu A-xx computer 882vendor : : "sxa" 883hosttype: : "pfa50" 884ostype : defined(_BSDX_) : "e60-bsdx" 885ostype : : "e60" 886machtype: : "pfa50" 887enddef : 888 889 890newdef : defined(titan) 891comment : (St)Ardent Titan 892vendor : : "ardent" 893hosttype: : "titan" 894enddef : 895 896 897newdef : defined(stellar) 898comment : Stellar 899vendor : : "stellar" 900hosttype: : "stellar" 901ostype : : "stellix" 902enddef : 903 904 905newdef : defined(atari) 906comment : Atari TT running SVR4. This machine was never 907comment : commercially available. 908vendor : : "atari" 909hosttype: : "atari" 910ostype : : "asv" 911enddef : 912 913 914newdef : defined(OPUS) 915comment : ??? 916vendor : : "opus" 917hosttype: : "opus" 918enddef : 919 920 921newdef : defined(eta10) 922comment : ETA running SVR3 923vendor : : "eta" 924hosttype: : "eta10" 925enddef : 926 927 928newdef : defined(hk68) 929comment : Heurikon HK68 running Uniplus+ 5.0 930vendor : : "heurikon" 931hosttype: : "hk68" 932ostype : : "uniplus" 933enddef : 934 935 936newdef : defined(NDIX) 937comment : Norsk Data ND 500/5000 running Ndix 938vendor : : "norsk" 939hosttype: : "nd500" 940ostype : : "ndix" 941enddef : 942 943 944newdef : defined(AMIGA) 945comment : Amiga running AmigaOS+GG 946vendor : : "commodore" 947hosttype: : "amiga" 948ostype : : "AmigaOS" 949machtype: : "m68k" 950enddef : 951 952 953newdef : defined(uts) 954comment : Amdahl running uts 2.1 955vendor : : "amdahl" 956hosttype: : "amdahl" 957ostype : : "uts" 958machtype: : "amdahl" 959enddef : 960 961 962newdef : defined(UTek) 963comment : Tektronix 4300 running UTek (BSD 4.2 / 68020 based) 964vendor : : "tektronix" 965hosttype: : "tek4300" 966enddef : 967 968 969newdef : defined(UTekV) 970comment : Tektronix XD88/10 running UTekV 3.2e (SVR3/88100 based) 971vendor : : "tektronix" 972hosttype: : "tekXD88" 973enddef : 974 975 976newdef : defined(__DGUX__) 977comment : Data-General AViiON running DGUX 978hosttype: : "aviion" 979ostype : : "dgux" 980vendor : : "dg" 981machtype: defined(__m88k__) : "m88k" 982machtype: defined(__i386__) : "pentium" 983enddef : 984 985 986newdef : defined(sysV68) 987comment : Motorola MPC running System V/68 R32V2 (SVR3/68020 based) 988vendor : : "motorola" 989hosttype: : "sysV68" 990machtype: : "m68k" 991enddef : 992 993 994newdef : defined(supermax) 995comment : DDE Supermax running System V/68 R3 (SVR3/68020 based) 996vendor : : "supermax" 997hosttype: : "supermax" 998machtype: : "m68k" 999enddef : 1000 1001 1002newdef : defined(sysV88) 1003comment : Motorola MPC running System V/88 R32V2 (SVR3/88100 based) 1004vendor : : "motorola" 1005hosttype: : "sysV88" 1006machtype: : "m88k" 1007enddef : 1008 1009 1010newdef : defined(__clipper__) 1011comment : Clipper Chipset (Intergraph) 1012vendor : : "intergraph" 1013hosttype: : "clipper" 1014machtype: : "clipper" 1015enddef : 1016 1017newdef : defined(__QNX__) 1018ostype : : "qnx" 1019enddef : 1020 1021newdef : (defined(SNI) || defined(sinix)) && !defined(_OSD_POSIX) 1022comment : Fujitsu Siemens Computers (former "Siemens Nixdorf Informationssysteme"): SINIX aka. ReliantUNIX, a SVR4 derivative 1023vendor : : "fsc" 1024hosttype: defined(M_intel) : "wx200i" 1025hosttype: defined(MIPSEB) : "rm400" 1026ostype : defined(sinix) : "sinix" 1027machtype: defined(M_i586) : "i586" 1028machtype: defined(M_i486) : "i486" 1029machtype: defined(M_i386) : "i386" 1030machtype: defined(M_mipsel) : "mipsel" 1031machtype: defined(M_mipseb) : "mipseb" 1032machtype: : "mips" 1033enddef : 1034 1035newdef : defined(_OSD_POSIX) 1036comment : Fujitsu Siemens Computers (former "Siemens Nixdorf Informationssysteme"): BS2000 POSIX (mainframe, EBCDIC) 1037vendor : : "fsc" 1038hosttype: : "bs2000" 1039ostype : : "osdposix" 1040machtype: #machine(7500) : "s390" 1041machtype: #machine(mips) : "mips" 1042machtype: #machine(sparc) : "sparc" 1043machtype: : "bs2000" 1044enddef : 1045 1046newdef : defined(__MVS__) 1047comment : ibm uss s/390 (mainframe, EBCDIC) 1048vendor : : "ibm" 1049hosttype: : "s390" 1050ostype : : "os390" 1051machtype: : "s390" 1052enddef : 1053 1054newdef : defined(_SX) 1055comment : NEC Corporation (SX-4) 1056vendor : : "nec" 1057ostype : : "superux" 1058hosttype: : "sx4" 1059machtype: : "sx4" 1060enddef : 1061 1062newdef : !defined(SOLARIS2) && (SYSVREL == 4) 1063comment : Unix System V Release 4.0 1064vendor : defined(DELL) : "dell" 1065hosttype: defined(M_i386) : "i386" 1066ostype : : "svr4" 1067machtype: defined(M_i386) : "i386" 1068enddef : 1069 1070newdef : defined(__uxp__) || defined(__uxps__) 1071comment : FUJITSU DS/90 7000 1072vendor : : "fujitsu" 1073hosttype: : "ds90" 1074ostype : : "sysv4" 1075machtype: : "sparc" 1076enddef : 1077 1078newdef : defined(__CYGWIN__) 1079comment : Cygwin 1080hosttype: : "i386-cygwin" 1081ostype : : "cygwin" 1082enddef : 1083 1084newdef : defined(_UWIN) 1085comment : AT&T Research Unix for Windows 1086vendor : : "att" 1087hosttype: : "win32.i386" 1088machtype: : "i386" 1089enddef : 1090 1091 1092newdef : defined(mc68000) || defined(__mc68000__) || defined(mc68k32) || defined(m68k) || defined(mc68010) || defined(mc68020) 1093hosttype: : "m68k" 1094vendor : defined(m68k) : "motorola" 1095machtype: : "m68k" 1096enddef : 1097 1098 1099newdef : defined(m88k) || defined(__m88k__) 1100hosttype: : "m88k" 1101machtype: : "m88k" 1102enddef : 1103 1104 1105newdef : defined(M_intel) 1106hosttype: defined(M_i586) : "i586" 1107hosttype: defined(M_i486) : "i486" 1108hosttype: defined(M_i386) : "i386" 1109vendor : : "intel" 1110machtype: defined(M_i586) : "i586" 1111machtype: defined(M_i486) : "i486" 1112machtype: defined(M_i386) : "i386" 1113enddef : 1114 1115 1116newdef : defined(sparc) || defined(__sparc__) 1117hosttype: : "sparc" 1118machtype: : "sparc" 1119enddef : 1120 1121 1122newdef : defined(i860) || defined(__i860__) 1123hosttype: : "i860" 1124machtype: : "i860" 1125enddef : 1126 1127 1128newdef : defined(osf1) 1129ostype : : "osf1" 1130enddef : 1131 1132 1133newdef : SYSVREL == 0 1134ostype : defined(BSD4_4) : "bsd44" 1135ostype : defined(BSD) : "bsd" 1136ostype : defined(POSIX) : "posix" 1137enddef : 1138 1139 1140newdef : SYSVREL == 1 1141ostype : : "svr1" 1142enddef : 1143 1144 1145newdef : SYSVREL == 2 1146ostype : : "svr2" 1147enddef : 1148 1149 1150newdef : SYSVREL == 3 1151ostype : : "svr3" 1152enddef : 1153 1154 1155newdef : SYSVREL == 4 1156ostype : : "svr4" 1157enddef : 1158 1159 1160newcode : 1161#ifndef _hosttype_ 1162 hosttype = "unknown"; 1163#endif 1164#ifndef _ostype_ 1165 ostype = "unknown"; 1166#endif 1167#ifndef _vendor_ 1168 vendor = "unknown"; 1169#endif 1170#ifndef _machtype_ 1171 machtype = "unknown"; 1172#endif 1173 tsetenv(STRHOSTTYPE, str2short(hosttype)); 1174 tsetenv(STRVENDOR, str2short(vendor)); 1175 tsetenv(STROSTYPE, str2short(ostype)); 1176 tsetenv(STRMACHTYPE, str2short(machtype)); 1177} /* end setmachine */ 1178endcode : 1179