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
[EMAIL PROTECTED]       BBN Technologies, a Verizon company
(617) 873-4725         Cambridge, MA

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to