Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 21 Jun 2013 16:16:54 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Fix for tcsh

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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.