[INCLUDES]

- Move NAN and INFINITY definition from wine/math.h to wine/port.h
- Delete wine/math.h
- Fix build

svn path=/trunk/; revision=57122
This commit is contained in:
Jérôme Gardou 2012-08-21 09:29:11 +00:00
parent ac27322cee
commit 3023aa795c
3 changed files with 19 additions and 26 deletions

View file

@ -37,6 +37,7 @@
#include "winuser.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/port.h"
#include "objbase.h"
#include "wine/wined3d.h"

View file

@ -1,26 +0,0 @@
#ifndef __WINE_MATH_H_
#define __WINE_MATH_H_
#include <crt/math.h>
#ifdef _MSC_VER
__forceinline float _NaN()
{
unsigned long NaN = 0x7fc00000;
return *(float*)&NaN;
}
#define NAN _NaN()
__forceinline float _Infinity()
{
unsigned long Infinity = 0x7f800000;
return *(float*)&Infinity;
}
#define INFINITY _Infinity()
#else
#define NAN (0.0f / 0.0f)
#define INFINITY (1.0F/0.0F)
#endif
#endif /* __WINE_MATH_H_ */

View file

@ -151,6 +151,24 @@ struct statfs;
#define M_PI_4 0.785398163397448309616
#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)
{
static const unsigned __nan_bytes = 0x7fc00000;
return *(const float *)&__nan_bytes;
}
#define NAN __port_nan()
#endif
/* Constructor functions */
#ifdef _MSC_VER