Date: Wed, 9 Oct 2002 23:20:56 -0400 From: Craig Rodrigues <rodrigc@attbi.com> To: freebsd-standards@freebsd.org Cc: freebsd-hackers@freebsd.org Subject: Re: Problem detecting POSIX symbolic constants Message-ID: <20021009232056.A10429@attbi.com> In-Reply-To: <3DA4E61C.DCC8F543@mindspring.com>; from tlambert2@mindspring.com on Wed, Oct 09, 2002 at 07:29:48PM -0700 References: <20021009222307.A9894@attbi.com> <3DA4E61C.DCC8F543@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <signal.h>. 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021009232056.A10429>