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