Ludovic Courtès <l...@gnu.org> schrieb:
> Volker Grabsch <v...@notjusthosting.com> 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

Reply via email to