I noticed this, when experimenting with a sigaction replacement for mingw.  
Applying this as obvious.

Also, are there any systems targetted by gnulib where raise() still does not 
exist (even though C89 requires it)?  Or can I go ahead and clean up 
sigprocmask.c and fatal-signal.c to blindly assume the existence of raise, as 
well as delete the raise module?

>From de3b21e891899b568ae0d124d15ae1bc412f12d0 Mon Sep 17 00:00:00 2001
From: Eric Blake <[EMAIL PROTECTED]>
Date: Mon, 16 Jun 2008 14:17:11 -0600
Subject: [PATCH] Fix compliance bug in sigpending.

* lib/sigprocmask.c (sigpending): Return pending array via
parameter, not return value.

Signed-off-by: Eric Blake <[EMAIL PROTECTED]>
---
 ChangeLog         |    6 ++++++
 lib/sigprocmask.c |    5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c2f2a81..054cec0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-06-16  Eric Blake  <[EMAIL PROTECTED]>
+
+       Fix compliance bug in sigpending.
+       * lib/sigprocmask.c (sigpending): Return pending array via
+       parameter, not return value.
+
 2008-06-14  Eric Blake  <[EMAIL PROTECTED]>
 
        Improve obstack-printf test code.
diff --git a/lib/sigprocmask.c b/lib/sigprocmask.c
index 221fc96..e2f6d8b 100644
--- a/lib/sigprocmask.c
+++ b/lib/sigprocmask.c
@@ -1,5 +1,5 @@
 /* POSIX compatible signal blocking.
-   Copyright (C) 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2006-2008 Free Software Foundation, Inc.
    Written by Bruno Haible <[EMAIL PROTECTED]>, 2006.
 
    This program is free software: you can redistribute it and/or modify
@@ -107,7 +107,8 @@ sigpending (sigset_t *set)
   for (sig = 0; sig < NSIG; sig++)
     if (pending_array[sig])
       pending |= 1U << sig;
-  return pending;
+  *set = pending;
+  return 0;
 }
 
 /* The previous signal handlers.
-- 
1.5.5.1





Reply via email to