[runtime] Fix the windows build. Define _WINSOCKAPI_ to fix the compilation problems...
authorZoltan Varga <vargaz@gmail.com>
Sat, 13 Sep 2014 00:07:05 +0000 (20:07 -0400)
committerZoltan Varga <vargaz@gmail.com>
Sat, 13 Sep 2014 00:07:05 +0000 (20:07 -0400)
mono/utils/mono-compiler.h
mono/utils/mono-poll.c [changed mode: 0644->0755]
msvc/mono.def
msvc/mono.props

index c1d0e27a49cb85d35aca8d34865d28aaa8b63fbf..2b330b9bb9dfcc21decaf4a81e359a6241aaf5e1 100644 (file)
 #endif
 
 #include <float.h>
-#define isnan(x)       _isnan(x)
 #define trunc(x)       (((x) < 0) ? ceil((x)) : floor((x)))
+#if _MSC_VER < 1800 /* VS 2013 */
+#define isnan(x)       _isnan(x)
 #define isinf(x)       (_isnan(x) ? 0 : (_fpclass(x) == _FPCLASS_NINF) ? -1 : (_fpclass(x) == _FPCLASS_PINF) ? 1 : 0)
 #define isnormal(x)    _finite(x)
+#endif
 
 #define popen          _popen
 #define pclose         _pclose
old mode 100644 (file)
new mode 100755 (executable)
index 7326254..5e5adfe
@@ -20,6 +20,11 @@ mono_poll (mono_pollfd *ufds, unsigned int nfds, int timeout)
 }
 #else
 
+#ifdef HOST_WIN32
+/* For select */
+#include <winsock2.h>
+#endif
+
 int
 mono_poll (mono_pollfd *ufds, unsigned int nfds, int timeout)
 {
index 61d1779c336f0c0e92e509eaf94a9c5b3e3d0100..72c3c4c0d7e5ebe05f583e7d51154a258735009d 100644 (file)
@@ -537,7 +537,6 @@ mono_metadata_guid_heap
 mono_metadata_implmap_from_method
 mono_metadata_init
 mono_metadata_interfaces_from_typedef
-mono_metadata_load_generic_param_constraints
 mono_metadata_load_generic_params
 mono_metadata_locate
 mono_metadata_locate_token
index 7fe3206e2485d7584d46e902cd91734e3a486bac..ef26f9180d7e7b6c64ae677faa1c78da0152ca18 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup Label="MonoDefines">
     <top_srcdir>$(MSBuildProjectDirectory)\..</top_srcdir>
@@ -9,7 +9,7 @@
   </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
-      <PreprocessorDefinitions>__default_codegen__;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H;GC_NOT_DLL;WIN32_THREADS;WINVER=0x0500;_WIN32_WINNT=0x0500;_WIN32_IE=0x0501;_UNICODE;UNICODE;WIN32_THREADS;FD_SETSIZE=1024;$(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>__default_codegen__;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;HAVE_CONFIG_H;GC_NOT_DLL;WIN32_THREADS;WINVER=0x0500;_WIN32_WINNT=0x0500;_WIN32_IE=0x0501;_UNICODE;UNICODE;WIN32_THREADS;FD_SETSIZE=1024;$(PreprocessorDefinitions);_WINSOCKAPI_</PreprocessorDefinitions>
     </ClCompile>
     <Link>
       <AdditionalDependencies>Mswsock.lib;ws2_32.lib;ole32.lib;oleaut32.lib;psapi.lib;version.lib;advapi32.lib;winmm.lib;kernel32.lib;$(AdditionalDependencies)</AdditionalDependencies>