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