public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/openrc:master commit in: src/librc/, mk/, etc/, src/rc/
@ 2013-07-26  3:34 William Hubbs
  0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs @ 2013-07-26  3:34 UTC (permalink / raw
  To: gentoo-commits

commit:     9ebd5a6aff73d70717f1d9a2f57767eae3eeb0c8
Author:     Gary <admin <AT> garyshood <DOT> com>
AuthorDate: Tue Jul 23 05:07:23 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Jul 26 03:33:24 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=9ebd5a6a

Add support for DragonFly BSD

---
 etc/rc.conf.DragonFly      | 13 +++++++++++++
 mk/os-DragonFly.mk         |  6 ++++++
 src/librc/librc-daemon.c   | 12 +++++++++---
 src/rc/rc-plugin.h         |  2 +-
 src/rc/start-stop-daemon.c |  2 ++
 5 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/etc/rc.conf.DragonFly b/etc/rc.conf.DragonFly
new file mode 100644
index 0000000..208bcc1
--- /dev/null
+++ b/etc/rc.conf.DragonFly
@@ -0,0 +1,13 @@
+##############################################################################
+# DragonFly BSD SPECIFIC OPTIONS
+
+# This is the subsystem type. Valid options on DragonFly BSD:
+# ""        - nothing special
+# "jail"    - DragonFly BSD jails
+# "prefix"  - Prefix
+# If this is commented out, automatic detection will be used.
+#
+# This should be set to the value representing the environment this file is
+# PRESENTLY in, not the virtualization the environment is capable of.
+#rc_sys=""
+

diff --git a/mk/os-DragonFly.mk b/mk/os-DragonFly.mk
new file mode 100644
index 0000000..ff5e42f
--- /dev/null
+++ b/mk/os-DragonFly.mk
@@ -0,0 +1,6 @@
+# Copyright (c) 2008 Roy Marples <roy@marples.name>
+# Released under the 2-clause BSD license.
+
+# Generic definitions
+
+include ${MK}/os-BSD.mk

diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c
index 982da35..6e7d57f 100644
--- a/src/librc/librc-daemon.c
+++ b/src/librc/librc-daemon.c
@@ -164,9 +164,15 @@ librc_hidden_def(rc_find_pids)
 #  endif
 #  define _KINFO_PROC kinfo_proc
 #  define _KVM_GETARGV kvm_getargv
-#  define _GET_KINFO_UID(kp) (kp.ki_ruid)
-#  define _GET_KINFO_COMM(kp) (kp.ki_comm)
-#  define _GET_KINFO_PID(kp) (kp.ki_pid)
+#  if defined(__DragonFly__)
+#    define _GET_KINFO_UID(kp) (kp.kp_ruid)
+#    define _GET_KINFO_COMM(kp) (kp.kp_comm)
+#    define _GET_KINFO_PID(kp) (kp.kp_pid)
+#  else
+#    define _GET_KINFO_UID(kp) (kp.ki_ruid)
+#    define _GET_KINFO_COMM(kp) (kp.ki_comm)
+#    define _GET_KINFO_PID(kp) (kp.ki_pid)
+#  endif
 #  define _KVM_PATH _PATH_DEVNULL
 #  define _KVM_FLAGS O_RDONLY
 # endif

diff --git a/src/rc/rc-plugin.h b/src/rc/rc-plugin.h
index f763c3e..b4e40ab 100644
--- a/src/rc/rc-plugin.h
+++ b/src/rc/rc-plugin.h
@@ -41,7 +41,7 @@ void rc_plugin_unload(void);
 void rc_plugin_run(RC_HOOK, const char *value);
 
 /* dlfunc defines needed to avoid ISO errors. FreeBSD has this right :) */
-#ifndef __FreeBSD__
+#if !defined(__FreeBSD__) && !defined(__DragonFly__)
 struct __dlfunc_arg {
 	int	__dlfunc_dummy;
 };

diff --git a/src/rc/start-stop-daemon.c b/src/rc/start-stop-daemon.c
index bfa8852..5576d49 100644
--- a/src/rc/start-stop-daemon.c
+++ b/src/rc/start-stop-daemon.c
@@ -110,6 +110,7 @@ extern char **environ;
 #if !defined(SYS_ioprio_set) && defined(__NR_ioprio_set)
 # define SYS_ioprio_set __NR_ioprio_set
 #endif
+#if !defined(__DragonFly__)
 static inline int ioprio_set(int which, int who, int ioprio)
 {
 #ifdef SYS_ioprio_set
@@ -118,6 +119,7 @@ static inline int ioprio_set(int which, int who, int ioprio)
 	return 0;
 #endif
 }
+#endif
 
 static void
 free_schedulelist(void)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: src/librc/, mk/, etc/, src/rc/
@ 2013-10-30 19:58 William Hubbs
  0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs @ 2013-10-30 19:58 UTC (permalink / raw
  To: gentoo-commits

commit:     766d71c2d32d2c57969d161f4d96f15706b8ed3a
Author:     Steven Chamberlain <steven <AT> pyro <DOT> eu <DOT> org>
AuthorDate: Tue Oct 29 18:35:33 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Oct 30 06:40:03 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=766d71c2

Begin port to GNU/kFreeBSD

This is just a minimal port to get Debian up and running; the rest will
be done later.

---
 etc/rc.conf.GNU-kFreeBSD | 11 +++++++++++
 mk/os-GNU-kFreeBSD.mk    |  9 +++++++++
 mk/os.mk                 |  2 +-
 src/librc/librc-daemon.c |  2 +-
 src/rc/mountinfo.c       |  4 ++--
 src/rc/rc-logger.c       |  2 +-
 src/rc/runscript.c       |  2 +-
 7 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/etc/rc.conf.GNU-kFreeBSD b/etc/rc.conf.GNU-kFreeBSD
new file mode 100644
index 0000000..67fe2ae
--- /dev/null
+++ b/etc/rc.conf.GNU-kFreeBSD
@@ -0,0 +1,11 @@
+##############################################################################
+# GNU/kFreeBSD SPECIFIC OPTIONS
+
+# This is the subsystem type. Valid options on GNU/kFreeBSD:
+# ""        - nothing special
+# "jail"    - FreeBSD jails (not yet implemented)
+# If this is commented out, automatic detection will be used.
+#
+# This should be set to the value representing the environment this file is
+# PRESENTLY in, not the virtualization the environment is capable of.
+#rc_sys=""

diff --git a/mk/os-GNU-kFreeBSD.mk b/mk/os-GNU-kFreeBSD.mk
new file mode 100644
index 0000000..72fea3e
--- /dev/null
+++ b/mk/os-GNU-kFreeBSD.mk
@@ -0,0 +1,9 @@
+# Copyright (c) 2008 Roy Marples <roy@marples.name>
+# Released under the 2-clause BSD license.
+
+# Generic definitions
+
+CPPFLAGS+=	-D_BSD_SOURCE -D_XOPEN_SOURCE=700
+LIBDL=		-Wl,-Bdynamic -ldl
+LIBKVM?=
+include ${MK}/os-BSD.mk

diff --git a/mk/os.mk b/mk/os.mk
index 3e18962..6b2d428 100644
--- a/mk/os.mk
+++ b/mk/os.mk
@@ -3,7 +3,7 @@
 
 # Generic definitions
 
-_OS_SH=		uname -s
+_OS_SH=		uname -s | tr '/' '-'
 _OS:= 		$(shell ${_OS_SH})
 OS?= 		${_OS}
 include ${MK}/os-${OS}.mk

diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c
index 6e7d57f..e98b02c 100644
--- a/src/librc/librc-daemon.c
+++ b/src/librc/librc-daemon.c
@@ -30,7 +30,7 @@
 
 #include "librc.h"
 
-#if defined(__linux__)
+#if defined(__linux__) || defined (__GLIBC__)
 static bool
 pid_is_exec(pid_t pid, const char *exec)
 {

diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c
index 43d9c83..ce3f27d 100644
--- a/src/rc/mountinfo.c
+++ b/src/rc/mountinfo.c
@@ -39,7 +39,7 @@
 #  include <sys/statvfs.h>
 #  define statfs statvfs
 #  define F_FLAGS f_flag
-#elif defined (__linux__)
+#elif defined (__linux__) || defined (__GLIBC__)
 #  include <mntent.h>
 #endif
 
@@ -265,7 +265,7 @@ find_mounts(struct args *args)
 	return list;
 }
 
-#elif defined (__linux__)
+#elif defined (__linux__) || defined (__GLIBC__)
 static struct mntent *
 getmntfile(const char *file)
 {

diff --git a/src/rc/rc-logger.c b/src/rc/rc-logger.c
index 468225f..e8fb0ff 100644
--- a/src/rc/rc-logger.c
+++ b/src/rc/rc-logger.c
@@ -44,7 +44,7 @@
 #include <time.h>
 #include <unistd.h>
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
 #  include <pty.h>
 #elif defined(__NetBSD__) || defined(__OpenBSD__)
 #  include <util.h>

diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 3ecb6b5..7dc7593 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -52,7 +52,7 @@
 #include <time.h>
 #include <unistd.h>
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
 #  include <pty.h>
 #elif defined(__NetBSD__) || defined(__OpenBSD__)
 #  include <util.h>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-30 19:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-26  3:34 [gentoo-commits] proj/openrc:master commit in: src/librc/, mk/, etc/, src/rc/ William Hubbs
  -- strict thread matches above, loose matches on Subject: below --
2013-10-30 19:58 William Hubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox