From 4d972fa5f3f9d2e3e093285df4285c592d88e3fa Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 9 Feb 2012 20:27:45 +0400 Subject: [PATCH] Update TODO (failure in Cygwin resolved) --- TODO | 2 -- configure.ac | 8 ++++++++ doc/README.win32 | 4 +--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/TODO b/TODO index cdbcfdc..68ec84b 100644 --- a/TODO +++ b/TODO @@ -33,8 +33,6 @@ libc.so.1: gctest: fatal: libgcc_s.so.1: open failed: No such file or directory Solaris/x86[_64]: gctest fails if PROC_VDB. -Cygwin: crashes with USE_MUNMAP: mmap(PROT_NONE) failed. - Cygwin: autoreconf fails: possibly undefined macro: AC_MSG_ERROR, AS_IF at configure.ac:59 and configure.ac:694, respectively (autoreconf-2.68). diff --git a/configure.ac b/configure.ac index bdaf215..c48daa0 100644 --- a/configure.ac +++ b/configure.ac @@ -785,6 +785,14 @@ AC_ARG_ENABLE(munmap, if test "${enable_munmap}" != ""; then AC_DEFINE([USE_MMAP], 1, [Define to use mmap instead of sbrk to expand the heap.]) + case "$host" in + *-*-cygwin*) + # Workaround for Cygwin: use VirtualAlloc since mmap(PROT_NONE) fails + AC_DEFINE([USE_WINALLOC], 1, + [Define to use Win32 VirtualAlloc (instead of sbrk or \ + mmap) to expand the heap.]) + ;; + esac AC_DEFINE([USE_MUNMAP], 1, [Define to return memory to OS with munmap calls (see doc/README.macros).]) diff --git a/doc/README.win32 b/doc/README.win32 index 3ffb3b6..d14686d 100644 --- a/doc/README.win32 +++ b/doc/README.win32 @@ -78,9 +78,7 @@ To build the collector as a DLL, pass "--enable-shared --disable-static" to configure (this will instruct make compile with -D GC_DLL). Parallel marker could be enabled via "--enable-parallel-mark". - -Memory unmapping could be enabled via "--enable-munmap" (not well supported -on Cygwin currently). +Memory unmapping could be enabled via "--enable-munmap". Borland Tools ------------- -- 2.7.4