Subversion Repositories pentevo

Rev

Blame | Last modification | View Log | Download | RSS feed | ?url?

  1. #ifndef _SYSDEFS_H
  2. #define _SYSDEFS_H
  3. /* sysdefs.h */
  4. /*****************************************************************************/
  5. /* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only                     */
  6. /*                                                                           */
  7. /* AS Port                                                                   */
  8. /*                                                                           */
  9. /* system-specific definitions                                               */
  10. /*                                                                           */
  11. /* History:  2001-04-13 activated DRSEP for Win32 platform                   */
  12. /*           2001-09-11 added MacOSX                                         */
  13. /*           2001-10-13 added ARM/Linux                                      */
  14. /*                                                                           */
  15. /*****************************************************************************/
  16.  
  17. /* NOTE:
  18.  *
  19.  * when adding new platforms, " gcc -dM -E - <<<'' " might be helpful to
  20.  * find out about predefined symbols
  21.  *
  22.  */
  23.  
  24. #ifdef _MSC_VER
  25. # define __PROTOS__
  26. # define UNUSED(x) (void)x
  27.  
  28. /*
  29.  * Windows systems using Microsoft Visual Studio.
  30.  */
  31. # ifdef _M_ARM
  32. #  define ARCHPRNAME "arm"
  33. # endif
  34. # ifdef _M_ARM64
  35. #  define ARCHPRNAME "arm64"
  36. # endif
  37. # ifdef _M_IX86
  38. #  define ARCHPRNAME "x86"
  39. # endif
  40. # ifdef _M_X64
  41. #  define ARCHPRNAME "x64"
  42. # endif
  43.  
  44. # define ARCHSYSNAME "windows-msvc"
  45.  
  46. # define DEFSMADE
  47. # define OPENRDMODE "rb"
  48. # define OPENWRMODE "wb"
  49. # define OPENUPMODE "rb+"
  50. # define IEEEFLOAT
  51. # define SLASHARGS
  52. # define PATHSEP '\\'
  53. # define SPATHSEP "\\"
  54. # define DIRSEP ';'
  55. # define SDIRSEP ";"
  56. # define DRSEP ':'
  57. # define SDRSEP ":"
  58. # define NULLDEV "NUL"
  59. typedef signed char Integ8;
  60. typedef unsigned char Card8;
  61. typedef signed short Integ16;
  62. typedef unsigned short Card16;
  63. # define HAS16
  64. typedef signed int Integ32;
  65. # define PRIInteg32 "d"
  66. typedef unsigned int Card32;
  67. # ifndef NOLONGLONG
  68. typedef signed long long Integ64;
  69. typedef unsigned long long Card64;
  70. #  define HAS64
  71. # endif
  72. # define W32_NLS
  73. #endif
  74.  
  75. /*---------------------------------------------------------------------------*/
  76. /* unify 68K platforms */
  77.  
  78. #ifdef __mc68020
  79. # ifndef __m68k
  80. #  define __m68k
  81. # endif
  82. #endif
  83.  
  84. #ifdef m68000
  85. # ifndef __m68k
  86. #  define __m68k
  87. # endif
  88. #endif
  89.  
  90. #ifdef __mc68000
  91. # ifndef __m68k
  92. #  define __m68k
  93. # endif
  94. #endif
  95.  
  96. /*---------------------------------------------------------------------------*/
  97. /* ditto for i386 platforms */
  98.  
  99. /* MSDOS only runs on x86s... */
  100.  
  101. #ifdef __MSDOS__
  102. # define __i386
  103. #endif
  104.  
  105. /* For IBMC... */
  106.  
  107. #ifdef _M_I386
  108. # define __i386
  109. #endif
  110.  
  111. #ifdef __i386__
  112. # ifndef __i386
  113. #  define __i386
  114. # endif
  115. #endif
  116.  
  117. /*---------------------------------------------------------------------------*/
  118. /* ditto for VAX platforms */
  119.  
  120. #ifdef vax
  121. # define __vax__
  122. #endif
  123.  
  124. /*---------------------------------------------------------------------------*/
  125. /* ditto for PPC platforms */
  126.  
  127. #ifdef __PPC
  128. # ifndef _POWER
  129. #  define _POWER
  130. # endif
  131. #endif
  132.  
  133. #ifdef __ppc__
  134. # ifndef _POWER
  135. #  define _POWER
  136. # endif
  137. #endif
  138.  
  139. #ifdef __PPC__
  140. # ifndef _POWER
  141. #  define _POWER
  142. # endif
  143. #endif
  144.  
  145. #ifdef __PPC64__
  146. # ifndef _POWER4
  147. #  define _POWER4
  148. # endif
  149. #endif
  150.  
  151. /*---------------------------------------------------------------------------*/
  152. /* ditto for ARM platforms */
  153.  
  154. #ifdef __arm__
  155. # ifndef __arm
  156. #  define __arm
  157. # endif
  158. #endif
  159.  
  160. /*---------------------------------------------------------------------------*/
  161. /* If the compiler claims to be ANSI, we surely can use prototypes */
  162.  
  163. #ifdef __STDC__
  164. # define __PROTOS__
  165. # define UNUSED(x) (void)x
  166. #else
  167. # define UNUSED(x) {}
  168. #endif
  169.  
  170. /*---------------------------------------------------------------------------*/
  171. /* just a hack to allow distinguishing SunOS from Solaris on Sparcs... */
  172.  
  173. #ifdef sparc
  174. # ifndef __sparc
  175. #  define __sparc
  176. # endif
  177. #endif
  178.  
  179. #ifdef __sparc
  180. # ifndef __NetBSD__
  181. #  ifndef __FreeBSD__
  182. #   ifndef __linux__
  183. #    ifndef __SVR4
  184. #     define __sunos__
  185. #    else /* __SVR4 */
  186. #     define __solaris__
  187. #    endif /* __SVR4 */
  188. #   endif /* __linux__ */
  189. #  endif /* __FreeBSD__ */
  190. # endif /* __NetBSD */
  191. #endif /* __sparc */
  192.  
  193. #ifdef __sparc__
  194. # ifndef __sparc
  195. #  define __sparc
  196. # endif
  197. #endif
  198.  
  199. /*---------------------------------------------------------------------------*/
  200. /* similar on Sun 3's... */
  201.  
  202. #ifdef __m68k
  203. # ifndef __NetBSD__
  204. #  ifndef __MUNIX__
  205. #   ifndef __amiga
  206. #    define __sunos__
  207. #   endif
  208. #  endif
  209. # endif
  210. #endif
  211.  
  212. /*===========================================================================*/
  213. /* 68K platforms */
  214.  
  215. #ifdef __m68k
  216.  
  217. #define ARCHPRNAME "m68k"
  218.  
  219. /*---------------------------------------------------------------------------*/
  220. /* SUN/3 with SunOS 4.x:
  221.  
  222.    see my SunOS quarrels in the Sparc section... */
  223.  
  224. #ifdef __sunos__
  225. #define ARCHSYSNAME "sun-sunos"
  226. #define DEFSMADE
  227. #define OPENRDMODE "r"
  228. #define OPENWRMODE "w"
  229. #define OPENUPMODE "r+"
  230. #define IEEEFLOAT
  231. typedef signed char Integ8;
  232. typedef unsigned char Card8;
  233. typedef signed short Integ16;
  234. typedef unsigned short Card16;
  235. #define HAS16
  236. typedef signed int Integ32;
  237. #define PRIInteg32 "d"
  238. typedef unsigned int Card32;
  239. #ifdef __GNUC__
  240. typedef signed long long Integ64;
  241. typedef unsigned long long Card64;
  242. #define HAS64
  243. #else
  244. #define NOLONGLONG
  245. #endif
  246. #define memmove(s1,s2,len) bcopy(s2,s1,len)
  247. extern void bcopy();
  248. #define NO_NLS
  249. #endif
  250.  
  251. /*---------------------------------------------------------------------------*/
  252. /* SUN/3 with NetBSD 1.x:
  253.  
  254.    quite a normal 32-Bit-UNIX system */
  255.  
  256. #ifdef __NetBSD__
  257. #define ARCHSYSNAME "sun-netbsd"
  258. #define DEFSMADE
  259. #define OPENRDMODE "r"
  260. #define OPENWRMODE "w"
  261. #define OPENUPMODE "r+"
  262. #define IEEEFLOAT
  263. typedef signed char Integ8;
  264. typedef unsigned char Card8;
  265. typedef signed short Integ16;
  266. typedef unsigned short Card16;
  267. #define HAS16
  268. typedef signed int Integ32;
  269. #define PRIInteg32 "d"
  270. typedef unsigned int Card32;
  271. typedef signed long long Integ64;
  272. typedef unsigned long long Card64;
  273. #define HAS64
  274. #define LOCALE_NLS
  275. #endif
  276.  
  277. /*---------------------------------------------------------------------------*/
  278. /* PCS/Cadmus:
  279.  
  280.    quite a bare system, lots of work required... */
  281.  
  282. #ifdef __MUNIX__
  283. #define ARCHSYSNAME "pcs-munix"
  284. #define DEFSMADE
  285. #define OPENRDMODE "r"
  286. #define OPENWRMODE "w"
  287. #define OPENUPMODE "r+"
  288. #define IEEEFLOAT
  289. #define NEEDS_STRSTR
  290. typedef char Integ8;
  291. typedef unsigned char Card8;
  292. typedef short Integ16;
  293. typedef unsigned short Card16;
  294. #define HAS16
  295. typedef int Integ32;
  296. #define PRIInteg32 "d"
  297. typedef unsigned int Card32;
  298. #define NOLONGLONG
  299. #define memmove(s1,s2,len) bcopy(s2,s1,len)
  300. extern double strtod();
  301. extern char *getenv();
  302. #define NO_NLS
  303. #endif
  304.  
  305. /*---------------------------------------------------------------------------*/
  306. /* Linux/68K:
  307.  
  308.    quite a normal 32-Bit-UNIX system */
  309.  
  310. #ifdef __linux__
  311. #define ARCHSYSNAME "unknown-linux"
  312. #define DEFSMADE
  313. #define OPENRDMODE "r"
  314. #define OPENWRMODE "w"
  315. #define OPENUPMODE "r+"
  316. #define IEEEFLOAT
  317. typedef signed char Integ8;
  318. typedef unsigned char Card8;
  319. typedef signed short Integ16;
  320. typedef unsigned short Card16;
  321. #define HAS16
  322. typedef signed int Integ32;
  323. #define PRIInteg32 "d"
  324. typedef unsigned int Card32;
  325. typedef signed long long Integ64;
  326. typedef unsigned long long Card64;
  327. #define HAS64
  328. #define NO_NLS
  329. #endif
  330.  
  331. #endif /* __m68k */
  332.  
  333. /*===========================================================================*/
  334. /* SPARC platforms */
  335.  
  336. #ifdef __sparc
  337.  
  338. #define ARCHPRNAME "sparc"
  339.  
  340. /*---------------------------------------------------------------------------*/
  341. /* SUN Sparc with SunOS 4.1.x:
  342.  
  343.    don't try cc, use gcc, it's hopeless without an ANSI-compliant compiler...
  344.    SunOS does have NLS support, but it does not have D_FMT and T_FMT
  345.    I should change this ...
  346.    Though the manual pages claim that memmove and atexit exist, I could not
  347.    find them in any library :-(  Fortunately, bcopy claims to be safe for
  348.    overlapping arrays, we just have to reverse source and destination pointers.
  349.    The sources themselves contain a switch to use on_exit instead of atexit
  350.    (it uses a different callback scheme, so we cannot just make a #define here...)
  351.    To get rid of most of the messages about missing prototypes, add
  352.    -D__USE_FIXED_PROTOTYPES__ to your compiler flags!
  353.    Apart from these few points, one could claim SunOS to be quite a normal
  354.    32-bit-UNIX... */
  355.  
  356. #ifdef __sunos__
  357. #define ARCHSYSNAME "sun-sunos"
  358. #define DEFSMADE
  359. #define OPENRDMODE "r"
  360. #define OPENWRMODE "w"
  361. #define OPENUPMODE "r+"
  362. #define IEEEFLOAT
  363. typedef signed char Integ8;
  364. typedef unsigned char Card8;
  365. typedef signed short Integ16;
  366. typedef unsigned short Card16;
  367. #define HAS16
  368. typedef signed int Integ32;
  369. #define PRIInteg32 "d"
  370. typedef unsigned int Card32;
  371. #ifdef __GNUC__
  372. typedef signed long long Integ64;
  373. typedef unsigned long long Card64;
  374. #define HAS64
  375. #else
  376. #define NOLONGLONG
  377. #endif
  378. #define fpos_t long
  379. #ifdef __STDC__
  380. extern void bcopy();
  381. #endif
  382. #define memmove(s1,s2,len) bcopy(s2,s1,len)
  383. #define NO_NLS
  384. #endif
  385.  
  386. /*---------------------------------------------------------------------------*/
  387. /* SUN Sparc with Solaris 2.x:
  388.  
  389.    quite a normal 32-Bit-UNIX system */
  390.  
  391. #ifdef __solaris__
  392. #define ARCHSYSNAME "sun-solaris"
  393. #define DEFSMADE
  394. #define OPENRDMODE "r"
  395. #define OPENWRMODE "w"
  396. #define OPENUPMODE "r+"
  397. #define IEEEFLOAT
  398. typedef signed char Integ8;
  399. typedef unsigned char Card8;
  400. typedef signed short Integ16;
  401. typedef unsigned short Card16;
  402. #define HAS16
  403. typedef signed int Integ32;
  404. #define PRIInteg32 "d"
  405. typedef unsigned int Card32;
  406. typedef signed long long Integ64;
  407. typedef unsigned long long Card64;
  408. #define HAS64
  409. #define LOCALE_NLS
  410. #endif
  411.  
  412. /*---------------------------------------------------------------------------*/
  413. /* Sparc with NetBSD 1.x:
  414.  
  415.    quite a normal 32-Bit-UNIX system */
  416.  
  417. #ifdef __NetBSD__
  418. #define ARCHSYSNAME "sun-netbsd"
  419. #define DEFSMADE
  420. #define OPENRDMODE "r"
  421. #define OPENWRMODE "w"
  422. #define OPENUPMODE "r+"
  423. #define IEEEFLOAT
  424. typedef signed char Integ8;
  425. typedef unsigned char Card8;
  426. typedef signed short Integ16;
  427. typedef unsigned short Card16;
  428. #define HAS16
  429. typedef signed int Integ32;
  430. #define PRIInteg32 "d"
  431. typedef unsigned int Card32;
  432. typedef signed long long Integ64;
  433. typedef unsigned long long Card64;
  434. #define HAS64
  435. #define LOCALE_NLS
  436. #endif
  437.  
  438. /*---------------------------------------------------------------------------*/
  439. /* Sparc with Linux                                                          */
  440.  
  441. #ifdef __linux__
  442. #define ARCHSYSNAME "unknown-linux"
  443. #define DEFSMADE
  444. #define OPENRDMODE "r"
  445. #define OPENWRMODE "w"
  446. #define OPENUPMODE "r+"
  447. #define IEEEFLOAT
  448. typedef signed char Integ8;
  449. typedef unsigned char Card8;
  450. typedef signed short Integ16;
  451. typedef unsigned short Card16;
  452. #define HAS16
  453. typedef signed int Integ32;
  454. #define PRIInteg32 "d"
  455. typedef unsigned int Card32;
  456. typedef signed long long Integ64;
  457. typedef unsigned long long Card64;
  458. #define HAS64
  459. #define LOCALE_NLS
  460. #endif
  461.  
  462. #endif /* __sparc */
  463.  
  464. /*===========================================================================*/
  465. /* Mips platforms */
  466.  
  467. #ifdef __mips
  468.  
  469. #define ARCHPRNAME "mips"
  470.  
  471. /*---------------------------------------------------------------------------*/
  472. /* R3000 with Ultrix 4.3:
  473.  
  474.    nl_langinfo prototype is there, but no function in library ?!
  475.    use long long only if you have gcc, c89 doesn't like them !
  476.    cc isn't worth trying, believe me! */
  477.  
  478. #ifdef __ultrix
  479. #define ARCHSYSNAME "dec-ultrix"
  480. #define DEFSMADE
  481. #define OPENRDMODE "r"
  482. #define OPENWRMODE "w"
  483. #define OPENUPMODE "r+"
  484. #define IEEEFLOAT
  485. #define NEEDS_STRDUP
  486. typedef signed char Integ8;
  487. typedef unsigned char Card8;
  488. typedef signed short Integ16;
  489. typedef unsigned short Card16;
  490. #define HAS16
  491. typedef signed int Integ32;
  492. #define PRIInteg32 "d"
  493. typedef unsigned int Card32;
  494. #ifdef __GNUC__
  495. typedef signed long long Integ64;
  496. typedef unsigned long long Card64;
  497. #define HAS64
  498. #else
  499. #define NOLONGLONG
  500. #endif
  501. #define NO_NLS
  502. #endif
  503.  
  504. /*---------------------------------------------------------------------------*/
  505. /* R2000/3000 with NetBSD 1.2:
  506.  
  507.    quite a normal 32-Bit-UNIX system */
  508.  
  509. #ifdef __NetBSD__
  510. #define ARCHSYSNAME "dec-netbsd"
  511. #define DEFSMADE
  512. #define OPENRDMODE "r"
  513. #define OPENWRMODE "w"
  514. #define OPENUPMODE "r+"
  515. #define IEEEFLOAT
  516. typedef signed char Integ8;
  517. typedef unsigned char Card8;
  518. typedef signed short Integ16;
  519. typedef unsigned short Card16;
  520. #define HAS16
  521. typedef signed int Integ32;
  522. #define PRIInteg32 "d"
  523. typedef unsigned int Card32;
  524. typedef signed long long Integ64;
  525. typedef unsigned long long Card64;
  526. #define HAS64
  527. #define LOCALE_NLS
  528. #endif
  529.  
  530. /*---------------------------------------------------------------------------*/
  531. /* R3000/4x00 with Irix 5.x:
  532.  
  533.   quite a normal 32-Bit-UNIX system
  534.   seems also to work with 6.2... */
  535.  
  536. #ifdef __sgi
  537. #define ARCHSYSNAME "sgi-irix"
  538. #define DEFSMADE
  539. #define OPENRDMODE "r"
  540. #define OPENWRMODE "w"
  541. #define OPENUPMODE "r+"
  542. #define IEEEFLOAT
  543. typedef signed char Integ8;
  544. typedef unsigned char Card8;
  545. typedef signed short Integ16;
  546. typedef unsigned short Card16;
  547. #define HAS16
  548. typedef signed int Integ32;
  549. #define PRIInteg32 "d"
  550. typedef unsigned int Card32;
  551. typedef signed long long Integ64;
  552. typedef unsigned long long Card64;
  553. #define HAS64
  554. #define LOCALE_NLS
  555. #endif
  556.  
  557. #ifdef __linux__
  558. #define ARCHSYSNAME "unknown-linux"
  559. #define DEFSMADE
  560. #define OPENRDMODE "r"
  561. #define OPENWRMODE "w"
  562. #define OPENUPMODE "r+"
  563. #define IEEEFLOAT
  564. typedef signed char Integ8;
  565. typedef unsigned char Card8;
  566. typedef signed short Integ16;
  567. typedef unsigned short Card16;
  568. #define HAS16
  569. typedef signed int Integ32;
  570. #define PRIInteg32 "d"
  571. typedef unsigned int Card32;
  572. typedef signed long long Integ64;
  573. typedef unsigned long long Card64;
  574. #define HAS64
  575. #define LOCALE_NLS
  576. #endif
  577.  
  578. #endif /* __mips */
  579.  
  580. /*===========================================================================*/
  581. /* HP-PA platforms */
  582.  
  583. #ifdef __hppa
  584.  
  585. #define ARCHPRNAME "parisc"
  586.  
  587. /*---------------------------------------------------------------------------*/
  588. /* HP-PA 1.x with HP-UX: */
  589.  
  590. #ifdef __hpux
  591. #define ARCHSYSNAME "hp-hpux"
  592. #define DEFSMADE
  593. #define OPENRDMODE "r"
  594. #define OPENWRMODE "w"
  595. #define OPENUPMODE "r+"
  596. #define IEEEFLOAT
  597. typedef signed char Integ8;
  598. typedef unsigned char Card8;
  599. typedef signed short Integ16;
  600. typedef unsigned short Card16;
  601. #define HAS16
  602. typedef signed int Integ32;
  603. #define PRIInteg32 "d"
  604. typedef unsigned int Card32;
  605. typedef signed long long Integ64;
  606. typedef unsigned long long Card64;
  607. #define HAS64
  608. #define LOCALE_NLS
  609. #endif
  610.  
  611. #endif /* __hppa */
  612.  
  613. /*===========================================================================*/
  614. /* POWER 64 bit platforms */
  615.  
  616. #ifdef _POWER64
  617.  
  618. #define ARCHPRNAME "ppc64"
  619.  
  620. /*---------------------------------------------------------------------------*/
  621. /* POWER64 with Linux (Macintosh) */
  622.  
  623. #ifdef __linux__
  624.  
  625. #define ARCHSYSNAME "unknown-linux"
  626. #define DEFSMADE
  627. #define OPENRDMODE "r"
  628. #define OPENWRMODE "w"
  629. #define OPENUPMODE "r+"
  630. #define IEEEFLOAT
  631. typedef signed char Integ8;
  632. typedef unsigned char Card8;
  633. typedef signed short Integ16;
  634. typedef unsigned short Card16;
  635. #define HAS16
  636. typedef signed int Integ32;
  637. #define PRIInteg32 "d"
  638. typedef unsigned int Card32;
  639. typedef signed long Integ64;
  640. typedef unsigned long Card64;
  641. #define HAS64
  642. #define LOCALE_NLS
  643. #endif
  644.  
  645. /*===========================================================================*/
  646. /* POWER(32) platforms */
  647.  
  648. #elif defined _POWER
  649.  
  650. #define ARCHPRNAME "ppc"
  651.  
  652. /*---------------------------------------------------------------------------*/
  653. /* POWER with AIX 4.1: rs6000 */
  654.  
  655. #ifdef _AIX
  656. #define ARCHSYSNAME "ibm-aix"
  657. #define DEFSMADE
  658. #define OPENRDMODE "r"
  659. #define OPENWRMODE "w"
  660. #define OPENUPMODE "r+"
  661. #define IEEEFLOAT
  662. typedef signed char Integ8;
  663. typedef unsigned char Card8;
  664. typedef signed short Integ16;
  665. typedef unsigned short Card16;
  666. #define HAS16
  667. typedef signed int Integ32;
  668. #define PRIInteg32 "d"
  669. typedef unsigned int Card32;
  670. typedef signed long long Integ64;
  671. typedef unsigned long long Card64;
  672. #define HAS64
  673. #define LOCALE_NLS
  674. #endif
  675.  
  676. /*---------------------------------------------------------------------------*/
  677. /* POWER with Linux (Macintosh) */
  678.  
  679. #ifdef __linux__
  680.  
  681. /* no long long data type if C89 is used */
  682.  
  683. #if (defined __STDC__) && (!defined __STDC_VERSION__)
  684. # define NOLONGLONG
  685. #endif
  686.  
  687. #define ARCHSYSNAME "unknown-linux"
  688. #define DEFSMADE
  689. #define OPENRDMODE "r"
  690. #define OPENWRMODE "w"
  691. #define OPENUPMODE "r+"
  692. #define IEEEFLOAT
  693. typedef signed char Integ8;
  694. typedef unsigned char Card8;
  695. typedef signed short Integ16;
  696. typedef unsigned short Card16;
  697. #define HAS16
  698. typedef signed int Integ32;
  699. #define PRIInteg32 "d"
  700. typedef unsigned int Card32;
  701. #ifndef NOLONGLONG
  702. typedef signed long long Integ64;
  703. typedef unsigned long long Card64;
  704. # define HAS64
  705. #endif /* !NOLONGLONG */
  706. #define LOCALE_NLS
  707. #endif
  708.  
  709. /*---------------------------------------------------------------------------*/
  710. /* POWER with OSX (Macintosh) */
  711.  
  712. #ifdef __APPLE__
  713. #define ARCHSYSNAME "apple-macosx"
  714. #define DEFSMADE
  715. #define OPENRDMODE "r"
  716. #define OPENWRMODE "w"
  717. #define OPENUPMODE "r+"
  718. #define IEEEFLOAT
  719. typedef signed char Integ8;
  720. typedef unsigned char Card8;
  721. typedef signed short Integ16;
  722. typedef unsigned short Card16;
  723. #define HAS16
  724. typedef signed int Integ32;
  725. #define PRIInteg32 "d"
  726. typedef unsigned int Card32;
  727. typedef signed long long Integ64;
  728. typedef unsigned long long Card64;
  729. #define HAS64
  730. #define NO_NLS
  731. #endif
  732.  
  733. #endif /* _POWER */
  734.  
  735. /*===========================================================================*/
  736. /* VAX platforms */
  737.  
  738. #ifdef __vax__
  739.  
  740. #define ARCHPRNAME "vax"
  741.  
  742. /*---------------------------------------------------------------------------*/
  743. /* VAX with Ultrix: */
  744.  
  745. #ifdef ultrix
  746. #define ARCHSYSNAME "dec-ultrix"
  747. #define DEFSMADE
  748. #define OPENRDMODE "r"
  749. #define OPENWRMODE "w"
  750. #define OPENUPMODE "r+"
  751. #define HOST_DECFLOAT
  752. #define NEEDS_STRDUP
  753. #define BKOKEN_SPRINTF
  754. typedef signed char Integ8;
  755. typedef unsigned char Card8;
  756. typedef signed short Integ16;
  757. typedef unsigned short Card16;
  758. #define HAS16
  759. typedef signed int Integ32;
  760. #define PRIInteg32 "d"
  761. typedef unsigned int Card32;
  762. #define NOLONGLONG
  763. #define NO_NLS
  764. #endif
  765.  
  766. /*---------------------------------------------------------------------------*/
  767. /* VAX with NetBSD 1.x:
  768.  
  769.    quite a normal 32-Bit-UNIX system - apart from the float format... */
  770.  
  771. #ifdef __NetBSD__
  772. #define ARCHSYSNAME "vax-netbsd"
  773. #define DEFSMADE
  774. #define OPENRDMODE "r"
  775. #define OPENWRMODE "w"
  776. #define OPENUPMODE "r+"
  777. #define HOST_DECFLOAT
  778. typedef signed char Integ8;
  779. typedef unsigned char Card8;
  780. typedef signed short Integ16;
  781. typedef unsigned short Card16;
  782. #define HAS16
  783. typedef signed int Integ32;
  784. #define PRIInteg32 "d"
  785. typedef unsigned int Card32;
  786. typedef signed long long Integ64;
  787. typedef unsigned long long Card64;
  788. #define HAS64
  789. #define LOCALE_NLS
  790. #endif
  791.  
  792. #endif /* vax */
  793.  
  794. #ifdef __aarch64__
  795.  
  796. #define ARCHPRNAME "aarch64"
  797.  
  798. /*---------------------------------------------------------------------------*/
  799. /* AArch64 with Linux and GCC: */
  800.  
  801. #ifdef __linux__
  802. #define ARCHSYSNAME "unknown-linux"
  803. #define DEFSMADE
  804. #define OPENRDMODE "r"
  805. #define OPENWRMODE "w"
  806. #define OPENUPMODE "r+"
  807. #define IEEEFLOAT
  808. typedef signed char Integ8;
  809. typedef unsigned char Card8;
  810. typedef signed short Integ16;
  811. typedef unsigned short Card16;
  812. #define HAS16
  813. typedef signed int Integ32;
  814. #define PRIInteg32 "d"
  815. typedef unsigned int Card32;
  816. typedef signed long Integ64;
  817. typedef unsigned long Card64;
  818. #define HAS64
  819. #define LOCALE_NLS
  820. #endif
  821.  
  822. /*---------------------------------------------------------------------------*/
  823. /* AArch64 with macOS (Apple M-series CPU) */
  824.  
  825. #ifdef __APPLE__
  826. #define ARCHSYSNAME "apple-darwin"
  827. #define DEFSMADE
  828. #define OPENRDMODE "r"
  829. #define OPENWRMODE "w"
  830. #define OPENUPMODE "r+"
  831. #define IEEEFLOAT
  832. typedef signed char Integ8;
  833. typedef unsigned char Card8;
  834. typedef signed short Integ16;
  835. typedef unsigned short Card16;
  836. #define HAS16
  837. typedef signed int Integ32;
  838. #define PRIInteg32 "d"
  839. typedef unsigned int Card32;
  840. typedef signed long Integ64;
  841. typedef unsigned long Card64;
  842. #define HAS64
  843. #define LOCALE_NLS
  844. #endif
  845.  
  846. #endif /* __aarch64__ */
  847.  
  848. /*===========================================================================*/
  849. /* DEC Alpha platforms */
  850.  
  851. #ifdef __alpha
  852.  
  853. #define ARCHPRNAME "alpha"
  854.  
  855. /*---------------------------------------------------------------------------*/
  856. /* DEC Alpha with Digital UNIX and DEC C / GCC:
  857.  
  858.    Alpha is a 64 bit machine, so we do not need to use extra longs
  859.    OSF has full NLS support */
  860.  
  861. #ifdef __osf__
  862. #define ARCHSYSNAME "dec-osf"
  863. #define DEFSMADE
  864. #define OPENRDMODE "r"
  865. #define OPENWRMODE "w"
  866. #define OPENUPMODE "r+"
  867. #define IEEEFLOAT
  868. typedef signed char Integ8;
  869. typedef unsigned char Card8;
  870. typedef signed short Integ16;
  871. typedef unsigned short Card16;
  872. #define HAS16
  873. typedef signed int Integ32;
  874. #define PRIInteg32 "d"
  875. typedef unsigned int Card32;
  876. typedef signed long Integ64;
  877. typedef unsigned long Card64;
  878. #define HAS64
  879. #define LOCALE_NLS
  880. #endif
  881.  
  882. /*---------------------------------------------------------------------------*/
  883. /* DEC Alpha with Linux and GCC:
  884.  
  885.    see OSF... */
  886.  
  887. #ifdef __linux__
  888. #define ARCHSYSNAME "unknown-linux"
  889. #define DEFSMADE
  890. #define OPENRDMODE "r"
  891. #define OPENWRMODE "w"
  892. #define OPENUPMODE "r+"
  893. #define IEEEFLOAT
  894. typedef signed char Integ8;
  895. typedef unsigned char Card8;
  896. typedef signed short Integ16;
  897. typedef unsigned short Card16;
  898. #define HAS16
  899. typedef signed int Integ32;
  900. #define PRIInteg32 "d"
  901. typedef unsigned int Card32;
  902. typedef signed long Integ64;
  903. typedef unsigned long Card64;
  904. #define HAS64
  905. #define LOCALE_NLS
  906. #endif
  907.  
  908. /*---------------------------------------------------------------------------*/
  909. /* DEC Alpha with NetBSD and GCC:
  910.  
  911.    see OSF... */
  912.  
  913. #ifdef __NetBSD__
  914. #define ARCHSYSNAME "unknown-netbsd"
  915. #define DEFSMADE
  916. #define OPENRDMODE "r"
  917. #define OPENWRMODE "w"
  918. #define OPENUPMODE "r+"
  919. #define IEEEFLOAT
  920. typedef signed char Integ8;
  921. typedef unsigned char Card8;
  922. typedef signed short Integ16;
  923. typedef unsigned short Card16;
  924. #define HAS16
  925. typedef signed int Integ32;
  926. #define PRIInteg32 "d"
  927. typedef unsigned int Card32;
  928. typedef signed long Integ64;
  929. typedef unsigned long Card64;
  930. #define HAS64
  931. #define LOCALE_NLS
  932. #endif
  933.  
  934. #ifdef __FreeBSD__
  935. #define ARCHSYSNAME "unknown-freebsd"
  936. #define DEFSMADE
  937. #define OPENRDMODE "r"
  938. #define OPENWRMODE "w"
  939. #define OPENUPMODE "r+"
  940. #define IEEEFLOAT
  941. typedef signed char Integ8;
  942. typedef unsigned char Card8;
  943. typedef signed short Integ16;
  944. typedef unsigned short Card16;
  945. #define HAS16
  946. typedef signed int Integ32;
  947. #define PRIInteg32 "d"
  948. typedef unsigned int Card32;
  949. typedef signed long Integ64;
  950. typedef unsigned long Card64;
  951. #define HAS64
  952. #define NO_NLS
  953. #endif
  954.  
  955. #endif /* __alpha */
  956.  
  957. /*===========================================================================*/
  958. /* Intel i386 platforms */
  959.  
  960. #ifdef __i386
  961.  
  962. #define ARCHPRNAME "i386"
  963.  
  964. /*---------------------------------------------------------------------------*/
  965. /* Intel i386 with NetBSD 1. and GCC: (tested on 1.5.3)
  966.  
  967.    principally, a normal 32-bit UNIX */
  968.  
  969. #ifdef __NetBSD__
  970. #define ARCHSYSNAME "i386-netbsd"
  971. #define DEFSMADE
  972. #define OPENRDMODE "r"
  973. #define OPENWRMODE "w"
  974. #define OPENUPMODE "r+"
  975. #define IEEEFLOAT
  976. typedef signed char Integ8;
  977. typedef unsigned char Card8;
  978. typedef signed short Integ16;
  979. typedef unsigned short Card16;
  980. #define HAS16
  981. typedef signed int Integ32;
  982. #define PRIInteg32 "d"
  983. typedef unsigned int Card32;
  984. typedef signed long long Integ64;
  985. typedef unsigned long long Card64;
  986. #define HAS64
  987. #define LOCALE_NLS
  988. #endif
  989.  
  990. /*---------------------------------------------------------------------------*/
  991. /* Intel i386 with Linux and GCC:
  992.  
  993.    principally, a normal 32-bit *NIX */
  994.  
  995. #ifdef __linux__
  996.  
  997. /* no long long data type if C89 is used */
  998.  
  999. #if (defined __STDC__) && (!defined __STDC_VERSION__)
  1000. # define NOLONGLONG
  1001. #endif
  1002.  
  1003. #define ARCHSYSNAME "unknown-linux"
  1004. #define DEFSMADE
  1005. #define OPENRDMODE "r"
  1006. #define OPENWRMODE "w"
  1007. #define OPENUPMODE "r+"
  1008. #define IEEEFLOAT
  1009. typedef signed char Integ8;
  1010. typedef unsigned char Card8;
  1011. typedef signed short Integ16;
  1012. typedef unsigned short Card16;
  1013. #define HAS16
  1014. typedef signed int Integ32;
  1015. #define PRIInteg32 "d"
  1016. typedef unsigned int Card32;
  1017. #ifndef NOLONGLONG
  1018. typedef signed long long Integ64;
  1019. typedef unsigned long long Card64;
  1020. #define HAS64
  1021. #endif /* !NOLONGLONG */
  1022. #define LOCALE_NLS
  1023. #endif
  1024.  
  1025. /*---------------------------------------------------------------------------*/
  1026. /* Intel i386 with FreeBSD and GCC:
  1027.  
  1028.    principally, a normal 32-bit *NIX */
  1029.  
  1030. #ifdef __FreeBSD__
  1031. #define ARCHSYSNAME "unknown-freebsd"
  1032. #define DEFSMADE
  1033. #define OPENRDMODE "r"
  1034. #define OPENWRMODE "w"
  1035. #define OPENUPMODE "r+"
  1036. #define IEEEFLOAT
  1037. typedef signed char Integ8;
  1038. typedef unsigned char Card8;
  1039. typedef signed short Integ16;
  1040. typedef unsigned short Card16;
  1041. #define HAS16
  1042. typedef signed int Integ32;
  1043. #define PRIInteg32 "d"
  1044. typedef unsigned int Card32;
  1045. typedef signed long long Integ64;
  1046. typedef unsigned long long Card64;
  1047. #define HAS64
  1048. #define NO_NLS
  1049. #endif
  1050.  
  1051. /*---------------------------------------------------------------------------*/
  1052. /* Intel i386 with Darwin and GCC:
  1053.    principally, a normal 32-bit *NIX */
  1054.  
  1055. #ifdef __APPLE__
  1056. #define ARCHSYSNAME "apple-osx"
  1057. #define DEFSMADE
  1058. #define OPENRDMODE "r"
  1059. #define OPENWRMODE "w"
  1060. #define OPENUPMODE "r+"
  1061. #define IEEEFLOAT
  1062. typedef signed char Integ8;
  1063. typedef unsigned char Card8;
  1064. typedef signed short Integ16;
  1065. typedef unsigned short Card16;
  1066. #define HAS16
  1067. typedef signed int Integ32;
  1068. #define PRIInteg32 "d"
  1069. typedef unsigned int Card32;
  1070. typedef signed long long Integ64;
  1071. typedef unsigned long long Card64;
  1072. #define HAS64
  1073. #define LOCALE_NLS
  1074. #endif
  1075.  
  1076. /*---------------------------------------------------------------------------*/
  1077. /* Intel i386 with Windows and Cygnus GCC:
  1078.  
  1079.    well, not really a UNIX... */
  1080.  
  1081. #ifdef _WIN32
  1082.  
  1083. /* no long long data type if C89 is used */
  1084.  
  1085. #if (defined __STDC__) && (!defined __STDC_VERSION__)
  1086. # define NOLONGLONG
  1087. #endif
  1088.  
  1089. #define ARCHSYSNAME "unknown-win32"
  1090. #define DEFSMADE
  1091. #define OPENRDMODE "rb"
  1092. #define OPENWRMODE "wb"
  1093. #define OPENUPMODE "rb+"
  1094. #define IEEEFLOAT
  1095. #define SLASHARGS
  1096. #define PATHSEP '\\'
  1097. #define SPATHSEP "\\"
  1098. #define DIRSEP ';'
  1099. #define SDIRSEP ";"
  1100. #define DRSEP ':'
  1101. #define SDRSEP ":"
  1102. #define NULLDEV "NUL"
  1103. typedef signed char Integ8;
  1104. typedef unsigned char Card8;
  1105. typedef signed short Integ16;
  1106. typedef unsigned short Card16;
  1107. #define HAS16
  1108. typedef signed int Integ32;
  1109. #define PRIInteg32 "d"
  1110. typedef unsigned int Card32;
  1111. #ifndef NOLONGLONG
  1112. typedef signed long long Integ64;
  1113. typedef unsigned long long Card64;
  1114. # define HAS64
  1115. #endif
  1116. #define W32_NLS
  1117. #endif
  1118.  
  1119. /*---------------------------------------------------------------------------*/
  1120. /* Intel i386 with OS/2 and emx-GCC:
  1121.  
  1122.    well, not really a UNIX... */
  1123.  
  1124. #ifdef __EMX__
  1125. #define ARCHSYSNAME "unknown-os2"
  1126. #define DEFSMADE
  1127. #define OPENRDMODE "rb"
  1128. #define OPENWRMODE "wb"
  1129. #define OPENUPMODE "rb+"
  1130. #define IEEEFLOAT
  1131. #define SLASHARGS
  1132. #define PATHSEP '\\'
  1133. #define SPATHSEP "\\"
  1134. #define DIRSEP ';'
  1135. #define SDIRSEP ";"
  1136. #define DRSEP ':'
  1137. #define SDRSEP ":"
  1138. #define NULLDEV "NUL"
  1139. typedef signed char Integ8;
  1140. typedef unsigned char Card8;
  1141. typedef signed short Integ16;
  1142. typedef unsigned short Card16;
  1143. #define HAS16
  1144. typedef signed int Integ32;
  1145. #define PRIInteg32 "d"
  1146. typedef unsigned int Card32;
  1147. typedef signed long long Integ64;
  1148. typedef unsigned long long Card64;
  1149. #define HAS64
  1150. #define OS2_NLS
  1151. #endif
  1152.  
  1153. /*---------------------------------------------------------------------------*/
  1154. /* Intel i386 with OS/2 and IBMC:
  1155.  
  1156. well, not really a UNIX... */
  1157.  
  1158. #ifdef __IBMC__
  1159. #define DEFSMADE
  1160. #define NODUP
  1161. #define OPENRDMODE "rb"
  1162. #define OPENWRMODE "wb"
  1163. #define OPENUPMODE "rb+"
  1164. #define IEEEFLOAT
  1165. #define SLASHARGS
  1166. #define PATHSEP '\\'
  1167. #define SPATHSEP "\\"
  1168. #define DRSEP ':'
  1169. #define SDRSEP ":"
  1170. #define NULLDEV "NUL"
  1171. typedef signed char Integ8;
  1172. typedef unsigned char Card8;
  1173. typedef signed short Integ16;
  1174. typedef unsigned short Card16;
  1175. #define HAS16
  1176. typedef signed int Integ32;
  1177. #define PRIInteg32 "d"
  1178. typedef unsigned int Card32;
  1179. #define NOLONGLONG
  1180. #define OS2_NLS
  1181. #endif
  1182.  
  1183. /*---------------------------------------------------------------------------*/
  1184. /* Intel x86 with MS-DOS and Borland-C:
  1185.  
  1186.    well, not really a UNIX...
  1187.    assure we get a usable memory model */
  1188.  
  1189. #ifdef __MSDOS__
  1190. #ifdef __TURBOC__
  1191. #ifndef __LARGE__
  1192. #error Wrong memory model - use large!
  1193. #endif
  1194. #undef ARCHPRNAME
  1195. #ifdef __DPMI16__
  1196. #define ARCHPRNAME "i286"
  1197. #define ARCHSYSNAME "unknown-dpmi"
  1198. #else
  1199. #define ARCHPRNAME "i86"
  1200. #define ARCHSYSNAME "unknown-msdos"
  1201. #endif
  1202. #define CKMALLOC
  1203. #define HEAPRESERVE 4096
  1204. #define DEFSMADE
  1205. #define OPENRDMODE "rb"
  1206. #define OPENWRMODE "wb"
  1207. #define OPENUPMODE "rb+"
  1208. #define IEEEFLOAT
  1209. #define SLASHARGS
  1210. #define PATHSEP '\\'
  1211. #define SPATHSEP "\\"
  1212. #define DIRSEP ';'
  1213. #define SDIRSEP ";"
  1214. #define DRSEP ':'
  1215. #define SDRSEP ":"
  1216. #define NULLDEV "NUL"
  1217. typedef signed char Integ8;
  1218. typedef unsigned char Card8;
  1219. typedef signed short Integ16;
  1220. typedef unsigned short Card16;
  1221. #define HAS16
  1222. typedef signed long Integ32;
  1223. #define PRIInteg32 "ld"
  1224. typedef unsigned long Card32;
  1225. #define NOLONGLONG
  1226. #define DOS_NLS
  1227. #define __PROTOS__
  1228. #undef UNUSED
  1229. #define UNUSED(x) (void)x
  1230. #endif
  1231. #endif
  1232.  
  1233. #endif /* __i386 */
  1234.  
  1235.  
  1236. /*===========================================================================*/
  1237. /* Intel x86_64 platforms */
  1238.  
  1239. #if  (defined __k8__) || (defined __x86_64) || (defined __x86_64__)
  1240.  
  1241. #define ARCHPRNAME "x86_64"
  1242.  
  1243. /*---------------------------------------------------------------------------*/
  1244. /* x86-64/amd64 with Linux/FreeBSD, OSX and GCC:
  1245.  
  1246.    Principally, a normal *NIX. */
  1247.  
  1248. #if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
  1249.  
  1250. /* no long long data type if C89 is used */
  1251.  
  1252. #if (defined __STDC__) && (!defined __STDC_VERSION__)
  1253. # define NOLONGLONG
  1254. #endif
  1255.  
  1256. #ifdef __linux__
  1257. #define ARCHSYSNAME "unknown-linux"
  1258. #elif defined __FreeBSD__
  1259. #define ARCHSYSNAME "unknown-freebsd"
  1260. #elif defined __NetBSD__
  1261. #define ARCHSYSNAME "unknown-netbsd"
  1262. #else
  1263. #define ARCHSYSNAME "apple-osx"
  1264. #endif
  1265.  
  1266. #define DEFSMADE
  1267. #define OPENRDMODE "r"
  1268. #define OPENWRMODE "w"
  1269. #define OPENUPMODE "r+"
  1270. #define IEEEFLOAT
  1271. typedef signed char Integ8;
  1272. typedef unsigned char Card8;
  1273. typedef signed short Integ16;
  1274. typedef unsigned short Card16;
  1275. #define HAS16
  1276. typedef signed int Integ32;
  1277. #define PRIInteg32 "d"
  1278. typedef unsigned int Card32;
  1279. typedef signed long Integ64;
  1280. typedef unsigned long Card64;
  1281. #define HAS64
  1282. #define LOCALE_NLS
  1283.  
  1284. #endif /* __linux__ || __FreeBSD__ || __NetBSD__ || __APPLE__ */
  1285.  
  1286. /*---------------------------------------------------------------------------*/
  1287. /* Intel i386 with WIN32 and MinGW:
  1288.  
  1289.    Well, not really a UNIX...note that in contrast to Unix-like systems,
  1290.    the size of 'long' remains 32 bit.  One still has to use 'long long' to
  1291.    get 64 bits. */
  1292.  
  1293. #ifdef _WIN32
  1294.  
  1295. /* no long long data type if C89 is used */
  1296.  
  1297. #if (defined __STDC__) && (!defined __STDC_VERSION__)
  1298. # define NOLONGLONG
  1299. #endif
  1300.  
  1301. #define ARCHSYSNAME "unknown-win64"
  1302. #define DEFSMADE
  1303. #define OPENRDMODE "rb"
  1304. #define OPENWRMODE "wb"
  1305. #define OPENUPMODE "rb+"
  1306. #define IEEEFLOAT
  1307. #define SLASHARGS
  1308. #define PATHSEP '\\'
  1309. #define SPATHSEP "\\"
  1310. #define DIRSEP ';'
  1311. #define SDIRSEP ";"
  1312. #define DRSEP ':'
  1313. #define SDRSEP ":"
  1314. #define NULLDEV "NUL"
  1315. typedef signed char Integ8;
  1316. typedef unsigned char Card8;
  1317. typedef signed short Integ16;
  1318. typedef unsigned short Card16;
  1319. #define HAS16
  1320. typedef signed int Integ32;
  1321. #define PRIInteg32 "d"
  1322. typedef unsigned int Card32;
  1323. #ifndef NOLONGLONG
  1324. typedef signed long long Integ64;
  1325. typedef unsigned long long Card64;
  1326. # define HAS64
  1327. #endif
  1328. #define NO_NLS
  1329.  
  1330. #endif /* _WIN32 */
  1331.  
  1332. #endif /* __k8__ || __x86_64 || __x86_64__ */
  1333.  
  1334. /*===========================================================================*/
  1335. /* ARM platform */
  1336.  
  1337. #ifdef __arm
  1338.  
  1339. #define ARCHPRNAME "arm"
  1340.  
  1341. /*---------------------------------------------------------------------------*/
  1342. /* ARM linux with GCC */
  1343.  
  1344. #ifdef __linux__
  1345. #define ARCHSYSNAME "unknown-linux-arm"
  1346. #define DEFSMADE
  1347. #define OPENRDMODE "r"
  1348. #define OPENWRMODE "w"
  1349. #define OPENUPMODE "r+"
  1350. #define IEEEFLOAT
  1351. typedef signed char Integ8;
  1352. typedef unsigned char Card8;
  1353. typedef signed short Integ16;
  1354. typedef unsigned short Card16;
  1355. #define HAS16
  1356. typedef signed int Integ32;
  1357. #define PRIInteg32 "d"
  1358. typedef unsigned int Card32;
  1359. typedef signed long long Integ64;
  1360. typedef unsigned long long Card64;
  1361. #define HAS64
  1362. #define LOCALE_NLS
  1363. #endif /* __linux__ */
  1364.  
  1365. /*---------------------------------------------------------------------------*/
  1366. /* Psion PDA (ARM cpu) with SymbianOS Epoc32 rel.5 and installed epocemx-GCC:
  1367.  
  1368.    well, not really a UNIX... */
  1369.  
  1370. #ifdef __EPOC32__
  1371.  
  1372. #ifdef __EPOCEMX__
  1373. #define ARCHSYSNAME "psion-epoc32-epocemx"
  1374. #define DEFSMADE
  1375. #define OPENRDMODE "r"
  1376. #define OPENWRMODE "w"
  1377. #define OPENUPMODE "r+"
  1378. #define IEEEFLOAT
  1379. typedef signed char Integ8;
  1380. typedef unsigned char Card8;
  1381. typedef signed short Integ16;
  1382. typedef unsigned short Card16;
  1383. #define HAS16
  1384. typedef signed int Integ32;
  1385. #define PRIInteg32 "d"
  1386. typedef unsigned int Card32;
  1387. typedef signed long long Integ64;
  1388. typedef unsigned long long Card64;
  1389. #define HAS64
  1390. #define NO_NLS
  1391. #endif /* __EPOCEMX__ */
  1392.  
  1393.  
  1394. #endif /* __EPOC32__ */
  1395.  
  1396. #endif /* __arm */
  1397.  
  1398. /*===========================================================================*/
  1399. /* RISC-V platform */
  1400.  
  1401. #ifdef __riscv
  1402.  
  1403. #define ARCHPRNAME "riscv"
  1404.  
  1405. /*---------------------------------------------------------------------------*/
  1406. /* RISC-V linux with GCC */
  1407.  
  1408. #ifdef __linux__
  1409. #define ARCHSYSNAME "unknown-linux-riscv"
  1410. #define DEFSMADE
  1411. #define OPENRDMODE "r"
  1412. #define OPENWRMODE "w"
  1413. #define OPENUPMODE "r+"
  1414. #define IEEEFLOAT
  1415. typedef signed char Integ8;
  1416. typedef unsigned char Card8;
  1417. typedef signed short Integ16;
  1418. typedef unsigned short Card16;
  1419. #define HAS16
  1420. typedef signed int Integ32;
  1421. #define PRIInteg32 "d"
  1422. typedef unsigned int Card32;
  1423. typedef signed long long Integ64;
  1424. typedef unsigned long long Card64;
  1425. #define HAS64
  1426. #define LOCALE_NLS
  1427. #endif /* __linux__ */
  1428.  
  1429. #endif /* __riscv */
  1430.  
  1431. /*===========================================================================*/
  1432. /* Misc... */
  1433.  
  1434. /*---------------------------------------------------------------------------*/
  1435. /* Just for curiosity, it won't work without 16 bit int's... */
  1436.  
  1437. #ifdef _CRAYMPP
  1438. #define OPENRDMODE "r"
  1439. #define OPENWRMODE "w"
  1440. #define OPENUPMODE "r+"
  1441. #define IEEEFLOAT
  1442. typedef signed char Integ8;
  1443. typedef unsigned char Card8;
  1444. typedef signed short Integ32;
  1445. #define PRIInteg32 "d"
  1446. typedef unsigned short Card32;
  1447. typedef signed int Integ64;
  1448. typedef unsigned int Card64;
  1449. #define HAS64
  1450. #define LOCALE_NLS
  1451. #endif
  1452.  
  1453. /*===========================================================================*/
  1454. /* Post-Processing: check for definition, add defaults */
  1455.  
  1456.  
  1457. #ifdef DEFSMADE
  1458. #ifndef PATHSEP
  1459. #define PATHSEP '/'
  1460. #define SPATHSEP "/"
  1461. #define DIRSEP ':'
  1462. #define SDIRSEP ":"
  1463. #endif
  1464. #ifndef NULLDEV
  1465. #define NULLDEV "/dev/null"
  1466. #endif
  1467. #else
  1468. #error "your platform so far is not included in AS's header files!"
  1469. #error "please edit sysdefs.h!"
  1470. #endif
  1471.  
  1472. #ifdef CKMALLOC
  1473. #define malloc(s) ckmalloc(s)
  1474. #define realloc(p,s) ckrealloc(p,s)
  1475.  
  1476. #include <stddef.h>
  1477.  
  1478. extern void *ckmalloc(size_t s);
  1479.  
  1480. extern void *ckrealloc(void *p, size_t s);
  1481. #endif
  1482. #endif /* _SYSDEFS_H */
  1483.