Finish initial Haiku port

This commit is contained in:
Lassi Kortela 2019-10-14 03:52:46 +03:00
parent 7531e36dcc
commit 6c02b18076
3 changed files with 12 additions and 0 deletions

View File

@ -30,3 +30,4 @@ system C compiler. 64-bit and 32-bit builds work. Supported operating systems:
** DragonFly BSD (gcc)
* Solaris (gcc)
* Minix (clang)
* Haiku (gcc)

View File

@ -5,6 +5,16 @@ typedef intptr_t fixnum_t;
#define SCHEME_C_COMPILER_NAME "GCC" // TODO: wrong
#define SCHEME_C_COMPILER_VERSION __VERSION__
#if __GNUC__ < 3 // Haiku
#define __unlikely(x) (x)
#define __likely(x) (x)
#define __ORDER_BIG_ENDIAN__ 4321
#define __ORDER_LITTLE_ENDIAN__ 1234
#ifdef __i386__
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
#endif
#endif
#define DBL_MAXINT 9007199254740992LL
#define FLT_MAXINT 16777216
#define U64_MAX 18446744073709551615ULL

View File

@ -54,6 +54,7 @@ freebsd)
haiku)
default_cc="gcc"
default_cflags="-Wall -O2 -D NDEBUG -D USE_COMPUTED_GOTO"
default_lflags="$default_lflags -lsocket"
;;
linux)
default_cc="gcc"