Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

programming and portability

8 views
Skip to first unread message

Tim Larson

unread,
Jul 28, 2008, 4:11:47 PM7/28/08
to
How does one deal with _POSIX_SOURCE and _BSD_SOURCE, specifically in
sys/wait.h? I've got some code that assumes the BSD-style union wait if
UNION_WAIT is defined (it doesn't appear to be) but otherwise an int.
Somehow, this int apparently is being passed to the BSD-style macros
(e.g. WIFSTOPPED) even though neither _*_SOURCE is defined anywhere. So
I'm unsure how the union or those macros are even accessible. AFAICT
there shouldn't be _any_ wait-related definitions.

Hope this has made sense. Please help!


Thanks,
Tim

Helge Blischke

unread,
Jul 29, 2008, 6:55:32 AM7/29/08
to

Though it is a couple of years ago that I compiled C programs on A/UX,
I think the _POSIX_SOURCE gets defined by A/UX's cc as well as gcc if
the "-posix" switch is applied, otherwise _BSD_SOURCE will be defined.

Helge


--
Helge Blischke
Softwareentwicklung

H.Bli...@acm.org

0 new messages