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

Context Navigation

  • Back to Ticket #375

Ticket #375: boost-1.42.0.patch

File boost-1.42.0.patch, 11.5 KB (added by michaelvoliveira, 5 years ago)

a better patch, better than actual

  • boost/config/platform/haiku.hpp

    diff -Naur boost_1_42_0/boost/config/platform/haiku.hpp boost_1_42_0-haiku/boost/config/platform/haiku.hpp
    old new  
     1//  (C) Copyright John Maddock 2001.  
     2//  Use, modification and distribution are subject to the  
     3//  Boost Software License, Version 1.0. (See accompanying file  
     4//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 
     5 
     6//  See http://www.boost.org for most recent version. 
     7 
     8//  Haiku specific config options: 
     9 
     10#define BOOST_PLATFORM "Haiku" 
     11 
     12#define BOOST_NO_INTRINSIC_WCHAR_T 
     13#define BOOST_HAS_UNISTD_H 
     14 
     15#define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS 
     16 
     17#define BOOST_HAS_THREADS 
     18 
     19// 
     20// thread API's not auto detected: 
     21// 
     22#define BOOST_HAS_SCHED_YIELD 
     23#define BOOST_HAS_NANOSLEEP 
     24#define BOOST_HAS_GETTIMEOFDAY 
     25#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 
     26#define BOOST_HAS_SIGACTION 
     27 
     28// boilerplate code: 
     29#include <boost/config/posix_features.hpp> 
  • boost/config/select_platform_config.hpp

    diff -Naur boost_1_42_0/boost/config/select_platform_config.hpp boost_1_42_0-haiku/boost/config/select_platform_config.hpp
    old new  
    4141// win32: 
    4242#  define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" 
    4343 
     44#elif defined(__HAIKU__) 
     45// Haiku 
     46#  define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp" 
     47 
    4448#elif defined(__BEOS__) 
    4549// BeOS 
    4650#  define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" 
  • boost/config/stdlib/libstdcpp3.hpp

    diff -Naur boost_1_42_0/boost/config/stdlib/libstdcpp3.hpp boost_1_42_0-haiku/boost/config/stdlib/libstdcpp3.hpp
    old new  
    3131 
    3232#ifdef __GLIBCXX__ // gcc 3.4 and greater: 
    3333#  if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ 
    34         || defined(_GLIBCXX__PTHREADS) 
     34        || defined(_GLIBCXX__PTHREADS) || defined(__HAIKU__) 
    3535      // 
    3636      // If the std lib has thread support turned on, then turn it on in Boost 
    3737      // as well.  We do this because some gcc-3.4 std lib headers define _REENTANT 
  • boost/interprocess/detail/workaround.hpp

    diff -Naur boost_1_42_0/boost/interprocess/detail/workaround.hpp boost_1_42_0-haiku/boost/interprocess/detail/workaround.hpp
    old new  
    6363   #endif 
    6464 
    6565   //Check for XSI shared memory objects. They are available in nearly all UNIX platforms 
    66    #if !defined(__QNXNTO__) 
     66   #if !defined(__QNXNTO__) || !defined(__HAIKU__) 
    6767   # define BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS 
    6868   #endif 
    6969 
  • boost/interprocess/mapped_region.hpp

    diff -Naur boost_1_42_0/boost/interprocess/mapped_region.hpp boost_1_42_0-haiku/boost/interprocess/mapped_region.hpp
    old new  
    3131#    include <unistd.h> 
    3232#    include <sys/stat.h> 
    3333#    include <sys/types.h> 
     34#  if !defined(__HAIKU__) 
    3435#    if defined(BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS) 
    3536#      include <sys/shm.h>      //System V shared memory... 
    3637#    endif 
     38#  endif 
    3739#    include <cassert> 
    3840#  else 
    3941#    error Unknown platform 
    … …  
    398400   mapping_handle_t map_hnd = mapping.get_mapping_handle(); 
    399401 
    400402   //Some systems dont' support XSI shared memory 
     403   # if !defined(__HAIKU__) 
    401404   #ifdef BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS 
    402405   if(map_hnd.is_xsi){ 
    403406      //Get the size 
    … …  
    440443      return; 
    441444   } 
    442445   #endif   //ifdef BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS 
     446   #endif   //Haiku 
    443447   if(size == 0){ 
    444448      struct ::stat buf; 
    445449      if(0 != fstat(map_hnd.handle, &buf)){ 
    … …  
    544548inline void mapped_region::priv_close() 
    545549{ 
    546550   if(m_base != MAP_FAILED){ 
     551          # if !defined(__HAIKU__) 
    547552      #ifdef BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS 
    548553      if(m_is_xsi){ 
    549554         int ret = ::shmdt(m_base); 
    … …  
    552557         return; 
    553558      } 
    554559      #endif //#ifdef BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS 
     560      #endif //Haiku 
    555561      munmap(static_cast<char*>(m_base) - m_extra_offset, m_size + m_extra_offset); 
    556562      m_base = MAP_FAILED; 
    557563   } 
  • boost/math/tools/config.hpp

    diff -Naur boost_1_42_0/boost/math/tools/config.hpp boost_1_42_0-haiku/boost/math/tools/config.hpp
    old new  
    2424#include <boost/math/special_functions/detail/round_fwd.hpp> 
    2525 
    2626#if defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \ 
    27    || defined(__hppa) || defined(__NO_LONG_DOUBLE_MATH) 
     27   || defined(__HAIKU__) || defined(__hppa) || defined(__NO_LONG_DOUBLE_MATH) 
    2828#  define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS 
    2929#endif 
    3030#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) 
  • boost/thread/detail/platform.hpp

    diff -Naur boost_1_42_0/boost/thread/detail/platform.hpp boost_1_42_0-haiku/boost/thread/detail/platform.hpp
    old new  
    3131#  define BOOST_THREAD_CYGWIN 
    3232#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 
    3333#  define BOOST_THREAD_WIN32 
     34#elif defined(__HAIKU__) 
     35#  define BOOST_THREAD_HAIKU 
    3436#elif defined(__BEOS__) 
    3537#  define BOOST_THREAD_BEOS 
    3638#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) 
  • boost/thread/thread_time.hpp

    diff -Naur boost_1_42_0/boost/thread/thread_time.hpp boost_1_42_0-haiku/boost/thread/thread_time.hpp
    old new  
    1717     
    1818    inline system_time get_system_time() 
    1919    { 
     20#ifndef BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK 
     21#       error "High precision clock not supported on this platform" 
     22#endif 
    2023        return boost::date_time::microsec_clock<system_time>::universal_time(); 
    2124    } 
    2225 
  • tools/build/v2/tools/builtin.jam

    diff -Naur boost_1_42_0/tools/build/v2/tools/builtin.jam boost_1_42_0-haiku/tools/build/v2/tools/builtin.jam
    old new  
    3939 
    4040 
    4141.os-names = aix bsd cygwin darwin freebsd hpux iphone linux netbsd 
    42     openbsd osf qnx qnxnto sgi solaris unix unixware windows  
     42    openbsd osf qnx qnxnto sgi solaris unix unixware windows haiku 
    4343    elf # Not actually an OS -- used for targeting bare metal where 
    4444        # object format is ELF.  This catches both -elf and -eabi gcc 
    4545        # targets and well as other compilers targeting ELF. It is not 
    … …  
    7777            case MACOSX       : host-os = darwin  ; 
    7878            case KFREEBSD     : host-os = freebsd ; 
    7979            case LINUX        : host-os = linux   ; 
     80            case HAIKU        : host-os = haiku   ; 
    8081            case SUNOS        :  
    8182              ECHO "SunOS is not a supported operating system." ; 
    8283              ECHO "We believe last version of SunOS was released in 1992, " ; 
  • tools/build/v2/tools/gcc.jam

    diff -Naur boost_1_42_0/tools/build/v2/tools/gcc.jam boost_1_42_0-haiku/tools/build/v2/tools/gcc.jam
    old new  
    795795 
    796796actions link bind LIBRARIES 
    797797{ 
    798     "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) 
     798    "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -nostart -Wl,-shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) 
    799799 
    800800} 
    801801 
    … …  
    885885                option = -pthreads ; 
    886886                libs = rt ; 
    887887            } 
     888            case haiku : 
     889            { 
     890                # pthread 
     891            } 
    888892            case beos : 
    889893            {             
    890894                # BeOS has no threading options, so do not set anything here. 
  • tools/jam/src/Jambase

    diff -Naur boost_1_42_0/tools/jam/src/Jambase boost_1_42_0-haiku/tools/jam/src/Jambase
    old new  
    837837    NOARSCAN    ?= true ; 
    838838    STDHDRS     ?= /boot/develop/headers/posix ; 
    839839} 
    840 else if $(OS) = BEOS 
     840else if $(OS) = BEOS || $(OS) = HAIKU 
    841841{ 
    842842    BINDIR      ?= /boot/apps ; 
    843843    CC          ?= gcc ; 
  • tools/jam/src/boehm_gc/include/private/gcconfig.h

    diff -Naur boost_1_42_0/tools/jam/src/boehm_gc/include/private/gcconfig.h boost_1_42_0-haiku/tools/jam/src/boehm_gc/include/private/gcconfig.h
    old new  
    210210#   endif 
    211211#   define mach_type_known 
    212212# endif 
     213# if defined(__HAIKU__) && defined(_X86_) 
     214#    define I386 
     215#    define HAIKU 
     216# endif 
    213217# if defined(__BEOS__) && defined(_X86_) 
    214218#    define I386 
    215219#    define BEOS 
    … …  
    10071011#       define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff)) 
    10081012#       define STACKBOTTOM ((ptr_t) 0x3ffff000)  
    10091013#   endif 
     1014#   ifdef HAIKU 
     1015#     define OS_TYPE "HAIKU" 
     1016#     include <OS.h> 
     1017#     define GETPAGESIZE() B_PAGE_SIZE 
     1018      extern int etext[]; 
     1019#     define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff)) 
     1020#   endif 
    10101021#   ifdef BEOS 
    10111022#     define OS_TYPE "BEOS" 
    10121023#     include <OS.h> 
  • tools/jam/src/fileunix.c

    diff -Naur boost_1_42_0/tools/jam/src/fileunix.c boost_1_42_0-haiku/tools/jam/src/fileunix.c
    old new  
    7979# endif 
    8080 
    8181# if defined( OS_QNX ) || \ 
     82     defined( OS_HAIKU ) || \ 
    8283     defined( OS_BEOS ) || \ 
    8384     defined( OS_MPEIX ) 
    8485# define NO_AR 
  • tools/jam/src/jam.h

    diff -Naur boost_1_42_0/tools/jam/src/jam.h boost_1_42_0-haiku/tools/jam/src/jam.h
    old new  
    228228    #define OSMINOR "OS=AMIGA" 
    229229    #define OS_AMIGA 
    230230#endif 
     231#ifdef __HAIKU__ 
     232   #define unix 
     233   #define OSMINOR "OS=HAIKU" 
     234   #define OS_HAIKU 
     235#endif 
    231236#ifdef __BEOS__ 
    232237    #define unix 
    233238    #define OSMINOR "OS=BEOS" 
  • tools/jam/src/jambase.c

    diff -Naur boost_1_42_0/tools/jam/src/jambase.c boost_1_42_0-haiku/tools/jam/src/jambase.c
    old new  
    542542"NOARSCAN    ?= true ;\n", 
    543543"STDHDRS     ?= /boot/develop/headers/posix ;\n", 
    544544"}\n", 
    545 "else if $(OS) = BEOS\n", 
     545"else if $(OS) = BEOS || $(OS) = HAIKU\n", 
    546546"{\n", 
    547547"BINDIR      ?= /boot/apps ;\n", 
    548548"CC          ?= gcc ;\n", 

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/