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