I think there's a bug in <sys/types.h> in that B_TRUE and B_FALSE
disappear from the namespace if you request XOPEN_ or POSIX compliance
with extensions via defines such as:

        -D_XOPEN_SOURCE=500 -D__EXTENSIONS__

But my understanding of what the standards say should happen here is
fuzzy.

I have some code which I need to extend to use the libxnet version of
recvmsg/sendmsg -- specifically the variant of struct msgheader which
contains msg_control/msg_controllen.

Other parts of that code use B_TRUE/B_FALSE for booleans.

But <sys/types.h> says:

#if defined(__XOPEN_OR_POSIX)
typedef enum { _B_FALSE, _B_TRUE } boolean_t;
#else
typedef enum { B_FALSE, B_TRUE } boolean_t;
#endif /* defined(__XOPEN_OR_POSIX) */

Is there any reason why this shouldn't be:

#if defined(__XOPEN_OR_POSIX) && !defined(__EXTENSIONS__) 
typedef enum { _B_FALSE, _B_TRUE } boolean_t;
#else
typedef enum { B_FALSE, B_TRUE } boolean_t;
#endif /* defined(__XOPEN_OR_POSIX) */

                                        - Bill

_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to