This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: odd 'configure' problems


Phil Edwards <pedwards@jaj.com> 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 <alloc.h>
+#include <stdlib.h>
 
 #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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]