mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
Merge pull request #554 from apg/apg/bsd-feature-expansion
Add features for the various BSDs.
This commit is contained in:
commit
a01de232b2
2 changed files with 52 additions and 0 deletions
|
@ -303,6 +303,43 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Detect specific BSD */
|
||||||
|
#if SEXP_BSD
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
#define SEXP_DARWIN 1
|
||||||
|
#define SEXP_FREEBSD 0
|
||||||
|
#define SEXP_NETBSD 0
|
||||||
|
#define SEXP_DRAGONFLY 0
|
||||||
|
#define SEXP_OPENBSD 0
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
#define SEXP_DARWIN 0
|
||||||
|
#define SEXP_FREEBSD 1
|
||||||
|
#define SEXP_NETBSD 0
|
||||||
|
#define SEXP_DRAGONFLY 0
|
||||||
|
#define SEXP_OPENBSD 0
|
||||||
|
#elif defined(__NetBSD__)
|
||||||
|
#define SEXP_DARWIN 0
|
||||||
|
#define SEXP_FREEBSD 0
|
||||||
|
#define SEXP_NETBSD 1
|
||||||
|
#define SEXP_DRAGONFLY 0
|
||||||
|
#define SEXP_OPENBSD 0
|
||||||
|
#define SEXP_NETBSD 0
|
||||||
|
#elif defined(__DragonFly__)
|
||||||
|
#define SEXP_DARWIN 1
|
||||||
|
#define SEXP_FREEBSD 0
|
||||||
|
#define SEXP_NETBSD 0
|
||||||
|
#define SEXP_DRAGONFLY 1
|
||||||
|
#define SEXP_OPENBSD 0
|
||||||
|
#define SEXP_DRAGONFLY 0
|
||||||
|
#elif defined(__OpenBSD__)
|
||||||
|
#define SEXP_DARWIN 0
|
||||||
|
#define SEXP_FREEBSD 0
|
||||||
|
#define SEXP_NETBSD 0
|
||||||
|
#define SEXP_DRAGONFLY 0
|
||||||
|
#define SEXP_OPENBSD 1
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* for bignum support, need a double long to store long*long */
|
/* for bignum support, need a double long to store long*long */
|
||||||
/* gcc supports uint128_t, otherwise we need a custom struct */
|
/* gcc supports uint128_t, otherwise we need a custom struct */
|
||||||
#ifndef SEXP_USE_CUSTOM_LONG_LONGS
|
#ifndef SEXP_USE_CUSTOM_LONG_LONGS
|
||||||
|
|
15
sexp.c
15
sexp.c
|
@ -464,6 +464,21 @@ static const char* sexp_initial_features[] = {
|
||||||
#if SEXP_BSD
|
#if SEXP_BSD
|
||||||
"bsd",
|
"bsd",
|
||||||
#endif
|
#endif
|
||||||
|
#if SEXP_DARWIN
|
||||||
|
"darwin",
|
||||||
|
#endif
|
||||||
|
#if SEXP_OPENBSD
|
||||||
|
"openbsd",
|
||||||
|
#endif
|
||||||
|
#if SEXP_FREEBSD
|
||||||
|
"freebsd",
|
||||||
|
#endif
|
||||||
|
#if SEXP_NETBSD
|
||||||
|
"netbsd",
|
||||||
|
#endif
|
||||||
|
#if SEXP_DRAGONFLY
|
||||||
|
"dragonfly",
|
||||||
|
#endif
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
"windows",
|
"windows",
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue