pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/libdaemon More portable fix for upper bound for ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1f4a69ec4cde
branches:  trunk
changeset: 397714:1f4a69ec4cde
user:      hasso <hasso%pkgsrc.org@localhost>
date:      Tue Aug 18 05:40:44 2009 +0000

description:
More portable fix for upper bound for signals problem pulled out from
upstream git repo. Should fix build on Solaris, FreeBSD and DragonFly.

If there is still need for Darwin specific fix with __DARWIN_NSIG (there is
no NSIG or it's semantically different like NSIG and _NSIG in Linux), please
add it back.

diffstat:

 devel/libdaemon/distinfo         |   4 ++--
 devel/libdaemon/patches/patch-aa |  31 +++++++++++++++++++++++--------
 2 files changed, 25 insertions(+), 10 deletions(-)

diffs (54 lines):

diff -r dd3af5d0be63 -r 1f4a69ec4cde devel/libdaemon/distinfo
--- a/devel/libdaemon/distinfo  Tue Aug 18 04:38:24 2009 +0000
+++ b/devel/libdaemon/distinfo  Tue Aug 18 05:40:44 2009 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.3 2009/08/17 10:26:17 tron Exp $
+$NetBSD: distinfo,v 1.4 2009/08/18 05:40:44 hasso Exp $
 
 SHA1 (libdaemon-0.13.tar.gz) = 2c67eedf0dfe303a86bee64feba3e40d21abbd01
 RMD160 (libdaemon-0.13.tar.gz) = 7fc41dc7a147d969b29e5a359442716859de7e0e
 Size (libdaemon-0.13.tar.gz) = 368119 bytes
-SHA1 (patch-aa) = 6cb29631560af24ec1c3a362352f02d7ea1327d2
+SHA1 (patch-aa) = 946c837cabafbeb52cb4f615e9f9b2021b475180
diff -r dd3af5d0be63 -r 1f4a69ec4cde devel/libdaemon/patches/patch-aa
--- a/devel/libdaemon/patches/patch-aa  Tue Aug 18 04:38:24 2009 +0000
+++ b/devel/libdaemon/patches/patch-aa  Tue Aug 18 05:40:44 2009 +0000
@@ -1,15 +1,30 @@
-$NetBSD: patch-aa,v 1.1 2009/08/17 10:26:17 tron Exp $
+$NetBSD: patch-aa,v 1.2 2009/08/18 05:40:44 hasso Exp $
+
+http://git.0pointer.de/?p=libdaemon.git;a=commitdiff;h=5b1daf07
 
---- libdaemon/dfork.c.orig     2008-07-28 20:37:56.000000000 +0100
-+++ libdaemon/dfork.c  2009-08-17 11:23:13.000000000 +0100
-@@ -662,6 +662,10 @@
-     return r;
- }
+--- libdaemon/dfork.c.orig     2008-07-28 22:37:56 +0300
++++ libdaemon/dfork.c  2009-08-18 08:25:30 +0300
+@@ -42,6 +42,14 @@
+ #include "dnonblock.h"
+ #include "dlog.h"
  
-+#if !defined(_NSIG) && defined(__DARWIN_NSIG)
-+#define       _NSIG   __DARWIN_NSIG
++#if defined(_NSIG) /* On glibc NSIG does not count RT signals */
++# define SIGNAL_UPPER_BOUND _NSIG
++#elif defined(NSIG) /* Solaris defines just this */
++# define SIGNAL_UPPER_BOUND NSIG
++#else
++# error "Unknown upper bound for signals"
 +#endif
 +
+ static int _daemon_retval_pipe[2] = { -1, -1 };
+ 
+ static int _null_open(int f, int fd) {
+@@ -665,7 +673,7 @@ int daemon_reset_sigs(int except, ...) {
  int daemon_reset_sigsv(const int except[]) {
      int sig;
  
+-    for (sig = 1; sig < _NSIG; sig++) {
++    for (sig = 1; sig < SIGNAL_UPPER_BOUND; sig++) {
+         int reset = 1;
+ 
+         switch (sig) {



Home | Main Index | Thread Index | Old Index