Patches for CYGWIN, was Re: [Mono-list] Jit compiler

Paolo Molaro lupus@ximian.com
Thu, 20 Dec 2001 15:26:04 +0100


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