diff --git a/Makefile.detect b/Makefile.detect index a65bfc8c..eb47c99e 100644 --- a/Makefile.detect +++ b/Makefile.detect @@ -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 diff --git a/doc/chibi.scrbl b/doc/chibi.scrbl index b21ebc14..984cee4b 100755 --- a/doc/chibi.scrbl +++ b/doc/chibi.scrbl @@ -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} diff --git a/lib/chibi/signal.c b/lib/chibi/signal.c index 1d73f381..9f9a190a 100644 --- a/lib/chibi/signal.c +++ b/lib/chibi/signal.c @@ -62,7 +62,9 @@ static sexp sexp_set_signal_action (sexp ctx, sexp self, sexp signum, sexp newac #if SEXP_BSD #include +#ifndef __DragonFly__ #include +#endif #include #include @@ -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