[Mono-devel-list] Native code in mcs & Mono.Posix
bernard at ugsolutions.com
Thu Jan 8 18:41:22 EST 2004
My question seemed to generate quite a bit of discussion...
I can understand cairo is different and anyway it works better because it
checks for cairo itself being installed via pkg-config.
The Mono.Posix stuff however seems a little different and it is harder for
the makefiles to decide whether to build or not - so I think it just has to
work. If it stays where it is then perhaps use of libtool is one way - or
the sort of makefile parameterization I started - or moving the native code
elsewhere - at least the native code that does the flag mapping - the libc
imports themselves are more portable anyway (assuming you use a dllmap for
libc if necessary). Or lupus suggested removal of the helper lib completely
but I wasn't quite sure how yet keeping IL portable.
It did make me think of the question of what is the policy of portability of
managed DLLs across platforms (other than Windows). I'd assumed that any
library DLL should work across all Unix platforms and only the native
libraries change. Though of course some functionality might not work at run
time - such as IPV6 at present - but the IL is identical. This makes me
think some form of mapping of constants is needed in this case as they
aren't guaranteed to be the same across platform... (though no doubt many
are in practice)
For the moment I'll continue with the makefile parameterization as that is
least change until a better solution is decided upon.
----- Original Message -----
From: "Miguel de Icaza" <miguel at ximian.com>
To: "Peter Williams" <peter at newton.cx>
Cc: "Bernie Solomon" <bernard at ugsolutions.com>;
<mono-devel-list at lists.ximian.com>
Sent: Thursday, January 08, 2004 7:59 AM
Subject: Re: [Mono-devel-list] Native code in mcs & Mono.Posix
> > On Wed, 2004-01-07 at 22:17, Miguel de Icaza wrote:
> > > The reason for the code to live in mcs, is that the C code that is
> > > compiled needs to know about the values defined in the C# world. So
> > > solution is to use a C# program with attributes, and from this we
> > > generate the C code that gets compiled.
> > Does anything in the MCS module actually use Mono.Posix? If it were
> > possible, I think it would make sense to move Mono.Posix into its own
> > module and write a quick configure script for it. The gdiplus code, on
> > the other hand, is not generated from C# land, so it could go into the
> > mono/ module perhaps.
> Not Mono, but other people do. To establish Unix-based transport
> sockets instead of the IP end points that Microsoft supports.
> Also, typically applications end up pinvoking Chown/chmod/etc on their
> own, so it made sense to provide this functionality there.
> I do not want to move the cairo code to mono, because it adds too many
> dependencies there, and today we are treating cairo/System.Drawing as an
> optional feature (it is not working stably anyways, and is being
More information about the Mono-devel-list