[Mono-devel-list] [PATCH] Changes required to compile Mono HEAD with Visual Studio.NET 2005
vargaz at gmail.com
Fri Mar 11 13:01:06 EST 2005
We already have a file to store compiler-specific stuff. Its
On Fri, 11 Mar 2005 12:49:07 -0500, Sebastien Pouliot
<sebastien at ximian.com> wrote:
> Hello everyone,
> Here's an updated patch to make mono HEAD compilable with VS.NET 2005
> (and probably earlier versions too). Please note that most of the
> changes are from the previous work of J Lothian. Thanks again!
> There is no project/solution files attached as I still have to clean
> them from system (mine) specific paths... and reorganize it to avoid
> some warnings. With a little luck it will be possible to add them in SVN
> alter without requiring much custom editing.
> The changes do not seems to affect compilation/results of Mono under
> cygwin or Linux. However I do not know if this affects compilation under
> mingw. Anyone using mingw to compile Mono ?
> *** Main issues ***
>  __builtin_frame_address(1) is a lot more complex to implement
> than __builtin_frame_address(0)
> This means that some samples (like the embedded samples) don't
> work but (hapilly ;-) I'm able to do the security stack walk
> (because they do not requires (1)).
> My last attempt to fix that (using naked functions) failed :-(.
> I will give it another try this weekend.
>  MS C (Microsoft C compiler) doesn't like empty enums. We got one
> like that in mini-x86.c.
> Here is a description of the changes...
> * io-layer.h
> Include <winsock2.h> before <windows.h>. Added missing includes
> required by MSC.
> * appdomain.c
> Type casting to LPTHREAD_START_ROUTINE in CreateThread
> * appdomain.h
> Changed inline to MONO_INLINE as MSC doesn't like this case of
> * assembly.c
> add include for "msc.h" (for MONO_ASSEMBLIES)
> * domain.c
> Removed inline from functions (they are already inline in
> appdomain.h) because they cause link errors with MSC
> * threads.c
> Add required typecast.
> MSC similar to MINGW32
> * sysmath.h
> include "msc.h" when compiled with MSC
> * rawbuffer.c
> include <winsock2.h> before <windows.h>
> * rand.c
> include <windows.h> before <WinCrypt.h>
> removed warning (missing typecast)
> * include <winsock2.h> before <windows.h>
> * include "mono/metadata/msc.h" (new file) when compiled with MSC
> * replace usage of __builtin_frame_address and __builtin_return_address
> (GCC) with MSC "equivalent"
> !!! See issue 
> * MSC doesn't like empty enum vector;
> !!! not sure if this is ok !!! see 
> * changed to inline assembly to MSC format
> * MSC doesn't like empty struct
> Include <winsock2.h> before including anything else (<windows.h>
> in particular) from gc.
> Sebastien Pouliot <sebastien at ximian.com>
> blog: http://pages.infinit.net/ctech/poupou.html
More information about the Mono-devel-list