From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3450 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Fix for tcsh Date: Fri, 21 Jun 2013 16:16:54 -0400 Message-ID: <20130621201653.GG29800@brightrain.aerifal.cx> References: <20130621155225.GD29800@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1371845829 13383 80.91.229.3 (21 Jun 2013 20:17:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Jun 2013 20:17:09 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3454-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jun 21 22:17:10 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Uq7lb-0002bL-CV for gllmg-musl@plane.gmane.org; Fri, 21 Jun 2013 22:17:07 +0200 Original-Received: (qmail 5169 invoked by uid 550); 21 Jun 2013 20:17:06 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5161 invoked from network); 21 Jun 2013 20:17:06 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3450 Archived-At: 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