HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • Back to Ticket #318

Ticket #318: gc-7.2alpha4.patch

File gc-7.2alpha4.patch, 2.7 KB (added by michaelvoliveira, 5 years ago)

Add patch by Kaliber as scott suggested

  • configure.ac

    diff -Naur gc-7.2alpha4/configure.ac gc-7.2alpha4-haiku/configure.ac
    old new  
    120120        AC_DEFINE(GC_LINUX_THREADS) 
    121121        AC_DEFINE(_REENTRANT) 
    122122        ;; 
     123     *-*-haiku*) 
     124    THREADDLLIBS= -lroot 
     125    ;; 
    123126     *-*-aix*) 
    124127        AC_DEFINE(GC_AIX_THREADS) 
    125128        AC_DEFINE(_REENTRANT) 
  • include/private/gcconfig.h

    diff -Naur gc-7.2alpha4/include/private/gcconfig.h gc-7.2alpha4-haiku/include/private/gcconfig.h
    old new  
    231231#    define BEOS 
    232232#    define mach_type_known 
    233233# endif 
     234# if defined(__HAIKU__) && defined(_X86_) 
     235#    define I386 
     236#    define HAIKU 
     237#    define mach_type_known 
     238# endif 
    234239# if defined(OPENBSD) && defined(__amd64__) 
    235240#    define X86_64 
    236241#    define mach_type_known 
    … …  
    10741079      extern int etext[]; 
    10751080#     define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff)) 
    10761081#   endif 
     1082#   ifdef HAIKU 
     1083#     define OS_TYPE "HAIKU" 
     1084#     include <OS.h> 
     1085#     define GETPAGESIZE() B_PAGE_SIZE 
     1086      extern int etext[]; 
     1087#     define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff)) 
     1088#   endif 
    10771089#   ifdef SOLARIS 
    10781090#       define OS_TYPE "SOLARIS" 
    10791091        extern int _etext[], _end[]; 
  • os_dep.c

    diff -Naur gc-7.2alpha4/os_dep.c gc-7.2alpha4-haiku/os_dep.c
    old new  
    808808 
    809809# endif /* MS Windows */ 
    810810 
    811 # ifdef BEOS 
     811# if defined (BEOS) || defined (HAIKU) 
    812812#   include <kernel/OS.h> 
    813813    ptr_t GC_get_main_stack_base(void) 
    814814    { 
    … …  
    816816      get_thread_info(find_thread(NULL),&th); 
    817817      return th.stack_end; 
    818818    } 
    819 # endif /* BEOS */ 
     819# endif /* BEOS and HAIKU */ 
    820820 
    821821 
    822822# ifdef OS2 
    … …  
    11381138 
    11391139#endif /* FREEBSD_STACKBOTTOM */ 
    11401140 
    1141 #if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \ 
     1141#if !defined(BEOS) && !defined(HAIKU) && !defined(AMIGA) && !defined(MSWIN32) \ 
    11421142    && !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) \ 
    11431143    && !defined(CYGWIN32) && !defined(GC_OPENBSD_THREADS) 
    11441144 
    … …  
    11951195#   endif /* STACKBOTTOM */ 
    11961196} 
    11971197 
    1198 # endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !NOSYS, !ECOS */ 
     1198# endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !HAIKU, !NOSYS, !ECOS */ 
    11991199 
    12001200#if defined(GC_LINUX_THREADS) && !defined(HAVE_GET_STACK_BASE) 
    12011201 
    … …  
    19341934 
    19351935ptr_t GC_unix_get_mem(word bytes) 
    19361936{ 
     1937  #ifdef HAIKU 
     1938        void *memptr; 
     1939        int rt = posix_memalign(&memprt, GC_page_size, bytes); 
     1940        return memptr; 
     1941  #else 
    19371942    return GC_unix_mmap_get_mem(bytes); 
     1943  #endif 
    19381944} 
    19391945 
    19401946#else /* Not USE_MMAP */ 

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/