[darcs-users] MinGW compile problem

David Roundy droundy at abridgegame.org
Fri Nov 14 02:54:40 UTC 2003


On Fri, Nov 14, 2003 at 02:49:59AM +0100, Gour wrote:
> After compling wxWindows & wxhaskell with MinGW compiler (MSYS environment),
> I am trying to compile darcs on Win98 (under win4lin on Gentoo).
> 
> Compling fails on not-declared entities from mman.h i.e.:
> 
> <snip>
> ghc   -optc-O2 -c fpstring.c
> fpstring.c: In function `my_mmap':
> fpstring.c:73: `PROT_READ' undeclared (first use in this function)
> fpstring.c:73: (Each undeclared identifier is reported only once
> fpstring.c:73: for each function it appears in.)
> fpstring.c:73: `MAP_SHARED' undeclared (first use in this function)
> fpstring.c:74: `MAP_FAILED' undeclared (first use in this function)
> make: *** [fpstring.o] Error 1
> 
> Googling a little bit I found that some hack is required, but it's too late
> for today.
> 
> Any help is appreciated.

Well, mmap isn't required, so you could simply put the call to mmap in an
#ifndef _WIN32 and configure with --disable-mmap.  Or you could (in an
#ifdef) define these macros to be some bogus values.  In that case you'd be
using a completely untested windows mmap (see compat.c).
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list