port.h: Add INFINITY macro.

This commit is contained in:
Thomas Faber 2012-06-17 15:59:25 +02:00 committed by Alexandre Julliard
parent 7d24e59229
commit cb8af0152c

View file

@ -199,6 +199,15 @@ struct statvfs
#define M_PI_2 1.570796326794896619
#endif
#ifndef INFINITY
static inline float __port_infinity(void)
{
static const unsigned __inf_bytes = 0x7f800000;
return *(const float *)&__inf_bytes;
}
#define INFINITY __port_infinity()
#endif
#ifndef NAN
static inline float __port_nan(void)
{