Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > programming and portability
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 25th May 05:14
tim larson
External User
 
Posts: 1
Default programming and portability



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
  Reply With Quote


  sponsored links


2 25th May 05:14
helge blischke
External User
 
Posts: 1
Default programming and portability



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.Blischke@acm.org
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666