mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
fix plan9 breakage
This commit is contained in:
parent
e2c8f144b5
commit
9b0f9c73f2
3 changed files with 8 additions and 1 deletions
|
@ -660,6 +660,8 @@
|
|||
#define strcasestr cistrstr
|
||||
#define round(x) floor((x)+0.5)
|
||||
#define trunc(x) floor((x)+0.5*(((x)<0)?1:0))
|
||||
#define isinf(x) (isInf(x,1) || isInf(x,-1))
|
||||
#define isnan(x) isNaN(x)
|
||||
#elif defined(_WIN32)
|
||||
#define snprintf(buf, len, fmt, val) sprintf(buf, fmt, val)
|
||||
#define strcasecmp lstrcmpi
|
||||
|
@ -674,6 +676,10 @@
|
|||
#define sexp_pos_infinity (DBL_MAX*DBL_MAX)
|
||||
#define sexp_neg_infinity -sexp_pos_infinity
|
||||
#define sexp_nan log(-2)
|
||||
#elif PLAN9
|
||||
#define sexp_pos_infinity Inf(1)
|
||||
#define sexp_neg_infinity Inf(-1)
|
||||
#define sexp_nan NaN()
|
||||
#else
|
||||
#define sexp_pos_infinity (1.0/0.0)
|
||||
#define sexp_neg_infinity -sexp_pos_infinity
|
||||
|
|
|
@ -1062,7 +1062,7 @@ SEXP_API sexp sexp_make_unsigned_integer(sexp ctx, sexp_luint_t x);
|
|||
#define sexp_context_exception(x) (sexp_vector_ref(sexp_context_specific(x), SEXP_SIX))
|
||||
|
||||
#if SEXP_USE_ALIGNED_BYTECODE
|
||||
#define sexp_context_align_pos(ctx) sexp_context_pos(ctx) = sexp_word_align(sexp_context_pos(ctx))
|
||||
#define sexp_context_align_pos(ctx) sexp_context_pos(ctx) = (sexp)sexp_word_align((sexp_uint_t)sexp_context_pos(ctx))
|
||||
#else
|
||||
#define sexp_context_align_pos(ctx)
|
||||
#endif
|
||||
|
|
1
main.c
1
main.c
|
@ -511,4 +511,5 @@ int main (int argc, char **argv) {
|
|||
sexp_scheme_init();
|
||||
run_main(argc, argv);
|
||||
exit_success();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue