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 PLATFORM=macosx
else else
ifeq ($(shell uname),FreeBSD) ifeq ($(shell uname),FreeBSD)
PLATFORM=FreeBSD PLATFORM=bsd
else
ifeq ($(shell uname),DragonFly)
PLATFORM=bsd
else else
ifeq ($(shell uname -o),Msys) ifeq ($(shell uname -o),Msys)
PLATFORM=mingw PLATFORM=mingw
@ -64,15 +67,16 @@ SO = .so
EXE = EXE =
CLIBFLAGS = -fPIC -shared CLIBFLAGS = -fPIC -shared
STATICFLAGS = -static -DSEXP_USE_DL=0 STATICFLAGS = -static -DSEXP_USE_DL=0
ifeq ($(PLATFORM),FreeBSD) ifeq ($(PLATFORM),BSD)
LIBDL= LIBDL=
RLDFLAGS=-Wl,-R$(DESTDIR)$(LIBDIR) RLDFLAGS=-Wl,-R$(DESTDIR)$(LIBDIR)
endif endif
endif endif
endif endif
endif endif
endif
ifeq ($(PLATFORM),unix) ifeq ($(PLATFORM),unix)
#RLDFLAGS=-rpath $(LIBDIR) #RLDFLAGS=-rpath $(LIBDIR)
RLDFLAGS=-Wl,-R$(LIBDIR) RLDFLAGS=-Wl,-R$(DESTDIR)$(LIBDIR)
endif 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 best and customize the rest. Adding your own primitives or wrappers
around existing C libraries is easy with the C FFI. 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, Chibi is known to build and run on 32 and 64-bit Linux, FreeBSD,
iOS, Windows (under Cygwin) and Plan9. DragonFly, OS X, iOS, Windows (under Cygwin) and Plan9.
@section{Installation} @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 #if SEXP_BSD
#include <sys/time.h> #include <sys/time.h>
#ifndef __DragonFly__
#include <sys/proc.h> #include <sys/proc.h>
#endif
#include <sys/sysctl.h> #include <sys/sysctl.h>
#include <sys/user.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) { if (sysctl(name, 4, &res, &reslen, NULL, 0) >= 0) {
#ifdef __APPLE__ #ifdef __APPLE__
return sexp_c_string(ctx, res.kp_proc.p_comm, -1); return sexp_c_string(ctx, res.kp_proc.p_comm, -1);
#elif __DragonFly__
return sexp_c_string(ctx, res.kp_comm, -1);
#else #else
return sexp_c_string(ctx, res.ki_comm, -1); return sexp_c_string(ctx, res.ki_comm, -1);
#endif #endif