]> granicus.if.org Git - gc/commitdiff
2008-10-20 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
authorhboehm <hboehm>
Mon, 20 Oct 2008 23:42:32 +0000 (23:42 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:43 +0000 (21:06 +0400)
* misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin.
* include/private/gcconfig.h: Consider USE_MMAP for Cygwin.
* os_dep.c (GC_get_main_stack_base): Use alternate definition
with USE_MMAP.
* include/private/gc_priv.h: Sometimes define SETJMP on Cygwin.

ChangeLog
include/private/gc_priv.h
include/private/gcconfig.h
misc.c
os_dep.c

index 0e5fd4197a001abfed6d2afd9aed0eb4c556c0f2..b2bea054be35f5fe63ff4e91873c8e884f6d6400 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-10-20  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
+       * misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin.
+       * include/private/gcconfig.h: Consider USE_MMAP for Cygwin.
+       * os_dep.c (GC_get_main_stack_base): Use alternate definition
+       with USE_MMAP.
+       * include/private/gc_priv.h: Sometimes define SETJMP on Cygwin.
+
 2008-10-20  Hans Boehm <Hans.Boehm@hp.com>
        * doc/README: Make it clearer when Makefile.direct is assumed.
        * cord/cord.am: install include/cord.h.
index 3615e12fed611da971c8c24182eb8302213b9fdb..52ccfd435ede23572ef5fa550a77359c7ea593d7 100644 (file)
@@ -2032,7 +2032,7 @@ void GC_err_puts(const char *s);
 /* were possible, and a couple of routines to facilitate       */
 /* catching accesses to bad addresses when that's              */
 /* possible/needed.                                            */
-#ifdef UNIX_LIKE
+#if defined(UNIX_LIKE) || (defined(NEED_FIND_LIMIT) && defined(CYGWIN32))
 # include <setjmp.h>
 # if defined(SUNOS5SIGS) && !defined(FREEBSD)
 #  include <sys/siginfo.h>
index a70cab246db7ab4f974f9fbf154a65ba91c2ff31..851bb4170813acce425b3c9f9b6db89f473ba6be 100644 (file)
 #      undef STACK_GRAN
 #       define STACK_GRAN 0x10000
 #       define HEURISTIC1
+#       ifdef USE_MMAP
+#         define NEED_FIND_LIMIT
+#         define USE_MMAP_ANON
+#       endif
 #   endif
 #   ifdef OS2
 #      define OS_TYPE "OS2"
diff --git a/misc.c b/misc.c
index cf864d7b7b2a956a677e7dea9b3f95cbd23fd37b..84851092e93ea669c65c841571347cc0e8a25d08 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -35,7 +35,7 @@
 # include <tchar.h>
 #endif
 
-#ifdef UNIX_LIKE
+#if defined(UNIX_LIKE) || defined(CYGWIN32)
 # include <fcntl.h>
 # include <sys/types.h>
 # include <sys/stat.h>
@@ -501,7 +501,7 @@ void GC_init_inner(void)
       if (0 != GETENV("GC_PRINT_VERBOSE_STATS")) {
         GC_print_stats = VERBOSE;
       } 
-#     if defined(UNIX_LIKE)
+#     if defined(UNIX_LIKE) || defined(CYGWIN32)
         {
          char * file_name = GETENV("GC_LOG_FILE");
           if (0 != file_name) {
index bd33129b8224abe959ea182e45543b009b77c2ff..1ea99e4201c3267c74ec1b19c893b2b82c67c112 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -63,7 +63,7 @@
 #   include <signal.h>
 # endif
 
-#ifdef UNIX_LIKE
+#if defined(UNIX_LIKE) || defined(CYGWIN32)
 # include <fcntl.h>
 #endif
 
@@ -626,7 +626,8 @@ word GC_page_size;
  * With threads, GC_mark_roots needs to know how to do this.
  * Called with allocator lock held.
  */
-# if defined(MSWIN32) || defined(MSWINCE) || defined(CYGWIN32)
+# if defined(MSWIN32) || defined(MSWINCE) \
+       || (defined(CYGWIN32) && !defined(USE_MMAP))
 # define is_writable(prot) ((prot) == PAGE_READWRITE \
                            || (prot) == PAGE_WRITECOPY \
                            || (prot) == PAGE_EXECUTE_READWRITE \
@@ -1004,7 +1005,7 @@ ptr_t GC_get_main_stack_base(void)
 
 #if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \
     && !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) \
-    && !defined(CYGWIN32)
+    && (!defined(CYGWIN32) || defined(USE_MMAP))
 
 ptr_t GC_get_main_stack_base(void)
 {