DragonFly build support patch from ctismyusername.

This commit is contained in:
Alex Shinn 2012-06-19 22:47:15 -07:00
parent c903a73921
commit 37b796e0f0
3 changed files with 13 additions and 5 deletions

View file

@ -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

View file

@ -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}

View file

@ -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