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