From crodrigu@milady.bbn.com  Fri Mar 15 07:05:30 2002
Return-Path: <crodrigu@milady.bbn.com>
Received: from milady.bbn.com (milady-de1.bbn.com [128.33.14.195])
	by hub.freebsd.org (Postfix) with ESMTP id F3C8237B400
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 15 Mar 2002 07:05:28 -0800 (PST)
Received: (from crodrigu@localhost)
	by milady.bbn.com (8.11.3/8.11.3) id g2FFPN634379;
	Fri, 15 Mar 2002 10:25:23 -0500 (EST)
	(envelope-from crodrigu)
Message-Id: <200203151525.g2FFPN634379@milady.bbn.com>
Date: Fri, 15 Mar 2002 10:25:23 -0500 (EST)
From: Craig Rodrigues <crodrigu@milady.bbn.com>
Reply-To: crodrigu@milady.bbn.com
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: signal.h does not check for _POSIX_REALTIME_SIGNALS
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         35924
>Category:       misc
>Synopsis:       signal.h does not check for _POSIX_REALTIME_SIGNALS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 15 07:10:01 PST 2002
>Closed-Date:    Wed Oct 16 17:50:55 PDT 2002
>Last-Modified:  Wed Oct 16 17:50:55 PDT 2002
>Originator:     Craig Rodrigues
>Release:        FreeBSD 4.3-RELEASE i386
>Organization:
BBN
>Environment:
System: FreeBSD milady.bbn.com 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Tue Sep 18 18:09:45 EDT 2001 crodrigu@milady.bbn.com:/usr/home/crodrigu/kame/freebsd4/sys/compile/CONFIGFILE i386


	
>Description:
	
>How-To-Repeat:

<signal.h> should only define sigqueue(), sigwaitinfo(), sigtimedwait()
if _POSIX_REALTIME_SIGNALS is defined.  This is a standard preprocessor
constant mentioned in the latest POSIX standard:
http://www.opengroup.org/onlinepubs/007904975/basedefs/unistd.h.html#tag_13_80

Right now, if I compile a program:

#include <signal.h>

int main(int argc, char *argv[])
{
     sigqueue(0,0,(union sigval)0);
     sigtimedwait((sigset_t *)0,  (siginfo_t *)0, (struct timespec *)0);
     sigwaitinfo((sigset_t *)0, (siginfo_t *)0);
 
     return 0;
}

I get link-time errors.



The solution to this problem was mentioned by Terry Lambert on
freebsd-hackers:

http://docs.freebsd.org/cgi/getmsg.cgi?fetch=278142+0+current/freebsd-hackers


I think that the FreeBSD signal.h should check for
_POSIX_REALTIME_SIGNALS.  It is defined in the POSIX standard,
and when (if) POSIX RT signal support is fully integrated into
FreeBSD, it can be defined.

>Fix:


Index: signal.h
===================================================================
RCS file: /home/ncvs/src/include/signal.h,v
retrieving revision 1.15
diff -u -r1.15 signal.h
--- signal.h	2002/02/17 19:21:42	1.15
+++ signal.h	2002/03/15 14:56:54
@@ -66,7 +66,7 @@
 int	sigwait __P((const sigset_t *, int *));
 
 
-#ifdef _P1003_1B_VISIBLE
+#ifdef _POSIX_REALTIME_SIGNALS
 
 __BEGIN_DECLS
 int sigqueue __P((_BSD_PID_T_, int, const union sigval));
>Release-Note:
>Audit-Trail:

From: Craig Rodrigues <crodrigu@bbn.com>
To: freebsd-gnats-submit@FreeBSD.org, crodrigu@bbn.com
Cc:  
Subject: Re: misc/35924: signal.h does not check for _POSIX_REALTIME_SIGNALS
Date: Wed, 16 Oct 2002 11:17:33 -0400

 I think this PR can be closed.  It is fixed in current by:
 
 http://www.freebsd.org/cgi/cvsweb.cgi/src/include/signal.h?rev=1.22&content-type=text/x-cvsweb-markup
 
 -- 
 Craig Rodrigues
 crodrigu@bbn.com
 
 
State-Changed-From-To: open->closed 
State-Changed-By: billf 
State-Changed-When: Wed Oct 16 17:48:25 PDT 2002 
State-Changed-Why:  
see src/include/signal.h:rev1.22 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35924 
>Unformatted:
