[BACK]Return to gc-cygwin64.diff CVS log [TXT][DIR] Up to [local] / OpenXM / src / gc

File: [local] / OpenXM / src / gc / Attic / gc-cygwin64.diff (download)

Revision 1.1, Mon Sep 28 05:52:13 2015 UTC (8 years, 8 months ago) by takayama
Branch: MAIN

configure options for cygwin64 are added.
A patch for gc for cygwin64 is given.
ox_pari works on cygwin64 with these changes.

*** include/gc.h.orig	Tue Jun  3 15:08:02 2014
--- include/gc.h	Mon Sep 28 13:23:14 2015
***************
*** 1592,1598 ****
  /* THREAD_LOCAL_ALLOC defined and the initial allocation call is not    */
  /* to GC_malloc() or GC_malloc_atomic().                                */
  
! #if defined(__CYGWIN32__) || defined(__CYGWIN__)
    /* Similarly gnu-win32 DLLs need explicit initialization from the     */
    /* main program, as does AIX.                                         */
    extern int _data_start__[], _data_end__[], _bss_start__[], _bss_end__[];
--- 1592,1605 ----
  /* THREAD_LOCAL_ALLOC defined and the initial allocation call is not    */
  /* to GC_malloc() or GC_malloc_atomic().                                */
  
! #ifdef __CYGWIN__
! #ifdef __x86_64__
!   extern int __data_start__[], __data_end__[], __bss_start__[], __bss_end__[];
! #define GC_DATASTART (__data_start__ < __bss_start__ ?\
!                       (void *)__data_start__ : (void *)__bss_start__)
! #define GC_DATAEND (__data_end__ < __bss_end__ ?\
!                       (void *)__data_end__ : (void *)__bss_end__)
! #else
    /* Similarly gnu-win32 DLLs need explicit initialization from the     */
    /* main program, as does AIX.                                         */
    extern int _data_start__[], _data_end__[], _bss_start__[], _bss_end__[];
***************
*** 1600,1605 ****
--- 1607,1613 ----
                         (void *)_data_start__ : (void *)_bss_start__)
  # define GC_DATAEND ((GC_word)_data_end__ > (GC_word)_bss_end__ ? \
                       (void *)_data_end__ : (void *)_bss_end__)
+ #endif
  # define GC_INIT_CONF_ROOTS GC_add_roots(GC_DATASTART, GC_DATAEND); \
                                   GC_gcollect() /* For blacklisting. */
          /* Required at least if GC is in a DLL.  And doesn't hurt. */