]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - contrib/tcsh/host.defs
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / contrib / tcsh / host.defs
1 newcode :
2 /* $Header: /p/tcsh/cvsroot/tcsh/host.defs,v 1.43 2006/03/02 18:46:44 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.43 2006/03/02 18:46:44 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(__386BSD__)
524 comment : Bill Jolitz's 386BSD
525 vendor  : defined(M_intel)                              : "intel"
526 hosttype:                                               : "386BSD"
527 ostype  :                                               : "386BSD"
528 machtype:                                               : "i386"
529 enddef  :
530
531
532 newdef  : defined(bsdi)
533 comment : BSDI's unix
534 vendor  : defined(M_intel)                              : "intel"
535 vendor  : defined(sparc)                                : "sun"
536 vendor  : defined(__powerpc__)                          : "motorola"
537 hosttype: defined(M_intel)                              : "bsd386"
538 hosttype: defined(sparc)                                : "bsd-sparc"
539 hosttype: defined(__powerpc__)                          : "bsd-powerpc"
540 ostype  :                                               : "bsdi"
541 machtype: defined(M_i386)                               : "i386"
542 machtype: defined(sparc)                                : "sparc"
543 machtype: defined(__powerpc__)                          : "powerpc"
544 enddef  :
545
546
547 newdef  : defined(COHERENT)
548 comment : COHERENT's unix
549 vendor  : defined(_I386)                                : "intel"
550 hosttype:                                               : "coh386"
551 hosttype:                                               : "coherent"
552 ostype  :                                               : "coherent"
553 machtype: defined(_I386)                                : "i386"
554 enddef  :
555
556 newdef  : defined(concurrent)
557 comment : Concurrent PowerHawk
558 vendor  :                                               : "concurrent"
559 hosttype:                                               : "powerhawk"
560 ostype  :                                               : "powermax_os"
561 machtype:                                               : "powerhawk"
562 enddef  :
563
564 newdef  : defined(SCO)
565 comment : SCO UNIX System V/386 Release 3.2
566 vendor  :                                               : "sco"
567 hosttype:                                               : "sco386"
568 ostype  :                                               : "sco_unix"
569 machtype:                                               : "i386"
570 enddef  :
571
572 newdef  : defined(M_XENIX) && !defined(M_UNIX)
573 comment : SCO XENIX
574 vendor  :                                               : "sco"
575 hosttype:                                               : "sco_xenix"
576 ostype  :                                               : "sco_xenix"
577 machtype: defined(M_I386)                               : "i386"
578 machtype: defined(M_I286)                               : "i286"
579 enddef  :
580
581
582 newdef  : defined(ISC) || defined(ISC202)
583 comment : Interactive Unix
584 vendor  :                                               : "isc"
585 hosttype:                                               : "isc386"
586 ostype  : defined(POSIX)                                : "POSIX"
587 ostype  :                                               : "SVR3"
588 machtype: defined(M_i386)                               : "i386"
589 enddef  :
590
591
592 newdef  : defined(INTEL)
593 comment : Intel Unix
594 vendor  :                                               : "intel"
595 hosttype:                                               : "intel386"
596 ostype  :                                               : "intel_unix"
597 machtype: defined(M_i386)                               : "i386"
598 enddef  :
599
600
601 newdef  : defined(MACH)
602 comment : cmu's mach
603 vendor  :                                               : "cmu"
604 hosttype: defined(M_i386)                               : "i386-mach"
605 ostype  :                                               : "mach"
606 machtype: defined(M_i386)                               : "i386"
607 enddef  :
608
609
610 newdef  : defined(alliant)
611 comment : Alliants FSX
612 vendor  :                                               : "alliant"
613 hosttype: defined(mc68000)                              : "alliant-fx80"
614 hosttype: defined(i860)                                 : "alliant-fx2800"
615 hosttype:                                               : "alliant"
616 ostype  :                                               : "fsx"
617 machtype: defined(mc68000)                              : "mc68000"
618 machtype: defined(i860)                                 : "i860"
619 enddef  :
620
621
622 newdef  : defined(_FTX)
623 comment : Stratus Computer, Inc FTX2 (i860 based)
624 comment : Stratus Computer, Inc FTX3 (HPPA based)
625 vendor  :                                               : "stratus"
626 hosttype: defined(i860) && defined(_FTX)                : "atlantic"
627 hosttype: defined(__hppa) && defined(_FTX)              : "continuum"
628 ostype  : defined(i860) && defined(_FTX)                : "ftx2"
629 ostype  : defined(__hppa) && defined(_FTX)              : "ftx3"
630 machtype: defined(i860)                                 : "i860"
631 machtype: defined(__hppa)                               : "hppa"
632 enddef  :
633
634
635 newdef  : defined(sequent) || defined(_SEQUENT_)
636 comment : Sequent Balance (32000 based)
637 comment : Sequent Symmetry running DYNIX/ptx (386/486 based)
638 comment : Sequent Symmetry running DYNIX 3 (386/486 based)
639 vendor  :                                               : "sequent"
640 hosttype: defined(M_i386) && defined(sequent)           : "symmetry"
641 hosttype: defined(M_i386)                               : "ptx"
642 hosttype:                                               : "balance"
643 ostype  : defined(M_i386) && !defined(sequent)          : "ptx"
644 ostype  :                                               : "dynix3"
645 machtype: defined(M_i386)                               : "i386"
646 machtype: defined(ns32000)                              : "ns32000"
647 enddef  :
648
649
650 newdef  : defined(ns32000)
651 comment : Encore Computer Corp. Multimax (32000 based)
652 vendor  :                                               : "encore"
653 hosttype: defined(CMUCS)                                : "multimax"
654 hosttype:                                               : isamultimax(0)
655 ostype  : defined(CMUCS)                                : "mach"
656 ostype  :                                               : isamultimax(1)
657 machtype:                                               : "ns32000"
658 enddef  :
659
660
661 newdef  : defined(iconuxv)
662 comment : Icon 88k running Unix
663 vendor  :                                               : "icon"
664 hosttype:                                               : "icon"
665 ostype  :                                               : "iconuxv"
666 machtype: defined(m88k) || defined(__m88k__)            : "m88k"
667 enddef  :
668
669
670 newdef  : defined(_CRAY) && defined(_CRAYCOM)
671 comment : Cray Computer Corp. running CSOS
672 vendor  :                                               : "ccc"
673 hosttype: defined(_CRAY2)                               : "cray"
674 hosttype: defined(_CRAY3)                               : "cray"
675 hosttype: defined(_CRAY4)                               : "cray"
676 ostype  :                                               : "CSOS"
677 machtype: defined(_CRAY2)                               : "cray2"
678 machtype: defined(_CRAY3)                               : "cray3"
679 machtype: defined(_CRAY4)                               : "cray4"
680 enddef  :
681
682
683 newdef  : defined(cray) && !defined(_CRAYMPP)
684 comment : Cray Research Inc. PVP running UNICOS
685 vendor  :                                               : "cri"
686 hosttype:                                               : getcray()
687 ostype  :                                               : "unicos"
688 machtype:                                               : getcray()
689 enddef  :
690
691
692 newdef  : defined(cray) && defined(_CRAYT3D)
693 comment : Cray Research Inc. running UNICOS MAX
694 vendor  :                                               : "cri"
695 hosttype:                                               : getcray()
696 ostype  :                                               : "unicosmax"
697 machtype:                                               : getcray()
698 enddef  :
699
700
701 newdef  : defined(cray) && defined(_CRAYT3E)
702 comment : Cray Research Inc. running UNICOS/mk
703 vendor  :                                               : "cri"
704 hosttype:                                               : getcray()
705 ostype  :                                               : "unicosmk"
706 machtype:                                               : getcray()
707 enddef  :
708
709
710 newdef  : defined(convex)
711 comment : Convex
712 vendor  :                                               : "convex"
713 hosttype:                                               : "convex"
714 ostype  :                                               : "convexos"
715 machtype:                                               : getconvex()
716 enddef  :
717
718
719 newdef  : defined(butterfly)
720 comment : BBN Butterfly 1000
721 vendor  :                                               : "bbn"
722 hosttype:                                               : "butterfly"
723 machtype: defined(mc68020) || defined(__mc68020__)      : "m68k"
724 enddef  :
725
726
727 newdef  : defined(NeXT)
728 comment : NeXTStep
729 vendor  :                                               : "next"
730 hosttype: defined(mc68020) || defined(__mc68020__)      : "next"
731 hosttype: defined(M_i386)  || defined(__i386__)         : "intel-pc"
732 hosttype: defined(hppa)    || defined(__hppa__)         : "hp"
733 hosttype: defined(sparc)   || defined(__sparc__)        : "sun"
734 ostype  :                                               : "nextstep"
735 machtype: defined(mc68020) || defined(__mc68020__)      : "m68k"
736 machtype: defined(M_i386)  || defined(__i386__)         : "i386"
737 machtype: defined(hppa)    || defined(__hppa__)         : "hppa"
738 machtype: defined(sparc)   || defined(__sparc__)        : "sparc"
739 enddef  :
740
741
742 newdef  : defined(__APPLE__) && defined(__MACH__)
743 comment : OS X
744 vendor  :                                               : "apple"
745 hosttype: defined(__i386__)                             : "intel-pc"
746 hosttype: defined(__ppc__)                              : "powermac"
747 ostype  :                                               : "darwin"
748 machtype: defined(__i386__)                             : "i386"
749 machtype: defined(__ppc__)                              : "powerpc"
750 enddef  :
751
752
753 newdef  : defined(sony_news)
754 comment : Sony NEWS 800 or 1700 workstation
755 vendor  :                                               : "sony"
756 hosttype: defined(mips)                                 : "news_mips"
757 hosttype: defined(mc68020) || defined(__mc68020__)      : "news_m68k"
758 ostype  :                                               : "News"
759 machtype: defined(mc68020) || defined(__mc68020__)      : "m68k"
760 machtype: defined(M_mipsel)                             : "mipsel"
761 machtype: defined(M_mipseb)                             : "mipseb"
762 enddef  :
763
764
765 newdef  : defined(sgi)
766 comment : Silicon Graphics
767 vendor  :                                               : "sgi"
768 hosttype: defined(M_mipsel)                             : "iris4d"
769 hosttype: defined(M_mipseb)                             : "iris4d"
770 hosttype: defined(mc68000)                              : "iris3d"
771 ostype  :                                               : "irix"
772 machtype: defined(M_mipsel)                             : "mipsel"
773 machtype: defined(M_mipseb)                             : "mipseb"
774 machtype: defined(mc68000)                              : "mc68000"
775 enddef  :
776
777
778 newdef  : defined(ultrix) || defined(__ultrix)
779 comment : Digital's Ultrix 
780 vendor  :                                               : "dec"
781 hosttype: defined(M_mipsel)                             : "decstation"
782 hosttype: defined(M_mipseb)                             : "decmips"
783 hosttype: defined(vax) || defined(__vax)                : "vax"
784 hosttype: defined(__vax__)                              : "vax"
785 ostype  :                                               : "ultrix"
786 machtype: defined(M_mipsel)                             : "mipsel"
787 machtype: defined(M_mipseb)                             : "mipseb"
788 machtype: defined(vax) || defined (__vax)               : "vax"
789 hosttype: defined(__vax__)                              : "vax"
790 enddef  :
791
792
793 newdef  : defined(MIPS)
794 comment : Mips OS
795 vendor  :                                               : "mips"
796 hosttype: defined(M_mipsel)                             : "mips"
797 hosttype: defined(M_mipseb)                             : "mips"
798 ostype  :                                               : "mips"
799 machtype: defined(M_mipsel)                             : "mipsel"
800 machtype: defined(M_mipseb)                             : "mipseb"
801 enddef  :
802
803
804 newdef  : defined(DECOSF1)
805 comment : Digital's alpha running osf1
806 vendor  :                                               : "dec"
807 ostype  :                                               : "osf1"
808 hosttype: defined(__alpha)                              : "alpha"
809 machtype: defined(__alpha)                              : "alpha"
810 enddef  :
811
812
813 newdef  : defined(Lynx)
814 comment : Lynx OS 2.1
815 vendor  :                                               : "Lynx"
816 hosttype: defined(M_mipsel)                             : "lynxos-mips"
817 hosttype: defined(M_mipseb)                             : "lynxos-mips"
818 hosttype: defined(M_i386)                               : "lynxos-i386"
819 hosttype: defined(i860) || defined(__i860__)            : "lynxos-i860"
820 hosttype: defined(m68k)                                 : "lynxos-m68k"
821 hosttype: defined(m88k)                                 : "lynxos-m88k"
822 hosttype: defined(sparc)                                : "lynxos-sparc"
823 hosttype:                                               : "lynxos-unknown"
824 ostype  :                                               : "LynxOS"
825 machtype: defined(M_mipsel)                             : "mipsel"
826 machtype: defined(M_mipseb)                             : "mipseb"
827 machtype: defined(M_i386)                               : "i386"
828 machtype: defined(i860) || defined(__i860__)            : "i860"
829 machtype: defined(m68k)                                 : "m68k"
830 machtype: defined(m88k)                                 : "m88k"
831 machtype: defined(sparc)                                : "sparc"
832 enddef  :
833
834
835 newdef  : defined(masscomp)
836 comment : Masscomp
837 vendor  :                                               : "masscomp"
838 hosttype:                                               : "masscomp"
839 ostype  :                                               : "masscomp"
840 enddef  :
841
842 newdef  : defined(__MACHTEN__)
843 comment : Machintosh
844 vendor  :                                               : "Tenon"
845 hosttype:                                               : "Macintosh"
846 ostype  :                                               : "MachTen"
847 machtype:                                               : "Macintosh"
848 enddef  :
849
850
851
852 newdef  : defined(GOULD_NP1)
853 comment : Gould
854 vendor  :                                               : "gould"
855 hosttype:                                               : "gould_np1"
856 machtype:                                               : "gould"
857 enddef  :
858
859
860 newdef  : defined(MULTIFLOW)
861 comment : Multiflow running 4.3BSD
862 vendor  :                                               : "multiflow"
863 hosttype:                                               : "multiflow"
864 machtype:                                               : "multiflow"
865 ostype  :                                               : "bsd43"
866 enddef  :
867
868
869 newdef  : defined(SXA)
870 comment : PFU/Fujitsu A-xx computer
871 vendor  :                                               : "sxa"
872 hosttype:                                               : "pfa50"
873 ostype  : defined(_BSDX_)                               : "e60-bsdx"
874 ostype  :                                               : "e60"
875 machtype:                                               : "pfa50"
876 enddef  :
877
878
879 newdef  : defined(titan)
880 comment : (St)Ardent Titan
881 vendor  :                                               : "ardent"
882 hosttype:                                               : "titan"
883 enddef  :
884
885
886 newdef  : defined(stellar)
887 comment : Stellar
888 vendor  :                                               : "stellar"
889 hosttype:                                               : "stellar"
890 ostype  :                                               : "stellix"
891 enddef  :
892
893
894 newdef  : defined(atari)
895 comment : Atari TT running SVR4. This machine was never
896 comment : commercially available.
897 vendor  :                                               : "atari"
898 hosttype:                                               : "atari"
899 ostype  :                                               : "asv"
900 enddef  :
901
902
903 newdef  : defined(OPUS)
904 comment : ???
905 vendor  :                                               : "opus"
906 hosttype:                                               : "opus"
907 enddef  :
908
909
910 newdef  : defined(eta10)
911 comment : ETA running SVR3
912 vendor  :                                               : "eta"
913 hosttype:                                               : "eta10"
914 enddef  :
915
916
917 newdef  : defined(hk68)
918 comment : Heurikon HK68 running Uniplus+ 5.0
919 vendor  :                                               : "heurikon"
920 hosttype:                                               : "hk68"
921 ostype  :                                               : "uniplus"
922 enddef  :
923
924
925 newdef  : defined(NDIX)
926 comment : Norsk Data ND 500/5000 running Ndix
927 vendor  :                                               : "norsk"
928 hosttype:                                               : "nd500"
929 ostype  :                                               : "ndix"
930 enddef  :
931
932
933 newdef  : defined(AMIGA)
934 comment : Amiga running AmigaOS+GG
935 vendor  :                                               : "commodore"
936 hosttype:                                               : "amiga"
937 ostype  :                                               : "AmigaOS"
938 machtype:                                               : "m68k"
939 enddef  :
940
941
942 newdef  : defined(uts)
943 comment : Amdahl running uts 2.1
944 vendor  :                                               : "amdahl"
945 hosttype:                                               : "amdahl"
946 ostype  :                                               : "uts"
947 machtype:                                               : "amdahl"
948 enddef  :
949
950
951 newdef  : defined(UTek)
952 comment : Tektronix 4300 running UTek (BSD 4.2 / 68020 based)
953 vendor  :                                               : "tektronix"
954 hosttype:                                               : "tek4300"
955 enddef  :
956
957
958 newdef  : defined(UTekV)
959 comment : Tektronix XD88/10 running UTekV 3.2e (SVR3/88100 based)
960 vendor  :                                               : "tektronix"
961 hosttype:                                               : "tekXD88"
962 enddef  :
963
964
965 newdef  : defined(__DGUX__)
966 comment : Data-General AViiON running DGUX
967 hosttype:                                               : "aviion"
968 ostype  :                                               : "dgux"
969 vendor  :                                               : "dg"
970 machtype: defined(__m88k__)                             : "m88k"
971 machtype: defined(__i386__)                             : "pentium"
972 enddef  :
973
974
975 newdef  : defined(sysV68)
976 comment : Motorola MPC running System V/68 R32V2 (SVR3/68020 based)
977 vendor  :                                               : "motorola"
978 hosttype:                                               : "sysV68"
979 machtype:                                               : "m68k"
980 enddef  :
981
982
983 newdef  : defined(supermax)
984 comment : DDE Supermax running System V/68 R3 (SVR3/68020 based)
985 vendor  :                                               : "supermax"
986 hosttype:                                               : "supermax"
987 machtype:                                               : "m68k"
988 enddef  :
989
990
991 newdef  : defined(sysV88)
992 comment : Motorola MPC running System V/88 R32V2 (SVR3/88100 based)
993 vendor  :                                               : "motorola"
994 hosttype:                                               : "sysV88"
995 machtype:                                               : "m88k"
996 enddef  :
997
998
999 newdef  : defined(__clipper__)
1000 comment : Clipper Chipset (Intergraph)
1001 vendor  :                                               : "intergraph"
1002 hosttype:                                               : "clipper"
1003 machtype:                                               : "clipper"
1004 enddef  :
1005
1006
1007 newdef  : (defined(SNI) || defined(sinix)) && !defined(_OSD_POSIX)
1008 comment : Fujitsu Siemens Computers (former "Siemens Nixdorf Informationssysteme"): SINIX aka. ReliantUNIX, a SVR4 derivative
1009 vendor  :                                               : "fsc"
1010 hosttype: defined(M_intel)                              : "wx200i"
1011 hosttype: defined(MIPSEB)                               : "rm400"
1012 ostype  : defined(sinix)                                : "sinix"
1013 machtype: defined(M_i586)                               : "i586"
1014 machtype: defined(M_i486)                               : "i486"
1015 machtype: defined(M_i386)                               : "i386"
1016 machtype: defined(M_mipsel)                             : "mipsel"
1017 machtype: defined(M_mipseb)                             : "mipseb"
1018 machtype:                                               : "mips"
1019 enddef  :
1020
1021 newdef  : defined(_OSD_POSIX)
1022 comment : Fujitsu Siemens Computers (former "Siemens Nixdorf Informationssysteme"): BS2000 POSIX (mainframe, EBCDIC)
1023 vendor  :                                               : "fsc"
1024 hosttype:                                               : "bs2000"
1025 ostype  :                                               : "osdposix"
1026 machtype: #machine(7500)                                : "s390"
1027 machtype: #machine(mips)                                : "mips"
1028 machtype: #machine(sparc)                               : "sparc"
1029 machtype:                                               : "bs2000"
1030 enddef  :
1031
1032 newdef  : defined(__MVS__)
1033 comment : ibm uss s/390 (mainframe, EBCDIC)
1034 vendor  :                                               : "ibm"
1035 hosttype:                                               : "s390"
1036 ostype  :                                               : "os390"
1037 machtype:                                               : "s390"
1038 enddef  :
1039
1040 newdef  : defined(_SX)
1041 comment : NEC Corporation (SX-4)
1042 vendor  :                                               : "nec"
1043 ostype  :                                               : "superux"
1044 hosttype:                                               : "sx4"
1045 machtype:                                               : "sx4"
1046 enddef  :
1047
1048 newdef  : !defined(SOLARIS2) && (SYSVREL == 4)
1049 comment : Unix System V Release 4.0
1050 vendor  : defined(DELL)                                 : "dell"
1051 hosttype: defined(M_i386)                               : "i386"
1052 ostype  :                                               : "svr4"
1053 machtype: defined(M_i386)                               : "i386"
1054 enddef  :
1055
1056 newdef  : defined(__uxp__) || defined(__uxps__)
1057 comment : FUJITSU DS/90 7000
1058 vendor  :                                               : "fujitsu"
1059 hosttype:                                               : "ds90"
1060 ostype  :                                               : "sysv4"
1061 machtype:                                               : "sparc"
1062 enddef  :
1063
1064 newdef  : defined(_UWIN)
1065 comment : AT&T Research Unix for Windows
1066 vendor  :                                               : "att"
1067 hosttype:                                               : "win32.i386"
1068 machtype:                                               : "i386"
1069 enddef  :
1070
1071
1072 newdef  : defined(mc68000) || defined(__mc68000__) || defined(mc68k32) || defined(m68k) || defined(mc68010) || defined(mc68020)
1073 hosttype:                                               : "m68k"
1074 vendor  : defined(m68k)                                 : "motorola"
1075 machtype:                                               : "m68k"
1076 enddef  :
1077
1078
1079 newdef  : defined(m88k) || defined(__m88k__)
1080 hosttype:                                               : "m88k"
1081 machtype:                                               : "m88k"
1082 enddef  :
1083
1084
1085 newdef  : defined(M_intel)
1086 hosttype: defined(M_i586)                               : "i586"
1087 hosttype: defined(M_i486)                               : "i486"
1088 hosttype: defined(M_i386)                               : "i386"
1089 vendor  :                                               : "intel"
1090 machtype: defined(M_i586)                               : "i586"
1091 machtype: defined(M_i486)                               : "i486"
1092 machtype: defined(M_i386)                               : "i386"
1093 enddef  :
1094
1095
1096 newdef  : defined(sparc) || defined(__sparc__)
1097 hosttype:                                               : "sparc"
1098 machtype:                                               : "sparc"
1099 enddef  :
1100
1101
1102 newdef  : defined(i860) || defined(__i860__)
1103 hosttype:                                               : "i860"
1104 machtype:                                               : "i860"
1105 enddef  :
1106
1107
1108 newdef  : defined(osf1)
1109 ostype  :                                               : "osf1"
1110 enddef  :
1111
1112
1113 newdef  : SYSVREL == 0
1114 ostype  : defined(BSD4_4)                               : "bsd44"
1115 ostype  : defined(BSD)                                  : "bsd"
1116 ostype  : defined(POSIX)                                : "posix"
1117 enddef  :
1118
1119
1120 newdef  : SYSVREL == 1
1121 ostype  :                                               : "svr1"
1122 enddef  :
1123
1124
1125 newdef  : SYSVREL == 2
1126 ostype  :                                               : "svr2"
1127 enddef  :
1128
1129
1130 newdef  : SYSVREL == 3
1131 ostype  :                                               : "svr3"
1132 enddef  :
1133
1134
1135 newdef  : SYSVREL == 4
1136 ostype  :                                               : "svr4"
1137 enddef  :
1138
1139
1140 newcode :
1141 #ifndef _hosttype_
1142     hosttype = "unknown";
1143 #endif
1144 #ifndef _ostype_
1145     ostype = "unknown";
1146 #endif
1147 #ifndef _vendor_
1148     vendor = "unknown";
1149 #endif
1150 #ifndef _machtype_
1151     machtype = "unknown";
1152 #endif
1153     tsetenv(STRHOSTTYPE, str2short(hosttype));
1154     tsetenv(STRVENDOR,   str2short(vendor));
1155     tsetenv(STROSTYPE,   str2short(ostype));
1156     tsetenv(STRMACHTYPE, str2short(machtype));
1157 } /* end setmachine */
1158 endcode :