Include <stdint.h> to allow cross-compilation from OS X.
authorJosh DuBois <duboisj@CodeWeavers.com>
Tue, 12 Feb 2013 17:55:35 +0000 (11:55 -0600)
committerJosh DuBois <duboisj@CodeWeavers.com>
Tue, 12 Feb 2013 17:59:29 +0000 (11:59 -0600)
Cross-compiling mono on an OS X host for a Windows target using
mingw-w64 fails because of undefined __int64 types in a couple of places.

Including <stdint.h> fixes this and allows the OS X host to cross-compile
a Windows mono.

It probably sounds like an obscure use-case, but the wine-mono
project does just this, so ability to cross-compile for Windows on OS X
is crucial to being able to build wine-mono on a Mac.

libgc/include/gc.h
mono/tests/mixed-mode/MixedModeLibrary/NativeApp.cpp

index cd9efcd10af477ff7c1375a64a1d830111814323..123d6cce0893b3860763a68d3726739e6298791d 100644 (file)
@@ -61,6 +61,7 @@
   /* Win64 isn't really supported yet, but this is the first step. And */
   /* it might cause error messages to show up in more plausible places.        */
   /* This needs basetsd.h, which is included by windows.h.             */
+  #include <stdint.h>
   typedef unsigned __int64 GC_word;
   typedef __int64 GC_signed_word;
 #endif
index b17ffb7c923404e4f3e35d926cb452161fbadee7..ff97a7e03eca09c0cef1e3a125123786a2d46723 100644 (file)
@@ -7,6 +7,7 @@ typedef HRESULT (STDAPICALLTYPE *MONOFIXUPCOREE) (HMODULE);
 typedef void (__stdcall *WRITESTRING) (const wchar_t*);
 
 #ifdef _WIN64
+#include <stdint.h>
 extern "C" void __security_check_cookie(unsigned __int64 value)
 {
 }