The ddraw tests don't compile with Visual C++ 2005.
Kuba Ober
kuba at mareimbrium.org
Fri Jun 1 08:31:28 CDT 2007
On Sunday 27 May 2007, Francois Gouget wrote:
> On Sun, 27 May 2007, Marcus Meissner wrote:
> [...]
>
> > Why doesn't the code try using the INFINITY and NAN #defines?
> > Would this help with Visual C++?
>
> Do you mean the INFINITY macro defined in /usr/include/bits/inf.h?
> (which one gets through math.h)
>
> I have not found any macro called INFINITY in the PSDK or the
> Visual C++ headers. So this would not work.
>
> Visual C++'s math.h header has a _HUGE and a HUGE symbol that look like
> they could be +INFINITY but this would not work in Wine (Winelib apps
> cannot import exported variables).
Isn't it possible to have some wine-local constants for them?
Such as:
const union {
unsigned int i;
float f;
}
WINE__INF32 = { 0x7F800000 },
WINE__NINF32 = { 0xFF800000 },
WINE__NAN32 = { 0x7F800001 };
const union {
unsigned long long int i;
double d;
}
WINE__INF64 = { 0x7FF0000000000000LL },
WINE__NINF64 = { 0xFFF0000000000000LL },
WINE__NAN64 = { 0x7FF0000000000001LL };
#define WINE_F_INF (WINE__INF32.f)
#define WINE_F_NINF (WINE__NINF32.f)
#define WINE_F_NAN (WINE__NAN32.f)
#define WINE_INF (WINE__INF64.d)
#define WINE_NINF (WINE__NINF64.d)
#define WINE_NAN (WINE__NAN64.d)
I don't know how that plays with endianness, but that's for someone else to
figure out :) Where no LL suffix (or no long long) is supported, we can have
a struct of two ints instead of a long long int member.
Cheers, Kuba
More information about the wine-devel
mailing list