Mail Archives: cygwin/1999/06/15/15:36:07
I am trying to get a 'configure' script to give me valid answers under
a variety of systems. The last one on the list is Cygwin (because VC++
is just useless). The configure runs fine, but two of its answers look
to be questionable.
First, it stores that mmap() is unavailable, even though the Cygwin web
site claims it is. The conftest is failing, not because mmap() isn't
there, but because using the Mingw32 setup seems to have broken something.
This is the section out of the config.log (more stuff below):
======================================================================
configure:1337: checking for working mmap
configure:1485: gcc -o conftest -g -O2 conftest.c 1>&5
In file included from configure:1370:
D:/cygnus/cygwin-b20/H-i586-cygwin32/bin/../lib/gcc-lib/i586-cygwin32/egcs-2.91.66/../../../../i586-cygwin32/include/sys/mman.h:31: parse error before `mmap'
D:/cygnus/cygwin-b20/H-i586-cygwin32/bin/../lib/gcc-lib/i586-cygwin32/egcs-2.91.66/../../../../i586-cygwin32/include/sys/mman.h:31: parse error before `__addr'
D:/cygnus/cygwin-b20/H-i586-cygwin32/bin/../lib/gcc-lib/i586-cygwin32/egcs-2.91.66/../../../../i586-cygwin32/include/sys/mman.h:31: warning: data definition has no type or storage class
D:/cygnus/cygwin-b20/H-i586-cygwin32/bin/../lib/gcc-lib/i586-cygwin32/egcs-2.91.66/../../../../i586-cygwin32/include/sys/mman.h:32: parse error before `__addr'
D:/cygnus/cygwin-b20/H-i586-cygwin32/bin/../lib/gcc-lib/i586-cygwin32/egcs-2.91.66/../../../../i586-cygwin32/include/sys/mman.h:33: parse error before `__addr'
D:/cygnus/cygwin-b20/H-i586-cygwin32/bin/../lib/gcc-lib/i586-cygwin32/egcs-2.91.66/../../../../i586-cygwin32/include/sys/mman.h:34: parse error before `__addr'
configure: In function `main':
configure:1457: warning: comparison between pointer and integer
configure: failed program was:
#line 1345 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
Here is a matrix of mmap possibilities:
mmap private not fixed
mmap private fixed at somewhere currently unmapped
mmap private fixed at somewhere already mapped
mmap shared not fixed
mmap shared fixed at somewhere currently unmapped
mmap shared fixed at somewhere already mapped
For private mappings, we should verify that changes cannot be read()
back from the file, nor mmap's back from the file at a different
address. (There have been systems where private was not correctly
implemented like the infamous i386 svr4.0, and systems where the
VM page cache was not coherent with the filesystem buffer cache
like early versions of FreeBSD and possibly contemporary NetBSD.)
For shared mappings, we should conversely verify that changes get
propogated back to all the places they're supposed to be.
Grep wants private fixed already mapped.
The main things grep needs to know about mmap are:
* does it exist and is it safe to write into the mmap'd area
* how to use it (BSD variants) */
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
# define HAVE_SYS_PARAM_H 1
# endif
======================================================================
The rest of that code is irrelevent and has been snipped. For what it's
worth, the word that gcc is complaining about on sys/mman.h:31 is the
"caddr_t" type, which doesn't seem to have been declared even though
sys/types.h is #included earlier in sys/mman.h.
The second problem is looking for malloc.h. This file is present but
is incorrectly reported as missing, because one of its sub-includes is
not being found:
======================================================================
configure:1855: checking for malloc.h
configure:1865: gcc -E conftest.c >/dev/null 2>conftest.out
In file included from configure:1861:
D:/cygnus/cygwin-b20/H-i586-cygwin32/bin/../lib/gcc-lib/i586-cygwin32/egcs-2.91.66/../../../../i586-cygwin32/include/mingw32/malloc.h:35: alloc.h: No such file or directory
configure: failed program was:
#line 1860 "configure"
#include "confdefs.h"
#include <malloc.h>
======================================================================
(That's the entire test file as reported in the log.)
Any thoughts? Do I have an old Cygwin (B20.1) or an old Mingw32? Am
I just being stupid somewhere?
(If you send a reply to the list, please don't cc a copy to me. Thanks!)
Phil
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -