mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 13:49:17 +02:00
Build fixes for plan9. Moving individual object files out of opt/ since plan9 mkfiles have issues with these.
This commit is contained in:
parent
2c6bc7af42
commit
93ba0926a7
8 changed files with 37 additions and 11 deletions
6
Makefile
6
Makefile
|
@ -86,9 +86,9 @@ sexp-ulimit.o: sexp.c $(BASE_INCLUDES)
|
||||||
main.o: main.c $(INCLUDES)
|
main.o: main.c $(INCLUDES)
|
||||||
$(CC) -c $(XCPPFLAGS) $(XCFLAGS) -o $@ $<
|
$(CC) -c $(XCPPFLAGS) $(XCFLAGS) -o $@ $<
|
||||||
|
|
||||||
SEXP_OBJS = gc.o sexp.o opt/bignum.o
|
SEXP_OBJS = gc.o sexp.o bignum.o
|
||||||
SEXP_ULIMIT_OBJS = gc.o sexp-ulimit.o opt/bignum.o
|
SEXP_ULIMIT_OBJS = gc.o sexp-ulimit.o bignum.o
|
||||||
EVAL_OBJS = opcodes.o vm.o eval.o opt/simplify.o
|
EVAL_OBJS = opcodes.o vm.o eval.o simplify.o
|
||||||
|
|
||||||
libchibi-sexp$(SO): $(SEXP_OBJS)
|
libchibi-sexp$(SO): $(SEXP_OBJS)
|
||||||
$(CC) $(CLIBFLAGS) -o $@ $^ $(XLDFLAGS)
|
$(CC) $(CLIBFLAGS) -o $@ $^ $(XLDFLAGS)
|
||||||
|
|
4
eval.c
4
eval.c
|
@ -1583,10 +1583,6 @@ sexp sexp_make_promise (sexp ctx, sexp self, sexp_sint_t n, sexp done, sexp val)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PLAN9
|
|
||||||
#include "opt/plan9.c"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/***************************** opcodes ********************************/
|
/***************************** opcodes ********************************/
|
||||||
|
|
||||||
#if SEXP_USE_TYPE_DEFS
|
#if SEXP_USE_TYPE_DEFS
|
||||||
|
|
|
@ -193,6 +193,34 @@ SEXP_API sexp sexp_make_setter_op (sexp ctx, sexp self, sexp_sint_t n, sexp name
|
||||||
SEXP_API sexp sexp_type_slot_offset_op (sexp ctx, sexp self, sexp_sint_t n, sexp type, sexp index);
|
SEXP_API sexp sexp_type_slot_offset_op (sexp ctx, sexp self, sexp_sint_t n, sexp type, sexp index);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PLAN9
|
||||||
|
SEXP_API sexp sexp_rand (sexp ctx, sexp self, sexp_sint_t n);
|
||||||
|
SEXP_API sexp sexp_srand (sexp ctx, sexp self, sexp_sint_t n, sexp seed);
|
||||||
|
SEXP_API sexp sexp_file_exists_p (sexp ctx, sexp self, sexp_sint_t n, sexp path);
|
||||||
|
SEXP_API sexp sexp_fdopen (sexp ctx, sexp self, sexp_sint_t n, sexp fd, sexp mode);
|
||||||
|
SEXP_API sexp sexp_fileno (sexp ctx, sexp self, sexp_sint_t n, sexp port);
|
||||||
|
SEXP_API sexp sexp_fork (sexp ctx, sexp self, sexp_sint_t n);
|
||||||
|
SEXP_API sexp sexp_exec (sexp ctx, sexp self, sexp_sint_t n, sexp name, sexp args);
|
||||||
|
SEXP_API void sexp_exits (sexp ctx, sexp self, sexp_sint_t n, sexp msg);
|
||||||
|
SEXP_API sexp sexp_dup (sexp ctx, sexp self, sexp_sint_t n, sexp oldfd, sexp newfd);
|
||||||
|
SEXP_API sexp sexp_pipe (sexp ctx, sexp self, sexp_sint_t n);
|
||||||
|
SEXP_API sexp sexp_sleep (sexp ctx, sexp self, sexp_sint_t n, sexp msecs);
|
||||||
|
SEXP_API sexp sexp_getenv (sexp ctx, sexp self, sexp_sint_t n, sexp name);
|
||||||
|
SEXP_API sexp sexp_getwd (sexp ctx, sexp self, sexp_sint_t n);
|
||||||
|
SEXP_API sexp sexp_chdir (sexp ctx, sexp self, sexp_sint_t n, sexp path);
|
||||||
|
SEXP_API sexp sexp_getuser (sexp ctx, sexp self, sexp_sint_t n);
|
||||||
|
SEXP_API sexp sexp_sysname (sexp ctx, sexp self, sexp_sint_t n);
|
||||||
|
SEXP_API sexp sexp_wait (sexp ctx, sexp self, sexp_sint_t n);
|
||||||
|
SEXP_API sexp sexp_postnote (sexp ctx, sexp self, sexp_sint_t n, sexp pid, sexp note);
|
||||||
|
SEXP_API sexp sexp_postmountsrv (sexp ctx, sexp self, sexp_sint_t n, sexp ls, sexp name, sexp mtpt, sexp flags);
|
||||||
|
SEXP_API sexp sexp_9p_req_offset (sexp ctx, sexp self, sexp_sint_t n, sexp req);
|
||||||
|
SEXP_API sexp sexp_9p_req_count (sexp ctx, sexp self, sexp_sint_t n, sexp req);
|
||||||
|
SEXP_API sexp sexp_9p_req_fid (sexp ctx, sexp self, sexp_sint_t n, sexp req);
|
||||||
|
SEXP_API sexp sexp_9p_req_newfid (sexp ctx, sexp self, sexp_sint_t n, sexp req);
|
||||||
|
SEXP_API sexp sexp_9p_respond (sexp ctx, sexp self, sexp_sint_t n, sexp req, sexp err);
|
||||||
|
SEXP_API sexp sexp_9p_responderror (sexp ctx, sexp self, sexp_sint_t n, sexp req);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if SEXP_USE_SIMPLIFY
|
#if SEXP_USE_SIMPLIFY
|
||||||
SEXP_API int sexp_rest_unused_p (sexp lambda);
|
SEXP_API int sexp_rest_unused_p (sexp lambda);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -25,8 +25,10 @@ extern "C" {
|
||||||
#if SEXP_USE_DL
|
#if SEXP_USE_DL
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef PLAN9
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
#if SEXP_USE_GREEN_THREADS
|
#if SEXP_USE_GREEN_THREADS
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
4
mkfile
4
mkfile
|
@ -11,7 +11,7 @@ CPPFLAGS= -Iinclude -DPLAN9 -DSEXP_USE_GREEN_THREADS=0
|
||||||
CFLAGS= -p $CPPFLAGS
|
CFLAGS= -p $CPPFLAGS
|
||||||
CFLAGS_STATIC=$CFLAGS -DSEXP_USE_STATIC_LIBS
|
CFLAGS_STATIC=$CFLAGS -DSEXP_USE_STATIC_LIBS
|
||||||
|
|
||||||
OFILES=sexp.$O eval.$O main.$O $STATIC
|
OFILES=gc.$O sexp.$O bignum.$O opcodes.$O plan9.$O vm.$O simplify.$O eval.$O main.$O $STATIC
|
||||||
HFILES=include/chibi/sexp.h include/chibi/eval.h include/chibi/features.h include/chibi/install.h
|
HFILES=include/chibi/sexp.h include/chibi/eval.h include/chibi/features.h include/chibi/install.h
|
||||||
CLEANFILES=tests/basic/*.out tests/basic/*.err
|
CLEANFILES=tests/basic/*.out tests/basic/*.err
|
||||||
|
|
||||||
|
@ -107,5 +107,3 @@ test-unicode:
|
||||||
|
|
||||||
test-libs:
|
test-libs:
|
||||||
./$O.out -xscheme tests/lib-tests.scm
|
./$O.out -xscheme tests/lib-tests.scm
|
||||||
|
|
||||||
sexp.c:N: gc.c opt/bignum.c
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
/* plan9.c -- extended Plan 9 system utils */
|
/* plan9.c -- extended Plan 9 system utils */
|
||||||
/* Copyright (c) 2009-2010 Alex Shinn. All rights reserved. */
|
/* Copyright (c) 2009-2012 Alex Shinn. All rights reserved. */
|
||||||
/* BSD-style license: http://synthcode.com/license.txt */
|
/* BSD-style license: http://synthcode.com/license.txt */
|
||||||
|
|
||||||
|
#include "chibi/eval.h"
|
||||||
|
|
||||||
sexp sexp_rand (sexp ctx, sexp self, sexp_sint_t n) {
|
sexp sexp_rand (sexp ctx, sexp self, sexp_sint_t n) {
|
||||||
return sexp_make_fixnum(rand());
|
return sexp_make_fixnum(rand());
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue