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