/contrib/tcsh/host.defs

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 1247 lines · 1026 code · 221 blank · 0 comment · 0 complexity · d4e7234c5140d706e77c3379bdee020c MD5 · raw file

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