Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Mar 2002 10:25:23 -0500 (EST)
From:      Craig Rodrigues <crodrigu@milady.bbn.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   misc/35924: signal.h does not check for _POSIX_REALTIME_SIGNALS
Message-ID:  <200203151525.g2FFPN634379@milady.bbn.com>

next in thread | raw e-mail | index | archive | help

>Number:         35924
>Category:       misc
>Synopsis:       signal.h does not check for _POSIX_REALTIME_SIGNALS
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 15 07:10:01 PST 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203151525.g2FFPN634379>