pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/41170: pkgsrc/x11/xplanet build fails on solaris (patch included)



The following reply was made to PR pkg/41170; it has been noted by GNATS.

From: Tim Zingelman <tez%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/41170: pkgsrc/x11/xplanet build fails on solaris (patch 
        included)
Date: Wed, 8 Apr 2009 07:32:00 -0500

 On Wed, Apr 8, 2009 at 5:10 AM, Joerg Sonnenberger
 <joerg%britannica.bec.de@localhost> wrote:
 > The following reply was made to PR pkg/41170; it has been noted by GNATS.
 >
 > From: Joerg Sonnenberger <joerg%britannica.bec.de@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc:
 > Subject: Re: pkg/41170: pkgsrc/x11/xplanet build fails on solaris (patch
 > =A0 =A0 =A0 =A0included)
 > Date: Wed, 8 Apr 2009 12:08:09 +0200
 >
 > =A0On Wed, Apr 08, 2009 at 02:05:00AM +0000, tez%netbsd.org@localhost wrote:
 > =A0> +#ifndef signbit
 > =A0> +#define signbit(x) \
 > =A0> + =A0(sizeof(x) =3D=3D sizeof(float) \
 > =A0> + =A0 =A0 ? ({ union { float f; unsigned int i[1]; } __s; \
 > =A0> + =A0 =A0 =A0 =A0__s.f =3D (x); __s.i[0] >> 31; }) \
 > =A0> + =A0 =A0 : sizeof(x) =3D=3D sizeof(long double) \
 > =A0> + =A0 =A0 =A0 ? ({ union { long double f; unsigned int i[4]; } __s; =
 \
 > =A0> + =A0 =A0 =A0 =A0 =A0__s.f =3D (x); __s.i[0] >> 31; }) \
 > =A0> + =A0 =A0 =A0 : ({ union { double f; unsigned int i[2]; } __s; \
 > =A0> + =A0 =A0 =A0 =A0 =A0__s.f =3D (x); __s.i[0] >> 31; }))
 > =A0> +#endif /* signbit */
 > =A0> +
 >
 > =A0Why not simply
 > =A0#ifndef signbit
 > =A0#define signbit(x) (x < 0 ? 1 : 0)
 > =A0#endif
 > =A0If you have to deal with NaNs at that point, add an explicit check.
 
 I figured I should put in the complete solution in case someone copies
 this fix into some other place.  (I didn't write that, it is from the
 c99 math header file.)
 I read a report that a fix using < 0 resulted in wrong operation of
 xplanet... perhaps it needs to be < 0.0 ?  It's been too many years
 since I thought about implicit type conversions in c++.
 
 Also, the reason I did a PR was that this package has a keeper...
 otherwise I would have just gotten approval from my sponsor and done
 the commit directly.
 
 Is it known that the current keeper atatat is no longer active?  (I
 may have seen an unrelated comment about him no longer reading email
 in ICB?)
 


Home | Main Index | Thread Index | Old Index