]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/tcsh/host.defs
ident(1): Normalizing date format
[FreeBSD/FreeBSD.git] / contrib / tcsh / host.defs
1 newcode :
2 /*
3  * host.defs: Hosttype/Machtype etc.
4  */
5 /*-
6  * Copyright (c) 1980, 1991 The Regents of the University of California.
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  * 3. Neither the name of the University nor the names of its contributors
18  *    may be used to endorse or promote products derived from this software
19  *    without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31  * SUCH DAMAGE.
32  */
33 #include "sh.h"
34
35 endcode :
36
37 macro   : M_mips64el : (defined(mips64) && defined(MIPSEL))
38 macro   : M_mips64eb : (defined(mips64) && defined(MIPSEB))
39 macro   : M_mipsel : (!defined(M_mips64el) && defined(mips) && defined(MIPSEL))
40 macro   : M_mipseb : (!defined(M_mips64eb) && defined(mips) && defined(MIPSEB))
41 macro   : M_amd64: (defined(amd64) || defined(x86_64))
42 macro   : M_i386 : defined(i386)
43 macro   : M_i486 : defined(i486)
44 macro   : M_i586 : defined(i586)
45 macro   : M_i686 : defined(i686)
46 macro   : M_intel : (defined(M_i386) || defined(M_i486) || defined(M_i586))
47
48 newdef  : defined(ns32000)
49 newcode :
50 static char *
51 isamultimax(int flag)
52 {
53     if (access("/Umax.image", F_OK) == 0)
54         return "multimax";
55     else 
56         return flag ? "mach" : "ns32000";
57 }
58 endcode :
59 enddef  :
60
61
62 newdef  : defined(cray)
63 newcode :
64 /*  
65  * On crays, find the current machine type via the target() syscall
66  * We need ctype.h to convert the name returned to lower case
67  */
68 # include <sys/target.h> 
69 # include <ctype.h>
70 # include <string.h>
71
72 /* From: hpa@hook.eecs.nwu.edu (H. Peter Anvin) */
73 static char *
74 getcray(void)
75 {
76 # ifdef MC_GET_SYSTEM /* If we have target() */
77     struct target data;
78
79     if (target(MC_GET_SYSTEM, &data) != -1) {
80         static char hosttype_buf[sizeof(data.mc_pmt)+1];
81         unsigned char *p = (unsigned char *) &(data.mc_pmt);
82         char *q = hosttype_buf;
83         int n;
84
85         /* 
86          * Copy to buffer and convert to lower case 
87          * String may not be null-terminated, so keep a counter
88          */
89         for (n = 0; *p && n < sizeof(data.mc_pmt); n++)
90           *q++ = tolower(p[n]);
91
92         *q = '\0';
93
94         /* replace dashes with underscores if present */
95         while ((q = strchr(hosttype_buf, '-')) != NULL)
96             *q = '_';
97         return hosttype_buf;    /* Return in static buffer */
98     }
99     else
100 # endif /* MC_GET_SYSTEM */
101         return "cray";          /* target() failed */
102 }
103 endcode :
104 enddef  :
105
106
107 newdef  : defined(convex)
108 newcode :
109 /*  
110  * On convex, find the current machine type via the getsysinfo() syscall
111  */
112 #include <sys/sysinfo.h> 
113
114 /* From: fox@convex.com (David DeSimone) */
115 static char *
116 getconvex(void)
117 {
118     struct system_information  sysinfo;
119     static char  result[8];
120
121     if (getsysinfo(SYSINFO_SIZE, &sysinfo) == -1)
122         return "convex";
123
124     switch(sysinfo.cpu_type) {
125 #ifdef SI_CPUTYPE_C1
126     case SI_CPUTYPE_C1:
127         return "c1";
128 #endif
129
130 #ifdef SI_CPUTYPE_C2
131     case SI_CPUTYPE_C2:
132         return "c2";
133 #endif
134
135 #ifdef SI_CPUTYPE_C2MP
136     case SI_CPUTYPE_C2MP:
137         (void) strcpy(result, "c2X0");
138         result[2] = sysinfo.cpu_count + '0';
139         return result;
140 #endif
141
142 #ifdef SI_CPUTYPE_C34
143     case SI_CPUTYPE_C34:
144         (void) strcpy(result, "c34X0");
145         result[3] = sysinfo.cpu_count + '0';
146         return result;
147 #endif
148
149 #ifdef SI_CPUTYPE_C38
150     case SI_CPUTYPE_C38:
151         (void) strcpy(result, "c38X0");
152         result[3] = sysinfo.cpu_count + '0';
153         return result;
154 #endif
155
156 #ifdef SI_CPUTYPE_C46
157     case SI_CPUTYPE_C46:
158         (void) strcpy(result, "c46X0");
159         result[3] = sysinfo.cpu_count + '0';
160         return result;
161 #endif
162
163     default:
164         return "convex";
165     }
166 }
167 endcode :
168 enddef  :
169
170 newdef : defined(linux) || defined(CYGWIN) || defined(GNU) || defined(GLIBC)
171 newcode :
172 # include "tw.h"
173 #include <sys/utsname.h>
174 static char mach[256];
175 static char host[256];
176 static char ostype[32];
177 static void populate(void)
178 {
179         struct utsname uts;
180         int e = uname(&uts);
181         const char *p = short2str(tgetenv(STROSTYPE));
182         if (p == NULL) {
183 #if defined(__ANDROID__)
184                 p = "android";
185 #elif defined(__CYGWIN__)
186                 p = "cygwin";
187 #else
188                 p = "linux";
189 #endif
190         }
191         xsnprintf(ostype, sizeof(ostype), "%s", p);
192         xsnprintf(mach, sizeof(mach), "%s", e != -1 ? uts.machine : "unknown");
193         xsnprintf(host, sizeof(host), "%s-%s",
194             e != -1 ? uts.machine : "unknown", ostype);
195 }
196
197 static char *
198 getmach(void)
199 {
200     if (!mach[0])
201         populate();
202     return mach;
203 }
204
205 static char *
206 gethost(void)
207 {
208     if (!host[0])
209         populate();
210     return host;
211 }
212
213 static char *
214 getostype(void)
215 {
216     if (!ostype[0])
217         populate();
218     return ostype;
219 }
220
221 endcode :
222 enddef :
223
224 newcode :
225 void
226 getmachine(void)
227 {
228      const char *hosttype;
229      const char *ostype;
230      const char *vendor;
231      const char *machtype;
232
233 endcode :
234
235
236 newdef  : defined(HOSTTYPE)
237 hosttype:                                               : HOSTTYPE
238 enddef  :
239
240
241 newdef  : defined(PARAGON)
242 comment : Intel Paragon running OSF/1
243 vendor  :                                               : "intel"
244 hosttype:                                               : "paragon"
245 ostype  :                                               : "osf1"
246 machtype: defined(M_i386)                               : "i386"
247 enddef  :
248
249
250 newdef  : defined(AMIX)
251 comment : Amiga running Amix 2.02
252 vendor  :                                               : "commodore"
253 hosttype:                                               : "amiga"
254 ostype  :                                               : "Amix"
255 machtype:                                               : "m68k"
256 enddef  :
257
258
259 newdef  : defined(accel)
260 comment : celerity Accel
261 vendor  :                                               : "celerity"
262 hosttype:                                               : "celerityACCEL"
263 ostype  :                                               : "unix"
264 machtype:                                               : "accel"
265 enddef  :
266
267
268 newdef  : defined(_VMS_POSIX)
269 comment : digital vax or alpha running vms posix
270 vendor  :                                               : "dec"
271 hosttype:                                               : "VMS-POSIX"
272 ostype  :                                               : "vms"
273 machtype: defined(alpha)                                : "alpha"
274 machtype: defined(vax)                                  : "vax"
275 enddef  :
276
277
278 newdef  : defined(hp_osf)
279 comment : Hewlett Packard running OSF/1
280 vendor  :                                               : "hp"
281 hosttype: defined(pa_risc)                              : "hp9000s700-osf1"
282 hosttype:                                               : "hp-osf1"
283 ostype  :                                               : "osf1"
284 machtype: defined(pa_risc)                              : "pa_risc"
285 enddef  :
286
287
288 newdef  : defined(hp9000)
289 comment : Hewlett Packard running MORE/bsd 
290 vendor  :                                               : "hp"
291 hosttype: defined(hp300)                                : "hp300"
292 hosttype: defined(hp800)                                : "hp800"
293 hosttype:                                               : "hp9000"
294 ostype  : defined(BSD4_4)                               : "bsd44"
295 ostype  :                                               : "mtXinu"
296 machtype: defined(hp300)                                : "m68k"
297 machtype: defined(hp800)                                : "pa_risc"
298 enddef  :
299
300
301 newdef  : defined(hpux)
302 comment : Hewlett Packard running HP/UX
303 vendor  :                                               : "hp"
304 hosttype: defined(hp9000s800)                           : "hp9000s800"
305 hosttype: defined(hp9000s700)                           : "hp9000s700"
306 hosttype: defined(hp9000s500)                           : "hp9000s500"
307 hosttype: defined(hp9000s300)                           : "hp9000s300"
308 hosttype:                                               : "hp"
309 ostype  :                                               : "hpux"
310 machtype: defined(hp9000s800)                           : "pa_risc"
311 machtype: defined(hp9000s700)                           : "pa_risc"
312 machtype: defined(hp9000s500)                           : "m68k"
313 machtype: defined(hp9000s300)                           : "m68k"
314 enddef  :
315
316
317 newdef  : defined(apollo)
318 comment : Hewlett Packard apollo running Domain/OS
319 vendor  :                                               : "hp"
320 hosttype:                                               : "apollo"
321 ostype  :                                               : "DomainOS"
322 machtype:                                               : "m68k"
323 enddef  :
324
325
326 newdef  : defined(sun)
327 comment : Sun Microsystems series 2 workstation (68010 based)
328 comment : Sun Microsystems series 3 workstation (68020 based)
329 comment : Sun Microsystems 386i workstation (386 based)
330 comment : Sun Microsystems series 4 workstation (SPARC based)
331 vendor  :                                               : "sun"
332 hosttype: defined(M_i386) && !defined(SVR4)             : "sun386i"
333 hosttype: defined(M_i386) && defined(SVR4)              : "i86pc"
334 hosttype: defined(M_amd64)                              : "i86pc"
335 hosttype: defined(mc68010)                              : "sun2"
336 hosttype: defined(mc68020)                              : "sun3"
337 hosttype: defined(sparc)                                : "sun4"
338 hosttype:                                               : "sun"
339 ostype  : defined(SUNOS3)                               : "sunos3"
340 ostype  : defined(SUNOS4)                               : "sunos4"
341 ostype  : defined(SOLARIS2)                             : "solaris"
342 machtype: defined(mc68010)                              : "m68k"
343 machtype: defined(mc68020)                              : "m68k"
344 machtype: defined(sparcv9)                              : "sparcv9"
345 machtype: defined(sparc)                                : "sparc"
346 machtype: defined(M_i386)                               : "i386"
347 machtype: defined(M_amd64)                              : "amd64"
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(M_amd64)                              : "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(M_amd64)                              : "x86_64"
565 enddef  :
566
567 newdef : defined(OpenBSD)
568 comment        : OpenBSD
569 vendor : defined(alpha)                                 : "digital"
570 vendor : defined(M_amd64)                               : "amd"
571 vendor : defined(arm)                                   : "arm"
572 vendor : defined(hppa) || defined(hppa64)               : "hp"
573 vendor : defined(M_intel)                               : "intel"
574 vendor : defined(m68k)                                  : "motorola"
575 vendor : defined(m88k)                                  : "motorola"
576 vendor : defined(mips) && defined(sgi)                  : "sgi"
577 vendor : defined(powerpc)                               : "motorola"
578 vendor : defined(sh)                                    : "io-data"
579 vendor : defined(sparc) || defined(sparc64)             : "sun"
580 vendor : defined(vax)                                   : "digital"
581 hosttype:                                               : "OpenBSD"
582 ostype :                                                : "OpenBSD"
583 machtype: defined(alpha)                                : "alpha"
584 machtype: defined(M_amd64)                              : "amd64"
585 machtype: defined(arm)                                  : "arm"
586 machtype: defined(hppa)                                 : "hppa"
587 machtype: defined(hppa64)                               : "hppa64"
588 machtype: defined(M_i386)                               : "i386"
589 machtype: defined(m68k)                                 : "m68k"
590 machtype: defined(m88k)                                 : "m88k"
591 machtype: defined(mips)                                 : "mips"
592 machtype: defined(sh)                                   : "sh"
593 machtype: defined(sparc64)                              : "sparc64"
594 machtype: defined(sparc)                                : "sparc"
595 machtype: defined(powerpc)                              : "powerpc"
596 machtype: defined(vax)                                  : "vax"
597 enddef :
598
599
600 newdef  : defined(FreeBSD) 
601 comment : FreeBSD
602 vendor  : defined(alpha)                                : "digital"
603 vendor  : defined(arm32) || defined(arm)                : "acorn"
604 vendor  : defined(M_intel)                              : "intel"
605 vendor  : defined(ia64)                                 : "intel"
606 vendor  : defined(mips)                                 : "mips"
607 vendor  : defined(powerpc)                              : "motorola"
608 vendor  : defined(sparc)                                : "sun"
609 vendor  : defined(sparc64)                              : "sun"
610 vendor  : defined(M_amd64)                              : "amd"
611 hosttype:                                               : "FreeBSD"
612 ostype  :                                               : "FreeBSD"
613 machtype: defined(alpha)                                : "alpha"
614 machtype: defined(arm32) || defined(APCS_32)            : "arm32"
615 machtype: defined(arm)                                  : "arm"
616 machtype: defined(ia64)                                 : "ia64"
617 machtype: defined(M_i386)                               : "i386"
618 machtype: defined(mips)                                 : "mips"
619 machtype: defined(powerpc)                              : "powerpc"
620 machtype: defined(sparc)                                : "sparc"
621 machtype: defined(sparc64)                              : "sparc64"
622 machtype: defined(M_amd64)                              : "x86_64"
623 enddef  :
624
625
626 newdef  : defined(MidnightBSD)
627 comment : MidnightBSD
628 vendor  : defined(M_intel)                              : "intel"
629 hosttype:                                               : "MidnightBSD"
630 ostype  :                                               : "MidnightBSD"
631 machtype: defined(M_i386)                               : "i386"
632 enddef  :
633
634
635 newdef  : defined(__386BSD__)
636 comment : Bill Jolitz's 386BSD
637 vendor  : defined(M_intel)                              : "intel"
638 hosttype:                                               : "386BSD"
639 ostype  :                                               : "386BSD"
640 machtype:                                               : "i386"
641 enddef  :
642
643
644 newdef  : defined(bsdi)
645 comment : BSDI's unix
646 vendor  : defined(M_intel)                              : "intel"
647 vendor  : defined(sparc)                                : "sun"
648 vendor  : defined(powerpc)                              : "motorola"
649 hosttype: defined(M_intel)                              : "bsd386"
650 hosttype: defined(sparc)                                : "bsd-sparc"
651 hosttype: defined(powerpc)                              : "bsd-powerpc"
652 ostype  :                                               : "bsdi"
653 machtype: defined(M_i386)                               : "i386"
654 machtype: defined(sparc)                                : "sparc"
655 machtype: defined(powerpc)                              : "powerpc"
656 enddef  :
657
658
659 newdef  : defined(COHERENT)
660 comment : COHERENT's unix
661 vendor  : defined(_I386)                                : "intel"
662 hosttype:                                               : "coh386"
663 hosttype:                                               : "coherent"
664 ostype  :                                               : "coherent"
665 machtype: defined(_I386)                                : "i386"
666 enddef  :
667
668 newdef  : defined(concurrent)
669 comment : Concurrent PowerHawk
670 vendor  :                                               : "concurrent"
671 hosttype:                                               : "powerhawk"
672 ostype  :                                               : "powermax_os"
673 machtype:                                               : "powerhawk"
674 enddef  :
675
676 newdef  : defined(SCO)
677 comment : SCO UNIX System V/386 Release 3.2
678 vendor  :                                               : "sco"
679 hosttype:                                               : "sco386"
680 ostype  :                                               : "sco_unix"
681 machtype:                                               : "i386"
682 enddef  :
683
684 newdef  : defined(M_XENIX) && !defined(M_UNIX)
685 comment : SCO XENIX
686 vendor  :                                               : "sco"
687 hosttype:                                               : "sco_xenix"
688 ostype  :                                               : "sco_xenix"
689 machtype: defined(M_I386)                               : "i386"
690 machtype: defined(M_I286)                               : "i286"
691 enddef  :
692
693
694 newdef  : defined(ISC) || defined(ISC202)
695 comment : Interactive Unix
696 vendor  :                                               : "isc"
697 hosttype:                                               : "isc386"
698 ostype  : defined(POSIX)                                : "POSIX"
699 ostype  :                                               : "SVR3"
700 machtype: defined(M_i386)                               : "i386"
701 enddef  :
702
703
704 newdef  : defined(INTEL)
705 comment : Intel Unix
706 vendor  :                                               : "intel"
707 hosttype:                                               : "intel386"
708 ostype  :                                               : "intel_unix"
709 machtype: defined(M_i386)                               : "i386"
710 enddef  :
711
712
713 newdef  : defined(MACH)
714 comment : cmu's mach
715 vendor  :                                               : "cmu"
716 hosttype: defined(M_i386)                               : "i386-mach"
717 ostype  :                                               : "mach"
718 machtype: defined(M_i386)                               : "i386"
719 enddef  :
720
721
722 newdef  : defined(alliant)
723 comment : Alliants FSX
724 vendor  :                                               : "alliant"
725 hosttype: defined(mc68000)                              : "alliant-fx80"
726 hosttype: defined(i860)                                 : "alliant-fx2800"
727 hosttype:                                               : "alliant"
728 ostype  :                                               : "fsx"
729 machtype: defined(mc68000)                              : "mc68000"
730 machtype: defined(i860)                                 : "i860"
731 enddef  :
732
733
734 newdef  : defined(_FTX)
735 comment : Stratus Computer, Inc FTX2 (i860 based)
736 comment : Stratus Computer, Inc FTX3 (HPPA based)
737 vendor  :                                               : "stratus"
738 hosttype: defined(i860) && defined(_FTX)                : "atlantic"
739 hosttype: defined(hppa) && defined(_FTX)                : "continuum"
740 ostype  : defined(i860) && defined(_FTX)                : "ftx2"
741 ostype  : defined(hppa) && defined(_FTX)                : "ftx3"
742 machtype: defined(i860)                                 : "i860"
743 machtype: defined(hppa)                                 : "hppa"
744 enddef  :
745
746
747 newdef  : defined(sequent) || defined(_SEQUENT_)
748 comment : Sequent Balance (32000 based)
749 comment : Sequent Symmetry running DYNIX/ptx (386/486 based)
750 comment : Sequent Symmetry running DYNIX 3 (386/486 based)
751 vendor  :                                               : "sequent"
752 hosttype: defined(M_i386) && defined(sequent)           : "symmetry"
753 hosttype: defined(M_i386)                               : "ptx"
754 hosttype:                                               : "balance"
755 ostype  : defined(M_i386) && !defined(sequent)          : "ptx"
756 ostype  :                                               : "dynix3"
757 machtype: defined(M_i386)                               : "i386"
758 machtype: defined(ns32000)                              : "ns32000"
759 enddef  :
760
761
762 newdef  : defined(ns32000)
763 comment : Encore Computer Corp. Multimax (32000 based)
764 vendor  :                                               : "encore"
765 hosttype: defined(CMUCS)                                : "multimax"
766 hosttype:                                               : isamultimax(0)
767 ostype  : defined(CMUCS)                                : "mach"
768 ostype  :                                               : isamultimax(1)
769 machtype:                                               : "ns32000"
770 enddef  :
771
772
773 newdef  : defined(iconuxv)
774 comment : Icon 88k running Unix
775 vendor  :                                               : "icon"
776 hosttype:                                               : "icon"
777 ostype  :                                               : "iconuxv"
778 machtype: defined(m88k)                                 : "m88k"
779 enddef  :
780
781
782 newdef  : defined(_CRAY) && defined(_CRAYCOM)
783 comment : Cray Computer Corp. running CSOS
784 vendor  :                                               : "ccc"
785 hosttype: defined(_CRAY2)                               : "cray"
786 hosttype: defined(_CRAY3)                               : "cray"
787 hosttype: defined(_CRAY4)                               : "cray"
788 ostype  :                                               : "CSOS"
789 machtype: defined(_CRAY2)                               : "cray2"
790 machtype: defined(_CRAY3)                               : "cray3"
791 machtype: defined(_CRAY4)                               : "cray4"
792 enddef  :
793
794
795 newdef  : defined(cray) && !defined(_CRAYMPP)
796 comment : Cray Research Inc. PVP running UNICOS
797 vendor  :                                               : "cri"
798 hosttype:                                               : getcray()
799 ostype  :                                               : "unicos"
800 machtype:                                               : getcray()
801 enddef  :
802
803
804 newdef  : defined(cray) && defined(_CRAYT3D)
805 comment : Cray Research Inc. running UNICOS MAX
806 vendor  :                                               : "cri"
807 hosttype:                                               : getcray()
808 ostype  :                                               : "unicosmax"
809 machtype:                                               : getcray()
810 enddef  :
811
812
813 newdef  : defined(cray) && defined(_CRAYT3E)
814 comment : Cray Research Inc. running UNICOS/mk
815 vendor  :                                               : "cri"
816 hosttype:                                               : getcray()
817 ostype  :                                               : "unicosmk"
818 machtype:                                               : getcray()
819 enddef  :
820
821
822 newdef  : defined(convex)
823 comment : Convex
824 vendor  :                                               : "convex"
825 hosttype:                                               : "convex"
826 ostype  :                                               : "convexos"
827 machtype:                                               : getconvex()
828 enddef  :
829
830
831 newdef  : defined(butterfly)
832 comment : BBN Butterfly 1000
833 vendor  :                                               : "bbn"
834 hosttype:                                               : "butterfly"
835 machtype: defined(mc68020)                              : "m68k"
836 enddef  :
837
838
839 newdef  : defined(NeXT)
840 comment : NeXTStep
841 vendor  :                                               : "next"
842 hosttype: defined(mc68020)                              : "next"
843 hosttype: defined(M_i386)                               : "intel-pc"
844 hosttype: defined(hppa)                                 : "hp"
845 hosttype: defined(sparc)                                : "sun"
846 ostype  :                                               : "nextstep"
847 machtype: defined(mc68020)                              : "m68k"
848 machtype: defined(M_i386)                               : "i386"
849 machtype: defined(hppa)                                 : "hppa"
850 machtype: defined(sparc)                                : "sparc"
851 enddef  :
852
853
854 newdef  : defined(APPLE) && defined(MACH)
855 comment : OS X
856 vendor  :                                               : "apple"
857 hosttype: defined(i386)                                 : "intel-mac"
858 hosttype: defined(ppc)                                  : "powermac"
859 hosttype: defined(M_amd64)                              : "intel-mac"
860 ostype  :                                               : "darwin"
861 machtype: defined(i386)                                 : "i386"
862 machtype: defined(M_amd64)                              : "x86_64"
863 machtype: defined(ppc)                                  : "powerpc"
864 enddef  :
865
866
867 newdef  : defined(sony_news)
868 comment : Sony NEWS 800 or 1700 workstation
869 vendor  :                                               : "sony"
870 hosttype: defined(mips)                                 : "news_mips"
871 hosttype: defined(mc68020)                              : "news_m68k"
872 ostype  :                                               : "News"
873 machtype: defined(mc68020)                              : "m68k"
874 machtype: defined(M_mipsel)                             : "mipsel"
875 machtype: defined(M_mipseb)                             : "mipseb"
876 enddef  :
877
878
879 newdef  : defined(sgi)
880 comment : Silicon Graphics
881 vendor  :                                               : "sgi"
882 hosttype: defined(M_mipsel)                             : "iris4d"
883 hosttype: defined(M_mipseb)                             : "iris4d"
884 hosttype: defined(mc68000)                              : "iris3d"
885 ostype  :                                               : "irix"
886 machtype: defined(M_mipsel)                             : "mipsel"
887 machtype: defined(M_mipseb)                             : "mipseb"
888 machtype: defined(mc68000)                              : "mc68000"
889 enddef  :
890
891
892 newdef  : defined(ultrix)
893 comment : Digital's Ultrix 
894 vendor  :                                               : "dec"
895 hosttype: defined(M_mipsel)                             : "decstation"
896 hosttype: defined(M_mipseb)                             : "decmips"
897 hosttype: defined(vax)                                  : "vax"
898 ostype  :                                               : "ultrix"
899 machtype: defined(M_mipsel)                             : "mipsel"
900 machtype: defined(M_mipseb)                             : "mipseb"
901 machtype: defined(vax)                                  : "vax"
902 enddef  :
903
904
905 newdef  : defined(MIPS)
906 comment : Mips OS
907 vendor  :                                               : "mips"
908 hosttype: defined(M_mipsel)                             : "mips"
909 hosttype: defined(M_mipseb)                             : "mips"
910 ostype  :                                               : "mips"
911 machtype: defined(M_mipsel)                             : "mipsel"
912 machtype: defined(M_mipseb)                             : "mipseb"
913 enddef  :
914
915
916 newdef  : defined(DECOSF1)
917 comment : Digital's alpha running osf1
918 vendor  :                                               : "dec"
919 ostype  :                                               : "osf1"
920 hosttype: defined(alpha)                                : "alpha"
921 machtype: defined(alpha)                                : "alpha"
922 enddef  :
923
924
925 newdef  : defined(Lynx)
926 comment : Lynx OS 2.1
927 vendor  :                                               : "Lynx"
928 hosttype: defined(M_mipsel)                             : "lynxos-mips"
929 hosttype: defined(M_mipseb)                             : "lynxos-mips"
930 hosttype: defined(M_i386)                               : "lynxos-i386"
931 hosttype: defined(i860)                                 : "lynxos-i860"
932 hosttype: defined(m68k)                                 : "lynxos-m68k"
933 hosttype: defined(m88k)                                 : "lynxos-m88k"
934 hosttype: defined(sparc)                                : "lynxos-sparc"
935 hosttype:                                               : "lynxos-unknown"
936 ostype  :                                               : "LynxOS"
937 machtype: defined(M_mipsel)                             : "mipsel"
938 machtype: defined(M_mipseb)                             : "mipseb"
939 machtype: defined(M_i386)                               : "i386"
940 machtype: defined(i860)                                 : "i860"
941 machtype: defined(m68k)                                 : "m68k"
942 machtype: defined(m88k)                                 : "m88k"
943 machtype: defined(sparc)                                : "sparc"
944 enddef  :
945
946
947 newdef  : defined(masscomp)
948 comment : Masscomp
949 vendor  :                                               : "masscomp"
950 hosttype:                                               : "masscomp"
951 ostype  :                                               : "masscomp"
952 enddef  :
953
954 newdef  : defined(MACHTEN)
955 comment : Machintosh
956 vendor  :                                               : "Tenon"
957 hosttype:                                               : "Macintosh"
958 ostype  :                                               : "MachTen"
959 machtype:                                               : "Macintosh"
960 enddef  :
961
962
963
964 newdef  : defined(GOULD_NP1)
965 comment : Gould
966 vendor  :                                               : "gould"
967 hosttype:                                               : "gould_np1"
968 machtype:                                               : "gould"
969 enddef  :
970
971
972 newdef  : defined(MULTIFLOW)
973 comment : Multiflow running 4.3BSD
974 vendor  :                                               : "multiflow"
975 hosttype:                                               : "multiflow"
976 machtype:                                               : "multiflow"
977 ostype  :                                               : "bsd43"
978 enddef  :
979
980
981 newdef  : defined(SXA)
982 comment : PFU/Fujitsu A-xx computer
983 vendor  :                                               : "sxa"
984 hosttype:                                               : "pfa50"
985 ostype  : defined(_BSDX_)                               : "e60-bsdx"
986 ostype  :                                               : "e60"
987 machtype:                                               : "pfa50"
988 enddef  :
989
990
991 newdef  : defined(titan)
992 comment : (St)Ardent Titan
993 vendor  :                                               : "ardent"
994 hosttype:                                               : "titan"
995 enddef  :
996
997
998 newdef  : defined(stellar)
999 comment : Stellar
1000 vendor  :                                               : "stellar"
1001 hosttype:                                               : "stellar"
1002 ostype  :                                               : "stellix"
1003 enddef  :
1004
1005
1006 newdef  : defined(atari)
1007 comment : Atari TT running SVR4. This machine was never
1008 comment : commercially available.
1009 vendor  :                                               : "atari"
1010 hosttype:                                               : "atari"
1011 ostype  :                                               : "asv"
1012 enddef  :
1013
1014
1015 newdef  : defined(OPUS)
1016 comment : ???
1017 vendor  :                                               : "opus"
1018 hosttype:                                               : "opus"
1019 enddef  :
1020
1021
1022 newdef  : defined(eta10)
1023 comment : ETA running SVR3
1024 vendor  :                                               : "eta"
1025 hosttype:                                               : "eta10"
1026 enddef  :
1027
1028
1029 newdef  : defined(hk68)
1030 comment : Heurikon HK68 running Uniplus+ 5.0
1031 vendor  :                                               : "heurikon"
1032 hosttype:                                               : "hk68"
1033 ostype  :                                               : "uniplus"
1034 enddef  :
1035
1036
1037 newdef  : defined(NDIX)
1038 comment : Norsk Data ND 500/5000 running Ndix
1039 vendor  :                                               : "norsk"
1040 hosttype:                                               : "nd500"
1041 ostype  :                                               : "ndix"
1042 enddef  :
1043
1044
1045 newdef  : defined(AMIGA)
1046 comment : Amiga running AmigaOS+GG
1047 vendor  :                                               : "commodore"
1048 hosttype:                                               : "amiga"
1049 ostype  :                                               : "AmigaOS"
1050 machtype:                                               : "m68k"
1051 enddef  :
1052
1053
1054 newdef  : defined(uts)
1055 comment : Amdahl running uts 2.1
1056 vendor  :                                               : "amdahl"
1057 hosttype:                                               : "amdahl"
1058 ostype  :                                               : "uts"
1059 machtype:                                               : "amdahl"
1060 enddef  :
1061
1062
1063 newdef  : defined(UTek)
1064 comment : Tektronix 4300 running UTek (BSD 4.2 / 68020 based)
1065 vendor  :                                               : "tektronix"
1066 hosttype:                                               : "tek4300"
1067 enddef  :
1068
1069
1070 newdef  : defined(UTekV)
1071 comment : Tektronix XD88/10 running UTekV 3.2e (SVR3/88100 based)
1072 vendor  :                                               : "tektronix"
1073 hosttype:                                               : "tekXD88"
1074 enddef  :
1075
1076
1077 newdef  : defined(DGUX)
1078 comment : Data-General AViiON running DGUX
1079 hosttype:                                               : "aviion"
1080 ostype  :                                               : "dgux"
1081 vendor  :                                               : "dg"
1082 machtype: defined(m88k)                                 : "m88k"
1083 machtype: defined(i386)                                 : "pentium"
1084 enddef  :
1085
1086
1087 newdef  : defined(sysV68)
1088 comment : Motorola MPC running System V/68 R32V2 (SVR3/68020 based)
1089 vendor  :                                               : "motorola"
1090 hosttype:                                               : "sysV68"
1091 machtype:                                               : "m68k"
1092 enddef  :
1093
1094
1095 newdef  : defined(supermax)
1096 comment : DDE Supermax running System V/68 R3 (SVR3/68020 based)
1097 vendor  :                                               : "supermax"
1098 hosttype:                                               : "supermax"
1099 machtype:                                               : "m68k"
1100 enddef  :
1101
1102
1103 newdef  : defined(sysV88)
1104 comment : Motorola MPC running System V/88 R32V2 (SVR3/88100 based)
1105 vendor  :                                               : "motorola"
1106 hosttype:                                               : "sysV88"
1107 machtype:                                               : "m88k"
1108 enddef  :
1109
1110
1111 newdef  : defined(clipper)
1112 comment : Clipper Chipset (Intergraph)
1113 vendor  :                                               : "intergraph"
1114 hosttype:                                               : "clipper"
1115 machtype:                                               : "clipper"
1116 enddef  :
1117
1118 newdef : defined(QNX)
1119 ostype :                                                : "qnx"
1120 enddef :
1121
1122 newdef  : (defined(SNI) || defined(sinix)) && !defined(_OSD_POSIX)
1123 comment : Fujitsu Siemens Computers (former "Siemens Nixdorf Informationssysteme"): SINIX aka. ReliantUNIX, a SVR4 derivative
1124 vendor  :                                               : "fsc"
1125 hosttype: defined(M_intel)                              : "wx200i"
1126 hosttype: defined(MIPSEB)                               : "rm400"
1127 ostype  : defined(sinix)                                : "sinix"
1128 machtype: defined(M_i586)                               : "i586"
1129 machtype: defined(M_i486)                               : "i486"
1130 machtype: defined(M_i386)                               : "i386"
1131 machtype: defined(M_mipsel)                             : "mipsel"
1132 machtype: defined(M_mipseb)                             : "mipseb"
1133 machtype:                                               : "mips"
1134 enddef  :
1135
1136 newdef  : defined(_OSD_POSIX)
1137 comment : Fujitsu Siemens Computers (former "Siemens Nixdorf Informationssysteme"): BS2000 POSIX (mainframe, EBCDIC)
1138 vendor  :                                               : "fsc"
1139 hosttype:                                               : "bs2000"
1140 ostype  :                                               : "osdposix"
1141 machtype: #machine(7500)                                : "s390"
1142 machtype: #machine(mips)                                : "mips"
1143 machtype: #machine(sparc)                               : "sparc"
1144 machtype:                                               : "bs2000"
1145 enddef  :
1146
1147 newdef  : defined(MVS)
1148 comment : ibm uss s/390 (mainframe, EBCDIC)
1149 vendor  :                                               : "ibm"
1150 hosttype:                                               : "s390"
1151 ostype  :                                               : "os390"
1152 machtype:                                               : "s390"
1153 enddef  :
1154
1155 newdef  : defined(_SX)
1156 comment : NEC Corporation (SX-4)
1157 vendor  :                                               : "nec"
1158 ostype  :                                               : "superux"
1159 hosttype:                                               : "sx4"
1160 machtype:                                               : "sx4"
1161 enddef  :
1162
1163 newdef  : !defined(SOLARIS2) && (SYSVREL == 4)
1164 comment : Unix System V Release 4.0
1165 vendor  : defined(DELL)                                 : "dell"
1166 hosttype: defined(M_i386)                               : "i386"
1167 ostype  :                                               : "svr4"
1168 machtype: defined(M_i386)                               : "i386"
1169 enddef  :
1170
1171 newdef  : defined(uxp) || defined(uxps)
1172 comment : FUJITSU DS/90 7000
1173 vendor  :                                               : "fujitsu"
1174 hosttype:                                               : "ds90"
1175 ostype  :                                               : "sysv4"
1176 machtype:                                               : "sparc"
1177 enddef  :
1178
1179 newdef  : defined(CYGWIN)
1180 comment : Cygwin
1181 vendor  : defined(M_intel)                              : "intel"
1182 hosttype:                                               : gethost()
1183 ostype  :                                               : getostype()
1184 machtype:                                               : getmach()
1185 enddef  :
1186
1187 newdef  : defined(_UWIN)
1188 comment : AT&T Research Unix for Windows
1189 vendor  :                                               : "att"
1190 hosttype:                                               : "win32.i386"
1191 machtype:                                               : "i386"
1192 enddef  :
1193
1194
1195 newdef  : defined(mc68000) || defined(mc68k32) || defined(m68k) || defined(mc68010) || defined(mc68020)
1196 hosttype:                                               : "m68k"
1197 vendor  : defined(m68k)                                 : "motorola"
1198 machtype:                                               : "m68k"
1199 enddef  :
1200
1201
1202 newdef  : defined(m88k)
1203 hosttype:                                               : "m88k"
1204 machtype:                                               : "m88k"
1205 enddef  :
1206
1207
1208 newdef  : defined(M_intel)
1209 hosttype: defined(M_i586)                               : "i586"
1210 hosttype: defined(M_i486)                               : "i486"
1211 hosttype: defined(M_i386)                               : "i386"
1212 vendor  :                                               : "intel"
1213 machtype: defined(M_i586)                               : "i586"
1214 machtype: defined(M_i486)                               : "i486"
1215 machtype: defined(M_i386)                               : "i386"
1216 enddef  :
1217
1218
1219 newdef  : defined(sparc)
1220 hosttype:                                               : "sparc"
1221 machtype:                                               : "sparc"
1222 enddef  :
1223
1224
1225 newdef  : defined(i860)
1226 hosttype:                                               : "i860"
1227 machtype:                                               : "i860"
1228 enddef  :
1229
1230
1231 newdef  : defined(osf1)
1232 ostype  :                                               : "osf1"
1233 enddef  :
1234
1235
1236 newdef  : SYSVREL == 0
1237 ostype  : defined(BSD4_4)                               : "bsd44"
1238 ostype  : defined(BSD)                                  : "bsd"
1239 ostype  : defined(POSIX)                                : "posix"
1240 enddef  :
1241
1242
1243 newdef  : SYSVREL == 1
1244 ostype  :                                               : "svr1"
1245 enddef  :
1246
1247
1248 newdef  : SYSVREL == 2
1249 ostype  :                                               : "svr2"
1250 enddef  :
1251
1252
1253 newdef  : SYSVREL == 3
1254 ostype  :                                               : "svr3"
1255 enddef  :
1256
1257
1258 newdef  : SYSVREL == 4
1259 ostype  :                                               : "svr4"
1260 enddef  :
1261
1262
1263 newcode :
1264 #ifndef _hosttype_
1265     hosttype = "unknown";
1266 #endif
1267 #ifndef _ostype_
1268     ostype = "unknown";
1269 #endif
1270 #ifndef _vendor_
1271     vendor = "unknown";
1272 #endif
1273 #ifndef _machtype_
1274     machtype = "unknown";
1275 #endif
1276     tsetenv(STRHOSTTYPE, str2short(hosttype));
1277     tsetenv(STRVENDOR,   str2short(vendor));
1278     tsetenv(STROSTYPE,   str2short(ostype));
1279     tsetenv(STRMACHTYPE, str2short(machtype));
1280 } /* end setmachine */
1281 endcode :