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