Patches for CYGWIN, was Re: [Mono-list] Jit compiler
Dan Lewis
dihlewis@yahoo.co.uk
Thu, 20 Dec 2001 15:11:46 -0000
As far as I remember the cygwin implementation of mmap() is one hell of
a hack. The native MapViewOfFile() call in win32 only works on 64K blocks,
so cygwin needs to do a lot of hairy stuff to expose a reasonable unix style
mmap().
(I see rawbuffer.c uses an 8K page size - maybe try changing it to 64K)
----- Original Message -----
From: "Paolo Molaro" <lupus@ximian.com>
To: <mono-list@ximian.com>
Sent: Thursday, December 20, 2001 2:26 PM
Subject: Re: Patches for CYGWIN, was Re: [Mono-list] Jit compiler
> On 12/20/01 David Dawkins wrote:
> > - Replace the fopen() call in do_mono_image_open() with:
> > #if defined(__CYGWIN__)
> > image->f = fopen (fname, "rb"); /* open binary */
> > #else
> > image->f = fopen (fname, "r");
> > #endif
>
> I used fopen(..., "rb") unconditionally, fixed in cvs.
>
> > You'll probably need to disable the mmap() call in rawbuffer.c
> > too:
> >
> > - Replace the call to mmap() with the following:
> >
> > #if defined(__CYGWIN__)
> > mmap_ptr = (char *) -1;
> > #else
> > mmap_ptr = mmap (0, end - start, prot, flags, fd, start);
> > #endif
>
> mmap on cygwin has been disabled since September.
> I'd appreciate, though, if a win32 programmer could find out why it
> fails.
>
> lupus
>
> --
> -----------------------------------------------------------------
> lupus@debian.org debian/rules
> lupus@ximian.com Monkeys do it better
>
> _______________________________________________
> Mono-list maillist - Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com