This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: Problem with <math.h> and -D_GNU_SOURCE and GCC 2.95.1
- To: Andreas Jaeger <aj@arthur.rhein-neckar.de>
- Subject: Re: Problem with <math.h> and -D_GNU_SOURCE and GCC 2.95.1
- From: George Talbot <george@moberg.com>
- Date: Tue, 24 Aug 1999 06:52:00 -0400 (EDT)
- cc: libc-alpha@sourceware.cygnus.com
On 24 Aug 1999, Andreas Jaeger wrote:
> >>>>> George T Talbot writes:
>
> > If I compile a C program with -D_GNU_SOURCE, and I include <math.h>,
> > which I'm doing so I can get to some extra features, such as the NAN
> > #define, I get the following compilation error:
>
> Should be fixed in glibc 2.2. The current code is:
So, download 2.2, and I should be OK, right?
--
George T. Talbot
<george@moberg.com>
> /* The gcc, version 2.7 or below, has problems with all this inlining
> code. So disable it for this version of the compiler. */
> # if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 7))
> /* Test for negative number. Used in the signbit() macro. */
> __MATH_INLINE int
> __signbitf (float __x)
> {
> __extension__ union { float __f; int __i; } __u = { __f: __x };
> return __u.__i < 0;
> }
> __MATH_INLINE int
> __signbit (double __x)
> {
> __extension__ union { double __d; int __i[2]; } __u = { __d: __x };
> return __u.__i[1] < 0;
> }
> __MATH_INLINE int
> __signbitl (long double __x)
> {
> __extension__ union { long double __l; int __i[3]; } __u = { __l: __x };
> return (__u.__i[2] & 0x8000) != 0;
> }
> # endif
> #endif
>
> Andreas
> --
> Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
> for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de
>