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