Thank you very much Rich.

I really appreciate you taking the time to help with this relatively trivial (for you guys) problem.

Regards
Paul


On Fri, Jun 21, 2013 at 10:16 PM, Rich Felker <dalias@aerifal.cx> wrote:
On Fri, Jun 21, 2013 at 10:00:56PM +0200, Paul Schutte wrote:
> Thanks Rich.
>
> I thought that BSDWAIT was defined in one of the standard headers.

If that were the case, you never would have had any problems, since
musl does not define it.

> You are right about where BSDWAIT is defined, but now I am back to how
> should I write the "ifdef" ?
>
> I could use* !(defined(__ANDROID__) || (defined(__linux__)&&
> !defined(__GLIBC__)))*  in the place of "if !defined(__ANDROID__)", but
> then things might go wrong for uclibc and other libcs.
>
> If I understand you correctly, all new implementations should use int
> instead of union, so above ifdef should be a workable solution.
>
> #if defined(_BSD) || (defined(IRIS4D) && __STDC__) || defined(__lucid) ||
> defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
> *# if !defined(__ANDROID__)*
> #  define BSDWAIT
> # endif
> #endif /* _BSD || (IRIS4D && __STDC__) || __lucid || glibc */

It should be simply:

#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || #defined(__lucid)

BSDWAIT (union wait instead of int) is available as a legacy
compatibility interface on glibc, but it's not desirable to use it,
much less necessary. Fixing this would eliminate the need for a
special-case excluding android, too.

Rich