[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Portability fixes for win32 cross compiling
From: |
Volker Grabsch |
Subject: |
Re: Portability fixes for win32 cross compiling |
Date: |
Fri, 28 May 2010 16:56:04 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Ludovic Courtès <address@hidden> schrieb:
> Volker Grabsch <address@hidden> writes:
> >
> > --- a/libguile/objcodes.c
> > +++ b/libguile/objcodes.c
> > @@ -23,7 +23,6 @@
> > #include <string.h>
> > #include <fcntl.h>
> > #include <unistd.h>
> > -#include <sys/mman.h>
> > #include <sys/stat.h>
> > #include <sys/types.h>
> > #include <assert.h>
>
> This one is wrong: the file uses mmap(3), which is declared in
> <sys/mman.h> according to
> <http://www.opengroup.org/onlinepubs/9699919799/functions/mmap.html>.
>
> This function is missing on MinGW, though, but there’s currently no
> replacement in Guile. Would you like to work on it?
Sorry, I don't think I'm able to do that.
However, I remember that Guile might already contain some
alternative code for that, because objcodes.c finally compiled
after removing that #include directive. So maybe it just needs
to be guarded into "#if"?
...
#include <unistd.h>
#if _POSIX_MAPPED_FILES > 0
#include <sys/mman.h>
#endif
#include <sys/stat.h>
...
BTW, a simple
...
#ifdef _POSIX_MAPPED_FILES
...
seems to be sufficient under MinGW, too.
Greets,
Volker
--
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR