Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Mar 2002 17:01:07 -0500
From:      Craig Rodrigues <crodrigu@bbn.com>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: How to correctly detect POSIX 1003.1b features on FreeBSD?
Message-ID:  <20020312170107.A1666@bbn.com>
In-Reply-To: <3C8E742C.7C2E63B8@mindspring.com>; from tlambert2@mindspring.com on Tue, Mar 12, 2002 at 01:33:32PM -0800
References:  <20020312140904.A799@bbn.com> <3C8E742C.7C2E63B8@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 12, 2002 at 01:33:32PM -0800, Terry Lambert wrote:
> > If I read the posix4(9) man page, it says that
> > I need to check _POSIX_VERSION, _POSIX_C_SOURCE, and
> > _POSIX_SOURCE macros to detect what POSIX features
> > are available.
> 
> THat's *CHECK*, _not_ *SET*.  If something begins with an "_",
> it's for you to check, not for you to set.

I understand.  I didn't write the code in ACE that sets
_P1003_1B_VISIBLE, so I am trying to fix it in the correct manner.

> > #if (!defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)) || \
> >  (_POSIX_VERSION  >= 199309L && defined(_POSIX_C_SOURCE) && \
> >   _POSIX_C_SOURCE >= 199309L)
> > #define _P1003_1B_VISIBLE
> > #define _P1003_1B_VISIBLE_HISTORICALLY
> > #endif



The other question I have is, when
is _P1003_1B_VISIBLE actually defined?

In <sys/_posix.h>, it looks like that _P1003_1B_VISIBLE is
only defined if _KERNEL is defined.  So, this macro
is only defined if you are compiling kernel code.

For user-level (not kernel level) code, is it better
to check the _POSIX_SOURCE, _POSIX_VERSION, and _POSIX_C_SOURCE
myself, with:

#if (!defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)) || \
  (_POSIX_VERSION  >= 199309L && defined(_POSIX_C_SOURCE) && \
  _POSIX_C_SOURCE >= 199309L)

/* put code which requires 1003.1b here */

#endif


Also, can someone tell me what _POSIX_VERSION expand to
on FreeBSD current?

On FreeBSD 4.3, it expands to: 199009L

What is the status of the asynch I/O code in FreeBSD current?
Is it compiled in by default, or is it still an option?

Thanks.
 
-- 
Craig Rodrigues        Distributed Systems and Logistics, Office 6/304
crodrigu@bbn.com       BBN Technologies, a Verizon company
(617) 873-4725         Cambridge, MA

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?20020312170107.A1666>