mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 21:59:17 +02:00
patch for clean NetBSD and OpenBSD builds from v krishnakumar
This commit is contained in:
parent
cc1821a61e
commit
f0dd9c9ddb
2 changed files with 20 additions and 1 deletions
|
@ -10,6 +10,12 @@ else
|
|||
ifeq ($(shell uname),FreeBSD)
|
||||
PLATFORM=bsd
|
||||
else
|
||||
ifeq ($(shell uname),NetBSD)
|
||||
PLATFORM=bsd
|
||||
else
|
||||
ifeq ($(shell uname),OpenBSD)
|
||||
PLATFORM=bsd
|
||||
else
|
||||
ifeq ($(shell uname),DragonFly)
|
||||
PLATFORM=bsd
|
||||
else
|
||||
|
@ -33,6 +39,8 @@ endif
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
########################################################################
|
||||
# Set default variables for the platform.
|
||||
|
@ -45,6 +53,12 @@ EXE =
|
|||
CLIBFLAGS = -dynamiclib
|
||||
STATICFLAGS = -static-libgcc -DSEXP_USE_DL=0
|
||||
else
|
||||
ifeq ($(PLATFORM),bsd)
|
||||
SO = .so
|
||||
EXE =
|
||||
CLIBFLAGS = -fPIC -shared
|
||||
LIBDL =
|
||||
else
|
||||
ifeq ($(PLATFORM),mingw)
|
||||
SO = .dll
|
||||
EXE = .exe
|
||||
|
@ -75,6 +89,7 @@ endif
|
|||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),unix)
|
||||
#RLDFLAGS=-rpath $(LIBDIR)
|
||||
|
|
|
@ -62,6 +62,8 @@ static sexp sexp_set_signal_action (sexp ctx, sexp self, sexp signum, sexp newac
|
|||
|
||||
#include <sys/time.h>
|
||||
#ifndef __DragonFly__
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/proc.h>
|
||||
#endif
|
||||
#include <sys/sysctl.h>
|
||||
|
@ -72,8 +74,10 @@ static sexp sexp_pid_cmdline (sexp ctx, int pid) {
|
|||
struct kinfo_proc res;
|
||||
int name[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid};
|
||||
if (sysctl(name, 4, &res, &reslen, NULL, 0) >= 0) {
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) || defined(__NetBSD__)
|
||||
return sexp_c_string(ctx, res.kp_proc.p_comm, -1);
|
||||
#elif __OpenBSD__
|
||||
return sexp_c_string(ctx, res.p_comm, -1);
|
||||
#elif __DragonFly__
|
||||
return sexp_c_string(ctx, res.kp_comm, -1);
|
||||
#else
|
||||
|
|
Loading…
Add table
Reference in a new issue