From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3446 Path: news.gmane.org!not-for-mail From: Paul Schutte Newsgroups: gmane.linux.lib.musl.general Subject: Fix for tcsh Date: Fri, 21 Jun 2013 11:19:01 +0200 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c259eeae199d04dfa68d9a X-Trace: ger.gmane.org 1371806355 11234 80.91.229.3 (21 Jun 2013 09:19:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Jun 2013 09:19:15 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3450-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jun 21 11:19:17 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 1UpxUx-0000LN-0w for gllmg-musl@plane.gmane.org; Fri, 21 Jun 2013 11:19:15 +0200 Original-Received: (qmail 11715 invoked by uid 550); 21 Jun 2013 09:19:13 -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 11707 invoked from network); 21 Jun 2013 09:19:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=JpwbpcjxLcSYYM3hNaeQ1ljhORyFPtQAOVxiwT2D3Bs=; b=auH99SRNFpqcPGeKYWeWxMHzLcP1QiYpo/8irLIeh+gpp3UsIfRcxzEx4oOLrtg0wg sd2e+cUUSZs/xcF0osBaoD38o831aAV/KlREGsn100NtawQ+GXdXv0eY/HUcCodQRxTG BoNBhOvMV/UItckQM/8DTFBGAZv7DKdH7xnxIxKNy7UA2fypGdFUl23Q4HQEKyiMewUA M8VFaM/+hylKUzmm3AXHAaYNXTbk1yOb8zJRFFiI8Tf6+UE2aVLCDl108aLcJT4b9d6a LTEMCceAeiYSXL+LHIRPhTLay8eECKG9qMIgBB5zO+eU+FWo4GpEykpOcgGnjzZm8FFc W/sA== X-Received: by 10.180.211.202 with SMTP id ne10mr2135003wic.39.1371806341403; Fri, 21 Jun 2013 02:19:01 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:3446 Archived-At: --001a11c259eeae199d04dfa68d9a Content-Type: text/plain; charset=ISO-8859-1 Good day, I just want to know what would be right approach to fixing the compile error in tcsh. I use the source code at ftp://ftp.astron.com/pub/tcsh/tcsh-6.18.01.tar.gz I get the following error: gcc -c -g -O2 -I. -I. -D_PATH_TCSHELL='"/usr/local/bin/tcsh"' sh.proc.c sh.proc.c: In function 'pchild': sh.proc.c:155:16: error: storage size of 'w' isn't known make: *** [sh.proc.o] Error 1 Those lines are: #ifdef BSDWAIT union wait w; #else /* !BSDWAIT */ int w; #endif /* !BSDWAIT */ If I just use //#ifdef BSDWAIT // union wait w; //#else /* !BSDWAIT */ int w; //#endif /* !BSDWAIT */ it compiles and works (for months now without an issue). My question really is what should the proper "ifdef" be if I want to send the fix to the tcsh maintainers ? Regards Paul --001a11c259eeae199d04dfa68d9a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Good day,

I just want to = know what would be right approach to fixing the compile error in tcsh.
<= br>
I use the source code at ftp://ftp.astron.com/pub/tcsh/tcsh-6.18.01.tar.gz<= br>
I get the following error:
gcc -c -g -O2 -I. -I. -D_PATH_TCSHE= LL=3D'"/usr/local/bin/tcsh"'=A0=A0=A0 sh.proc.c
sh.pro= c.c: In function 'pchild':
sh.proc.c:155:16: error: storage size= of 'w' isn't known
make: *** [sh.proc.o] Error 1

Those lines are:

#if= def BSDWAIT
=A0=A0=A0 union wait w;
#else /* !BSDWAIT */
=A0=A0=A0= int=A0=A0=A0=A0 w;
#endif /* !BSDWAIT */


If I jus= t use

//#ifdef BSDWAIT
// =A0=A0 union wait w;
//#else /* !BSDWAIT */<= br>=A0=A0=A0 int=A0=A0=A0=A0 w;
//#endif /* !BSDWAIT */

it compiles and works (for months now without an issue).


My question really is what should the proper "ifdef" be if = I want to send the fix to the tcsh maintainers ?

Regards
Paul

--001a11c259eeae199d04dfa68d9a-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3447 Path: news.gmane.org!not-for-mail From: Igmar Palsenberg Newsgroups: gmane.linux.lib.musl.general Subject: Re: Fix for tcsh Date: Fri, 21 Jun 2013 11:27:01 +0200 Message-ID: References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_22716646-0267-46CA-84D3-45EB44B04FBD" X-Trace: ger.gmane.org 1371806836 16227 80.91.229.3 (21 Jun 2013 09:27:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Jun 2013 09:27:16 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3451-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jun 21 11:27:17 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 1Upxci-0003Ed-As for gllmg-musl@plane.gmane.org; Fri, 21 Jun 2013 11:27:16 +0200 Original-Received: (qmail 17445 invoked by uid 550); 21 Jun 2013 09:27:15 -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 17434 invoked from network); 21 Jun 2013 09:27:15 -0000 In-Reply-To: X-Mailer: Apple Mail (2.1508) Xref: news.gmane.org gmane.linux.lib.musl.general:3447 Archived-At: --Apple-Mail=_22716646-0267-46CA-84D3-45EB44B04FBD Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 > I just want to know what would be right approach to fixing the compile = error in tcsh. >=20 > I use the source code at = ftp://ftp.astron.com/pub/tcsh/tcsh-6.18.01.tar.gz >=20 > I get the following error: > gcc -c -g -O2 -I. -I. -D_PATH_TCSHELL=3D'"/usr/local/bin/tcsh"' = sh.proc.c > sh.proc.c: In function 'pchild': > sh.proc.c:155:16: error: storage size of 'w' isn't known > make: *** [sh.proc.o] Error 1 >=20 > Those lines are: >=20 > #ifdef BSDWAIT > union wait w; > #else /* !BSDWAIT */ > int w; > #endif /* !BSDWAIT */ >=20 >=20 > If I just use >=20 > //#ifdef BSDWAIT > // union wait w; > //#else /* !BSDWAIT */ > int w; > //#endif /* !BSDWAIT */ >=20 > it compiles and works (for months now without an issue). >=20 >=20 > My question really is what should the proper "ifdef" be if I want to = send the fix to the tcsh maintainers ? There isn't one. tcsh needs to provide a test to see if this is present, = and currently has stuff hard-coded. The proper fix would be an test added to configure.in, and remove of the hardcoded = stuff in sh.proc.c Regards, Igmar= --Apple-Mail=_22716646-0267-46CA-84D3-45EB44B04FBD Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=iso-8859-1


I just want to know what would be right approach to fixing the compile error in tcsh.

I use the source code at ftp://ftp.astron.com/pub/tcsh/tcsh-6.18.01.tar.gz

I get the following error:
gcc -c -g -O2 -I. -I. -D_PATH_TCSHELL='"/usr/local/bin/tcsh"'    sh.proc.c
sh.proc.c: In function 'pchild':
sh.proc.c:155:16: error: storage size of 'w' isn't known
make: *** [sh.proc.o] Error 1

Those lines are:

#ifdef BSDWAIT
    union wait w;
#else /* !BSDWAIT */
    int     w;
#endif /* !BSDWAIT */


If I just use

//#ifdef BSDWAIT
//    union wait w;
//#else /* !BSDWAIT */
    int     w;
//#endif /* !BSDWAIT */

it compiles and works (for months now without an issue).


My question really is what should the proper "ifdef" be if I want to send the fix to the tcsh maintainers ?

There isn't one. tcsh needs to provide a test to see if this is present, and currently has stuff hard-coded. The proper fix
would be an test added to configure.in, and remove of the hardcoded stuff in sh.proc.c



Regards,




Igmar
--Apple-Mail=_22716646-0267-46CA-84D3-45EB44B04FBD-- From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3448 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 11:52:26 -0400 Message-ID: <20130621155225.GD29800@brightrain.aerifal.cx> References: 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 1371829965 9102 80.91.229.3 (21 Jun 2013 15:52:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Jun 2013 15:52:45 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3452-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jun 21 17:52:47 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 1Uq3di-0005ZT-66 for gllmg-musl@plane.gmane.org; Fri, 21 Jun 2013 17:52:42 +0200 Original-Received: (qmail 18091 invoked by uid 550); 21 Jun 2013 15:52:40 -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 18079 invoked from network); 21 Jun 2013 15:52:39 -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:3448 Archived-At: On Fri, Jun 21, 2013 at 11:19:01AM +0200, Paul Schutte wrote: > Good day, > > I just want to know what would be right approach to fixing the compile > error in tcsh. > > I use the source code at ftp://ftp.astron.com/pub/tcsh/tcsh-6.18.01.tar.gz > > I get the following error: > gcc -c -g -O2 -I. -I. -D_PATH_TCSHELL='"/usr/local/bin/tcsh"' sh.proc.c > sh.proc.c: In function 'pchild': > sh.proc.c:155:16: error: storage size of 'w' isn't known > make: *** [sh.proc.o] Error 1 > > Those lines are: > > #ifdef BSDWAIT > union wait w; > #else /* !BSDWAIT */ > int w; > #endif /* !BSDWAIT */ > > > If I just use > > //#ifdef BSDWAIT > // union wait w; > //#else /* !BSDWAIT */ > int w; > //#endif /* !BSDWAIT */ > > it compiles and works (for months now without an issue). > > > My question really is what should the proper "ifdef" be if I want to send > the fix to the tcsh maintainers ? Where is BSDWAIT defined? That's the location of the relevant ifdef. Using "union wait" on any Linux system, glibc ones included, is wrong; glibc just included gcc-specific hacks in the declaration of wait and waitpid to allow them to accept "union wait *" instead of "int *" if necessary. I suspect defined(__linux__) leads to #define BSDWAIT, in which case this should just be fixed. With that said, using "union wait" at all is nonsensical. As the standards require the argument to be int *, any modern BSD should work fine with int *. In case there are historical ones that prototype the functions with union wait *, it might work to simply declare "w" as int and cast it to (void *) when passing it to the functions. Rich From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3449 Path: news.gmane.org!not-for-mail From: Paul Schutte Newsgroups: gmane.linux.lib.musl.general Subject: Re: Fix for tcsh Date: Fri, 21 Jun 2013 22:00:56 +0200 Message-ID: References: <20130621155225.GD29800@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bf0c86c570c6d04dfaf855f X-Trace: ger.gmane.org 1371844869 4040 80.91.229.3 (21 Jun 2013 20:01:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Jun 2013 20:01:09 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3453-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jun 21 22:01:11 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 1Uq7WA-00025x-6d for gllmg-musl@plane.gmane.org; Fri, 21 Jun 2013 22:01:10 +0200 Original-Received: (qmail 15478 invoked by uid 550); 21 Jun 2013 20:01:08 -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 15431 invoked from network); 21 Jun 2013 20:01:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Tkx+V9B8X2gT8j/yeYWZVwI7YoxBhgGyX9rLLGb0OHo=; b=CAgAuHDzEzNSLH9xZqY7HT2h34oFDx6V50ZdrxMMlS9L7Ko3gcaI+2i1s8P5nC6rXQ Afl2toyz6IuLvgSCJsJ4DIWX5lXPpX0ed1rr0K+OzV2JwkZNikI6EMa5KHT6H7mjO4nm y9XWajxg+T/SIWkO99brfWaoFR/vY2Lcq6uwYH51bUcSQfgKNHNEQaof7P5clFKxgezd pRqkuw7pIwR0/YV66y4TqBQNdZhBbC8WZMmVy7OqEJd8/Gqs/fb1DT8nAkLrRfd8lc97 6hAFyXJuFKo7QVGIwB9fhoAWry5GYsTK0DtbQ/myklsNF8AESwGI/ruvGBPxsgPxyWIo SbAA== X-Received: by 10.194.93.74 with SMTP id cs10mr10619443wjb.9.1371844856185; Fri, 21 Jun 2013 13:00:56 -0700 (PDT) In-Reply-To: <20130621155225.GD29800@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:3449 Archived-At: --047d7bf0c86c570c6d04dfaf855f Content-Type: text/plain; charset=ISO-8859-1 Thanks Rich. I thought that BSDWAIT was defined in one of the standard headers. 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 */ Regards Paul On Fri, Jun 21, 2013 at 5:52 PM, Rich Felker wrote: > On Fri, Jun 21, 2013 at 11:19:01AM +0200, Paul Schutte wrote: > > Good day, > > > > I just want to know what would be right approach to fixing the compile > > error in tcsh. > > > > I use the source code at > ftp://ftp.astron.com/pub/tcsh/tcsh-6.18.01.tar.gz > > > > I get the following error: > > gcc -c -g -O2 -I. -I. -D_PATH_TCSHELL='"/usr/local/bin/tcsh"' > sh.proc.c > > sh.proc.c: In function 'pchild': > > sh.proc.c:155:16: error: storage size of 'w' isn't known > > make: *** [sh.proc.o] Error 1 > > > > Those lines are: > > > > #ifdef BSDWAIT > > union wait w; > > #else /* !BSDWAIT */ > > int w; > > #endif /* !BSDWAIT */ > > > > > > If I just use > > > > //#ifdef BSDWAIT > > // union wait w; > > //#else /* !BSDWAIT */ > > int w; > > //#endif /* !BSDWAIT */ > > > > it compiles and works (for months now without an issue). > > > > > > My question really is what should the proper "ifdef" be if I want to send > > the fix to the tcsh maintainers ? > > Where is BSDWAIT defined? That's the location of the relevant ifdef. > Using "union wait" on any Linux system, glibc ones included, is wrong; > glibc just included gcc-specific hacks in the declaration of wait and > waitpid to allow them to accept "union wait *" instead of "int *" if > necessary. I suspect defined(__linux__) leads to #define BSDWAIT, in > which case this should just be fixed. > > With that said, using "union wait" at all is nonsensical. As the > standards require the argument to be int *, any modern BSD should work > fine with int *. In case there are historical ones that prototype > the functions with union wait *, it might work to simply declare "w" > as int and cast it to (void *) when passing it to the functions. > > Rich > --047d7bf0c86c570c6d04dfaf855f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks Rich.

I thought th= at BSDWAIT was defined in one of the standard headers.

You are= right about where BSDWAIT is defined, but now I am back to how should I wr= ite the "ifdef" ?

I could use !(defined(__ANDROID__) || (defined(__linux__)&= & !defined(__GLIBC__)))=A0 in the place of "if !defined(__ANDR= OID__)", 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) && __STD= C__) || defined(__lucid) || defined(__linux__) || defined(__GNU__) || defin= ed(__GLIBC__)
# if !defined(__ANDROID__)
#=A0 define BSDWAIT
# endif
#end= if /* _BSD || (IRIS4D && __STDC__) || __lucid || glibc */

Regards
Paul



On Fri,= Jun 21, 2013 at 5:52 PM, Rich Felker <dalias@aerifal.cx> wr= ote:
On Fri, Jun 21, 2013 at 11:19:01AM +0200, Pa= ul Schutte wrote:
> Good day,
>
> I just want to know what would be right approach to fixing the compile=
> error in tcsh.
>
> I use the source code at ftp://ftp.astron.com/pub/tcsh/tcsh-6.18.= 01.tar.gz
>
> I get the following error:
> gcc -c -g -O2 -I. -I. -D_PATH_TCSHELL=3D'"/usr/local/bin/tcsh= "' =A0 =A0sh.proc.c
> sh.proc.c: In function 'pchild':
> sh.proc.c:155:16: error: storage size of 'w' isn't known > make: *** [sh.proc.o] Error 1
>
> Those lines are:
>
> #ifdef BSDWAIT
> =A0 =A0 union wait w;
> #else /* !BSDWAIT */
> =A0 =A0 int =A0 =A0 w;
> #endif /* !BSDWAIT */
>
>
> If I just use
>
> //#ifdef BSDWAIT
> // =A0 =A0union wait w;
> //#else /* !BSDWAIT */
> =A0 =A0 int =A0 =A0 w;
> //#endif /* !BSDWAIT */
>
> it compiles and works (for months now without an issue).
>
>
> My question really is what should the proper "ifdef" be if I= want to send
> the fix to the tcsh maintainers ?

Where is BSDWAIT defined? That's the location of the relevant ifdef. Using "union wait" on any Linux system, glibc ones included, is w= rong;
glibc just included gcc-specific hacks in the declaration of wait and
waitpid to allow them to accept "union wait *" instead of "i= nt *" if
necessary. I suspect defined(__linux__) leads to #define BSDWAIT, in
which case this should just be fixed.

With that said, using "union wait" at all is nonsensical. As the<= br> standards require the argument to be int *, any modern BSD should work
fine with int *. In case there are historical ones that prototype
the functions with union wait *, it might work to simply declare "w&qu= ot;
as int and cast it to (void *) when passing it to the functions.

Rich

--047d7bf0c86c570c6d04dfaf855f-- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3451 Path: news.gmane.org!not-for-mail From: Paul Schutte Newsgroups: gmane.linux.lib.musl.general Subject: Re: Fix for tcsh Date: Fri, 21 Jun 2013 22:26:20 +0200 Message-ID: References: <20130621155225.GD29800@brightrain.aerifal.cx> <20130621201653.GG29800@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bf0c86c2ff07904dfafe00b X-Trace: ger.gmane.org 1371846394 19143 80.91.229.3 (21 Jun 2013 20:26:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Jun 2013 20:26:34 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3455-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jun 21 22:26:33 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 1Uq7ui-0003mg-CY for gllmg-musl@plane.gmane.org; Fri, 21 Jun 2013 22:26:32 +0200 Original-Received: (qmail 10119 invoked by uid 550); 21 Jun 2013 20:26:31 -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 10111 invoked from network); 21 Jun 2013 20:26:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=GMogfNn8KgfD2ERpc3eouk9wrcN+XjAlu3HAn+4PlkQ=; b=0KrL/KW/IPZ8jQXduYVxVdVgy4T+tFZkFCo9cjFNrsL4DuMq5qHXjWC4T13D4GY3LO RHH9Tb6H2e/FN6KfZ3LN0OmPNv1Mz4VjB1j2pENVKCUIqWKKXLy9d7bM/hRAwMIfYhlV CoU4YwHuYAZCJWw9eQ/QEWGD8rquHARAWt8I/oei9iMJJUUQ7d/npa4LlBYOJsOh9Prk 64Z2gXA+LF7Yn/gaArGu2YOO6z6AMgf60eF1/iGTOGw6ggbf/K4iJ4jDKz8fixTO+78g sHGPoUqpKuGv38CLa52M+zdn5VSWg61gSbi2S7hsnfdzXCL8/HkiCMW8fqsbEZn/3Zfv bc2A== X-Received: by 10.194.93.74 with SMTP id cs10mr10680697wjb.9.1371846380350; Fri, 21 Jun 2013 13:26:20 -0700 (PDT) In-Reply-To: <20130621201653.GG29800@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:3451 Archived-At: --047d7bf0c86c2ff07904dfafe00b Content-Type: text/plain; charset=ISO-8859-1 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 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 > --047d7bf0c86c2ff07904dfafe00b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thank you very much Rich.

I re= ally appreciate you taking the time to help with this relatively trivial (f= or you guys) problem.

Regards
Paul


On Fri, Jun 21, 2013 at 10:16 PM, Rich F= elker <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__)))* =A0in 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<= br> > 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__)*
> # =A0define BSDWAIT
> # endif
> #endif /* _BSD || (IRIS4D && __STDC__) || __lucid || glibc */<= br>
It should be simply:

#if defined(_BSD) || (defined(IRIS4D) && __STDC__) || #defined(__lu= cid)

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

--047d7bf0c86c2ff07904dfafe00b--