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