qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] gnu-c99-math.h include file


From: Juergen Keil
Subject: Re: [Qemu-devel] gnu-c99-math.h include file
Date: Fri, 8 Apr 2005 10:33:41 +0200 (CEST)


> Downloaded a tarball of the latest cvs bits to see about
> getting the latest changes melded with the working solaris
> host bits.
> 
> In fpu/softfloat-native.h, there is an include
> #include "gnu-c99-math.h" that is not part of 
> any of the gnu software I have loaded.

I've invented this file, to work around the problem that some of the
new C99 "math.h" features/macros like isnormal(), isgreater(),
isunordered(), etc... cannot be compiled with GNUC 3.4.x on Solaris 10
(the new macros can only be used with Sun's C-Compiler)



% cat gnu-c99-math.h
#if defined(__SVR4) && defined(__GNUC__)

/*
 * C99 7.12.3 classification macros
 * and
 * C99 7.12.14 comparison macros
 *
 * ... do not work on Solaris 10 using GNU CC 3.4.x.
 * Try to workaround the missing / broken C99 math macros.
 */
#include <ieeefp.h>

#define isnormal(x)             (fpclass(x) >= FP_NZERO)

#define isgreater(x, y)         ((x) > (y))
#define isgreaterequal(x, y)    ((x) >= (y))
#define isless(x, y)            ((x) < (y))
#define islessequal(x, y)       ((x) <= (y))

#define isunordered(x,y)        unordered(x, y)

#endif





reply via email to

[Prev in Thread] Current Thread [Next in Thread]