[Mono-devel-list] [PATCH] Changes required to compile Mono HEAD with Visual Studio.NET 2005

Zoltan Varga vargaz at gmail.com
Fri Mar 11 13:01:06 EST 2005


                                                Hi,

  We already have a file to store compiler-specific stuff. Its
mono/utils/mono-compiler.h.

                Zoltan

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 ***
> 
> [1]     __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.
> 
> [2]     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...
> 
> /mono/io-layer/
> 
> * io-layer.h
>         Include <winsock2.h> before <windows.h>. Added missing includes
>         required by MSC.
> 
> /mono/mono/metadata/
> 
> * 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
>         inlining
> 
> * 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)
> 
> /mono/mono/mini/
> 
> aot.c
> * include <winsock2.h> before <windows.h>
> 
> mini.h
> * include "mono/metadata/msc.h" (new file) when compiled with MSC
> 
> mini-exceptions.c
> * replace usage of __builtin_frame_address and __builtin_return_address
> (GCC) with MSC "equivalent"
>         !!! See issue [1]
> 
> mini-x86.c
> * MSC doesn't like empty enum vector;
>         !!! not sure if this is ok !!! see [2]
> * changed to inline assembly to MSC format
> 
> mini-x86.h
> * MSC doesn't like empty struct
> 
> /mono/os/
> 
> gc_wrapper.h
>         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 mailing list