Author: jgardou
Date: Tue Aug 21 09:29:11 2012
New Revision: 57122
URL:
http://svn.reactos.org/svn/reactos?rev=57122&view=rev
Log:
[INCLUDES]
- Move NAN and INFINITY definition from wine/math.h to wine/port.h
- Delete wine/math.h
- Fix build
Removed:
trunk/reactos/include/reactos/wine/math.h
Modified:
trunk/reactos/dll/directx/wine/wined3d/wined3d_private.h
trunk/reactos/include/reactos/wine/port.h
Modified: trunk/reactos/dll/directx/wine/wined3d/wined3d_private.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/wined3d/w…
==============================================================================
--- trunk/reactos/dll/directx/wine/wined3d/wined3d_private.h [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/wine/wined3d/wined3d_private.h [iso-8859-1] Tue Aug 21
09:29:11 2012
@@ -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"
Removed: trunk/reactos/include/reactos/wine/math.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/math.…
==============================================================================
--- trunk/reactos/include/reactos/wine/math.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/math.h (removed)
@@ -1,26 +1,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_ */
Modified: trunk/reactos/include/reactos/wine/port.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/port.…
==============================================================================
--- trunk/reactos/include/reactos/wine/port.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/port.h [iso-8859-1] Tue Aug 21 09:29:11 2012
@@ -149,6 +149,24 @@
#ifndef M_PI_4
#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 */