]> Savannah Git Hosting - gnulib.git/commitdiff
sig2str: list all signals on FreeBSD >= 7
authorPádraig Brady <P@draigBrady.com>
Thu, 14 Jan 2016 09:47:39 +0000 (09:47 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 14 Jan 2016 09:52:48 +0000 (09:52 +0000)
FreeBSD >= 7 is contravening POSIX by not defining NSIG
to the maximal statically defined signal value.
It does define _SIG_MAXSIG though, so base SIGNUM_BOUND on that.

* lib/sig2str.h (SIGNUM_BOUND): Define to (_SIG_MAXSIG - 2)
where available, even when NSIG is defined.

ChangeLog
lib/sig2str.h

index 858615ae4ff90727da01206646818c15b3079f62..b19edb1e26e2df5f0356ff9b0f27fc85e2091f38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2016-01-14  Pádraig Brady  <P@draigBrady.com>
+
+       sig2str: list all signals on FreeBSD >= 7
+       FreeBSD >= 7 is contravening POSIX by not defining NSIG
+       to the maximal statically defined signal value.
+       It does define _SIG_MAXSIG though, so base SIGNUM_BOUND on that.
+       * lib/sig2str.h (SIGNUM_BOUND): Define to (_SIG_MAXSIG - 2)
+       where available, even when NSIG is defined.
+
 2016-01-13  Paul Eggert  <eggert@cs.ucla.edu>
 
        acl-permissions: port to USE_ACL==0 platforms
index f3471702bac1397383dc837905f3adf3759a1cc1..2730774d165da62c17fd04fe435914f3559ddab7 100644 (file)
@@ -44,6 +44,8 @@ int str2sig (char const *, int *);
 
 #if defined _sys_nsig
 # define SIGNUM_BOUND (_sys_nsig - 1)
+#elif defined _SIG_MAXSIG
+# define SIGNUM_BOUND (_SIG_MAXSIG - 2) /* FreeBSD >= 7.  */
 #elif defined NSIG
 # define SIGNUM_BOUND (NSIG - 1)
 #else