Added support for Mono/Linux

This patch allows to use the FoundationDB client on Mono/Linux, tested on ver. 3.7 and CentOS 6.5

Just define MONO and it will compile for Mono/Linux
Hi Christophe.

I have modified the SafeLibraryHandle to allow to be initialized from an
IntPtr so it uses the same class on mono (it was a mistake by my part, did
not saw SafeHandleZeroOrMinusOneIsInvalid allowed to set the underliying
handle) .

And all the wrapping is because Mono does not support CriticalHandles as
parameters to native calls, they must be IntPtr's, so I had to wrap the
native calls to create those handles.

Cheers.


2014-08-11 14:15 GMT+02:00 Christophe Chevalier <notifications@github.com>:

> In FoundationDB.Client/Native/FdbNative.cs:
>
> > @@ -62,6 +68,434 @@ internal static unsafe class FdbNative
> >  		internal static class NativeMethods
> >  		{
> >
> > +#if MONO
> > +
> > +
> > +			private static class RealNativeCalls
>
> I'm not sure why you need to create a different set of native calls
> specific for linux ? If you simplify #ifdef the value of FDB_C_DLL to
> libfdb_c.so on Linux (like you did above), shouldn't the rest of the
> marshalling code be the same ? (except the LoadLibrary stuff)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Doxense/foundationdb-dotnet-client/pull/31/files#r16049355>
> .
>