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