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