From owner-freebsd-hackers Wed Oct 9 20:20:18 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 842AA37B401; Wed, 9 Oct 2002 20:20:16 -0700 (PDT) Received: from dibbler.ne.client2.attbi.com (dibbler.ne.client2.attbi.com [24.61.41.247]) by mx1.FreeBSD.org (Postfix) with ESMTP id 726A543E4A; Wed, 9 Oct 2002 20:20:15 -0700 (PDT) (envelope-from rodrigc@attbi.com) Received: from dibbler.ne.client2.attbi.com (localhost.ne.attbi.com [127.0.0.1]) by dibbler.ne.client2.attbi.com (8.12.6/8.12.5) with ESMTP id g9A3KuCK010445; Wed, 9 Oct 2002 23:20:56 -0400 (EDT) (envelope-from rodrigc@dibbler.ne.client2.attbi.com) Received: (from rodrigc@localhost) by dibbler.ne.client2.attbi.com (8.12.6/8.12.6/Submit) id g9A3KuIh010444; Wed, 9 Oct 2002 23:20:56 -0400 (EDT) Date: Wed, 9 Oct 2002 23:20:56 -0400 From: Craig Rodrigues To: freebsd-standards@freebsd.org Cc: freebsd-hackers@freebsd.org Subject: Re: Problem detecting POSIX symbolic constants Message-ID: <20021009232056.A10429@attbi.com> References: <20021009222307.A9894@attbi.com> <3DA4E61C.DCC8F543@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3DA4E61C.DCC8F543@mindspring.com>; from tlambert2@mindspring.com on Wed, Oct 09, 2002 at 07:29:48PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Oct 09, 2002 at 07:29:48PM -0700, Terry Lambert wrote: > To be totally correct, you will need to: > > #ifdef _POSIX_REALTIME_SIGNALS > #if (_POSIX_REALTIME_SIGNALS != -1) > > ... > > #endif > #endif > > It's annoying, but doing this will ensure that there are no > gaps through which some system other than FreeBSD might fall. Sigh. Why did the POSIX guys do this? :( BTW, I think that: #if defined(_POSIX_REALTIME_SIGNALS) && (_POSIX_REALTIME_SIGNALS != -1 ) should suffice, but I'll double-check with one of my portability gurus to see if that is OK for ACE. I have another request. Even though my preprocessor check was bogus, ACE still compiled, and I did not discover that there were any problems until link time, ie. I had a libACE.so library which could not link with anything because of unresolved symbols. This was very annoying. It would have been nicer if this could have been caught earlier in the compile stage. Since sigqueue(), sigwait(), sigwaitinfo() are not implemented in FreeBSD, is this patch OK? --- src/include/signal.h.orig Wed Oct 9 23:15:21 2002 +++ src/include/signal.h Wed Oct 9 23:15:31 2002 @@ -76,13 +76,6 @@ int sigwait(const sigset_t *, int *); #endif -#if __BSD_VISIBLE || __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600 -int sigqueue(__pid_t, int, const union sigval); -int sigtimedwait(const sigset_t * __restrict, siginfo_t * __restrict, - const struct timespec * __restrict); -int sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict); -#endif - #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE int killpg(__pid_t, int); int sigaltstack(const stack_t * __restrict, stack_t * __restrict); At some point in the future when POSIX RT signals are implemented in FreeBSD (I'm not volunteering :), then _POSIX_REALTIME_SIGNALS can be defined to 200112L in unistd.h, and these three prototypes can be put back into . Is this OK? Thanks. -- Craig Rodrigues http://www.gis.net/~craigr rodrigc@attbi.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message