Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <199906151908.OAA10344@mercury.xraylith.wisc.edu> To: cygwin AT sourceware DOT cygnus DOT com Subject: Re: odd 'configure' problems In-Reply-To: Your message of "Tue, 15 Jun 1999 14:52:37 EDT." <199906151852 DOT OAA02664 AT jaj DOT com> Date: Tue, 15 Jun 1999 14:08:41 -0500 From: Mumit Khan Phil Edwards writes: > > 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): Phil, You say Cygwin, but I also see things pointing to Mingw includes. I'm a bit confused. A typical problem when using Cygwin gcc to produce Mingw code (ie., the now-famous -mno-cygwin mode) happens when your testcase includes a file that DOES NOT exist in the Mingw includes, but DOES exist in the Cygwin includes. What happens is that you get wrong, or at best confused, results. See my -mno-cygwin-howto for more info (http://www.xraylith.wisc.edu/~khan/software/gnu-win32/). Either way, test for mmap should do the right thing. Can you please send me the autoconf test script that checks for mmap? Autoconf is not infallible of course. Feel free to email it to me directly. > 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: This is a bug in the mingw32 headers distributed with Cygwin b20.1. You can replace those headers with the one I distribute with egcs-1.1.2 for mingw32. See: ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/runtime/ Here's a patch for the malloc.h problem: --- //C/Cygnus/cygwin-b20/H-i586-cygwin32/i586-cygwin32/include/mingw32/malloc.h Tue Dec 01 12:42:46 1998 +++ //C/egcs-1.1.2/i386-mingw32/include/malloc.h Mon Mar 15 17:52:30 1999 @@ -32,13 +32,31 @@ #ifndef _MALLOC_H_ #define _MALLOC_H_ -#include +#include #ifndef RC_INVOKED +/* + * The structure used to walk through the heap with _heapwalk. + * TODO: This is a guess at the internals of this structure. + */ +typedef struct _heapinfo +{ + void* ptr; + unsigned int size; + int in_use; +} _HEAPINFO; + + #ifdef __cplusplus extern "C" { #endif + +int _heapwalk (_HEAPINFO* pHeapinfo); + +#ifndef _NO_OLDNAMES +int heapwalk (_HEAPINFO* pHeapinfo); +#endif /* Not _NO_OLDNAMES */ int _heapchk (); /* Verify heap integrety. */ int _heapmin (); /* Return unused heap to the OS. */ Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com