mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-10 14:37:34 +02:00
DragonFly build support patch from ctismyusername.
This commit is contained in:
parent
c903a73921
commit
37b796e0f0
3 changed files with 13 additions and 5 deletions
|
@ -8,7 +8,10 @@ ifeq ($(shell uname),Darwin)
|
|||
PLATFORM=macosx
|
||||
else
|
||||
ifeq ($(shell uname),FreeBSD)
|
||||
PLATFORM=FreeBSD
|
||||
PLATFORM=bsd
|
||||
else
|
||||
ifeq ($(shell uname),DragonFly)
|
||||
PLATFORM=bsd
|
||||
else
|
||||
ifeq ($(shell uname -o),Msys)
|
||||
PLATFORM=mingw
|
||||
|
@ -64,15 +67,16 @@ SO = .so
|
|||
EXE =
|
||||
CLIBFLAGS = -fPIC -shared
|
||||
STATICFLAGS = -static -DSEXP_USE_DL=0
|
||||
ifeq ($(PLATFORM),FreeBSD)
|
||||
ifeq ($(PLATFORM),BSD)
|
||||
LIBDL=
|
||||
RLDFLAGS=-Wl,-R$(DESTDIR)$(LIBDIR)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),unix)
|
||||
#RLDFLAGS=-rpath $(LIBDIR)
|
||||
RLDFLAGS=-Wl,-R$(LIBDIR)
|
||||
RLDFLAGS=-Wl,-R$(DESTDIR)$(LIBDIR)
|
||||
endif
|
||||
|
|
|
@ -27,8 +27,8 @@ standard modules. You can choose whichever layer suits your needs
|
|||
best and customize the rest. Adding your own primitives or wrappers
|
||||
around existing C libraries is easy with the C FFI.
|
||||
|
||||
Chibi is known to build and run on 32 and 64-bit Linux, FreeBSD, OS X,
|
||||
iOS, Windows (under Cygwin) and Plan9.
|
||||
Chibi is known to build and run on 32 and 64-bit Linux, FreeBSD,
|
||||
DragonFly, OS X, iOS, Windows (under Cygwin) and Plan9.
|
||||
|
||||
@section{Installation}
|
||||
|
||||
|
|
|
@ -62,7 +62,9 @@ static sexp sexp_set_signal_action (sexp ctx, sexp self, sexp signum, sexp newac
|
|||
#if SEXP_BSD
|
||||
|
||||
#include <sys/time.h>
|
||||
#ifndef __DragonFly__
|
||||
#include <sys/proc.h>
|
||||
#endif
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/user.h>
|
||||
|
||||
|
@ -73,6 +75,8 @@ static sexp sexp_pid_cmdline (sexp ctx, int pid) {
|
|||
if (sysctl(name, 4, &res, &reslen, NULL, 0) >= 0) {
|
||||
#ifdef __APPLE__
|
||||
return sexp_c_string(ctx, res.kp_proc.p_comm, -1);
|
||||
#elif __DragonFly__
|
||||
return sexp_c_string(ctx, res.kp_comm, -1);
|
||||
#else
|
||||
return sexp_c_string(ctx, res.ki_comm, -1);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue