[CMAKE]
authorAmine Khaldi <amine.khaldi@reactos.org>
Tue, 14 Jun 2011 17:04:03 +0000 (17:04 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Tue, 14 Jun 2011 17:04:03 +0000 (17:04 +0000)
* Skip ftp, libxslt and ksproxy from msvc build.
* Remove msvchelper.h as it's not needed anymore for d3d8 and d3d9.
* Merge r50731 from the cmake branch.
* Merge r50732 from the cmake branch and apply the same fix to state.c.

svn path=/trunk/; revision=52232

reactos/base/applications/network/CMakeLists.txt
reactos/dll/3rdparty/CMakeLists.txt
reactos/dll/directx/CMakeLists.txt
reactos/dll/directx/wine/d3d8/CMakeLists.txt
reactos/dll/directx/wine/d3d9/CMakeLists.txt
reactos/dll/directx/wine/wined3d/state.c
reactos/dll/directx/wine/wined3d/wined3d_private.h
reactos/include/reactos/msvchelper.h [deleted file]
reactos/include/reactos/wine/math.h [new file with mode: 0644]

index d961ff6..5d5899a 100644 (file)
@@ -2,7 +2,9 @@
 add_subdirectory(arp)
 add_subdirectory(dwnl)
 add_subdirectory(finger)
-add_subdirectory(ftp)
+if(NOT MSVC)
+    add_subdirectory(ftp) # FIXME: fix msvc build
+endif()
 add_subdirectory(ipconfig)
 add_subdirectory(net)
 add_subdirectory(netstat)
@@ -10,7 +12,7 @@ add_subdirectory(nslookup)
 add_subdirectory(ping)
 add_subdirectory(route)
 if(NOT MSVC)
-add_subdirectory(telnet)
+    add_subdirectory(telnet) # FIXME: fix msvc build
 endif()
 add_subdirectory(tracert)
 add_subdirectory(whois)
index bf60656..53f513c 100644 (file)
@@ -5,7 +5,8 @@ endif()
 add_subdirectory(libjpeg)
 add_subdirectory(libpng)
 add_subdirectory(libtiff)
-add_subdirectory(libxslt)
+
 if(NOT MSVC)
-add_subdirectory(mesa32)
+    add_subdirectory(libxslt)
+    add_subdirectory(mesa32)
 endif()
index 5a92a03..0f8f70a 100644 (file)
@@ -16,7 +16,9 @@ add_subdirectory(dplayx)
 add_subdirectory(dsound)
 #add_subdirectory(dsound_new) #disabled in trunk
 add_subdirectory(dxdiagn)
-add_subdirectory(ksproxy)
+if(NOT MSVC)
+    add_subdirectory(ksproxy) #FIXME: fix msvc build
+endif()
 add_subdirectory(ksuser)
 add_subdirectory(msdmo)
 #add_subdirectory(msdvbnp) #disabled in trunk
index fa6842f..5586bd6 100644 (file)
@@ -7,10 +7,6 @@ add_definitions(
 
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
-if(MSVC)
-    add_definitions(-FImsvchelper.h)
-endif()
-
 set_rc_compiler()
 
 spec2def(d3d8.dll d3d8.spec)
index bf2dd40..642815d 100644 (file)
@@ -7,10 +7,6 @@ add_definitions(
 
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
-if(MSVC)
-    add_definitions(-FImsvchelper.h)
-endif()
-
 set_rc_compiler()
 
 spec2def(d3d9.dll d3d9.spec)
index a2c197b..1db1d67 100644 (file)
@@ -963,7 +963,7 @@ void state_fogstartend(DWORD state, struct wined3d_stateblock *stateblock, struc
             fogend = tmpvalue.f;
             /* In GL, fogstart == fogend disables fog, in D3D everything's fogged.*/
             if(fogstart == fogend) {
-                fogstart = -1.0f / 0.0f;
+                fogstart = -1.0f * INFINITY;
                 fogend = 0.0f;
             }
             break;
index aaf1423..88c300d 100644 (file)
@@ -196,8 +196,8 @@ static inline float float_16_to_32(const unsigned short *in) {
     } else if(e < 31) {
         return sgn * powf(2, (float)e - 15.0f) * (1.0f + ((float)m / 1024.0f));
     } else {
-        if(m == 0) return sgn / 0.0f; /* +INF / -INF */
-        else return 0.0f / 0.0f; /* NAN */
+        if(m == 0) return sgn * INFINITY; /* +INF / -INF */
+        else return NAN;
     }
 }
 
@@ -218,8 +218,8 @@ static inline float float_24_to_32(DWORD in)
     }
     else
     {
-        if (m == 0) return sgn / 0.0f; /* +INF / -INF */
-        else return 0.0f / 0.0f; /* NAN */
+        if (m == 0) return sgn * INFINITY; /* +INF / -INF */
+        else return NAN;
     }
 }
 
diff --git a/reactos/include/reactos/msvchelper.h b/reactos/include/reactos/msvchelper.h
deleted file mode 100644 (file)
index bbd7627..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-
-//
-#ifdef _M_IX86
-void __stdcall wined3d_mutex_lock(void);
-void __stdcall wined3d_mutex_unlock(void);
-void* __stdcall WineDirect3DCreate(unsigned int dxVersion,void *parent);
-
-void __inline wined3d_mutex_lock_inline(void)
-{
-    wined3d_mutex_lock();
-}
-
-void __inline wined3d_mutex_unlock_inline(void)
-{
-    wined3d_mutex_unlock();
-}
-
-__inline
-struct IWineD3D* WineDirect3DCreate_inline(unsigned int dxVersion,void *parent)
-{
-    return WineDirect3DCreate(dxVersion, parent);
-}
-
-#define wined3d_mutex_lock wined3d_mutex_lock_inline
-#define wined3d_mutex_unlock wined3d_mutex_unlock_inline
-#define WineDirect3DCreate WineDirect3DCreate_inline
-
-#endif /* _M_IX86 */
-
-
-
-
diff --git a/reactos/include/reactos/wine/math.h b/reactos/include/reactos/wine/math.h
new file mode 100644 (file)
index 0000000..1d86ef9
--- /dev/null
@@ -0,0 +1,26 @@
+#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_ */