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