diff -Naur boost_1_50_0/boost/config/platform/haiku.hpp boost_1_50_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_HAS_BETHREADS |
| | 16 | |
| | 17 | #ifndef BOOST_DISABLE_THREADS |
| | 18 | # define BOOST_HAS_THREADS |
| | 19 | #endif |
| | 20 | |
| | 21 | // |
| | 22 | // thread API's not auto detected: |
| | 23 | // |
| | 24 | #define BOOST_HAS_GETTIMEOFDAY |
| | 25 | |
| | 26 | // boilerplate code: |
| | 27 | #include <boost/config/posix_features.hpp> |
diff -Naur boost_1_50_0/boost/config/select_platform_config.hpp boost_1_50_0-haiku/boost/config/select_platform_config.hpp
|
old
|
new
|
|
| 41 | 41 | // win32: |
| 42 | 42 | # define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" |
| 43 | 43 | |
| | 44 | #elif defined(__HAIKU__) |
| | 45 | // Haiku OS |
| | 46 | # define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp" |
| | 47 | |
| 44 | 48 | #elif defined(__BEOS__) |
| 45 | 49 | // BeOS |
| 46 | 50 | # define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" |
diff -Naur boost_1_50_0/boost/config/stdlib/libstdcpp3.hpp boost_1_50_0-haiku/boost/config/stdlib/libstdcpp3.hpp
|
old
|
new
|
|
| 35 | 35 | # if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ |
| 36 | 36 | || defined(_GLIBCXX__PTHREADS) \ |
| 37 | 37 | || defined(_GLIBCXX_HAS_GTHREADS) \ |
| 38 | | || defined(_WIN32) |
| | 38 | || defined(_WIN32) \ |
| | 39 | || defined(__HAIKU__) |
| 39 | 40 | // |
| 40 | 41 | // If the std lib has thread support turned on, then turn it on in Boost |
| 41 | 42 | // as well. We do this because some gcc-3.4 std lib headers define _REENTANT |
diff -Naur boost_1_50_0/boost/thread/detail/platform.hpp boost_1_50_0-haiku/boost/thread/detail/platform.hpp
|
old
|
new
|
|
| 34 | 34 | # define BOOST_THREAD_WIN32 |
| 35 | 35 | #elif defined(__BEOS__) |
| 36 | 36 | # define BOOST_THREAD_BEOS |
| | 37 | #elif defined(__HAIKU__) |
| | 38 | # define BOOST_THREAD_BEOS |
| 37 | 39 | #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) |
| 38 | 40 | # define BOOST_THREAD_MACOS |
| 39 | 41 | # define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(1000) |
diff -Naur boost_1_50_0/tools/build/v2/engine/boehm_gc/dyn_load.c boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/dyn_load.c
|
old
|
new
|
|
| 64 | 64 | !defined(AIX) && !defined(SCO_ELF) && !defined(DGUX) && \ |
| 65 | 65 | !(defined(FREEBSD) && defined(__ELF__)) && \ |
| 66 | 66 | !(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \ |
| 67 | | !defined(DARWIN) && !defined(CYGWIN32) |
| | 67 | !defined(DARWIN) && !defined(CYGWIN32) !(defined(HAIKU) |
| 68 | 68 | --> We only know how to find data segments of dynamic libraries for the |
| 69 | 69 | --> above. Additional SVR4 variants might not be too |
| 70 | 70 | --> hard to add. |
| … |
… |
|
| 82 | 82 | # define ELFSIZE ARCH_ELFSIZE |
| 83 | 83 | #endif |
| 84 | 84 | |
| | 85 | #if defined(HAIKU) |
| | 86 | |
| | 87 | #endif |
| | 88 | |
| 85 | 89 | #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \ |
| 86 | 90 | (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \ |
| 87 | 91 | (defined(NETBSD) && defined(__ELF__)) || defined(HURD) |
| … |
… |
|
| 216 | 220 | |
| 217 | 221 | #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \ |
| 218 | 222 | (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \ |
| 219 | | (defined(NETBSD) && defined(__ELF__)) || defined(HURD) |
| | 223 | (defined(NETBSD) && defined(__ELF__)) || defined(HURD) || \ |
| | 224 | defined(HAIKU) |
| 220 | 225 | |
| 221 | 226 | |
| 222 | 227 | #ifdef USE_PROC_FOR_LIBRARIES |
diff -Naur boost_1_50_0/tools/build/v2/engine/boehm_gc/include/gc_config_macros.h boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/include/gc_config_macros.h
|
old
|
new
|
|
| 45 | 45 | || defined(GC_AIX_THREADS) \ |
| 46 | 46 | || defined(GC_LINUX_THREADS) \ |
| 47 | 47 | || defined(GC_NETBSD_THREADS) \ |
| 48 | | || defined(GC_GNU_THREADS)) |
| | 48 | || defined(GC_GNU_THREADS)) \ |
| | 49 | || defined(GC_HAIKU_THREADS) |
| 49 | 50 | # define _REENTRANT |
| 50 | 51 | /* Better late than never. This fails if system headers that */ |
| 51 | 52 | /* depend on this were previously included. */ |
| … |
… |
|
| 62 | 63 | # if defined(GC_SOLARIS_THREADS) || defined(GC_FREEBSD_THREADS) || \ |
| 63 | 64 | defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) || \ |
| 64 | 65 | defined(GC_HPUX_THREADS) || defined(GC_OSF1_THREADS) || \ |
| | 66 | defined(GC_HAIKU_THREADS) || \ |
| 65 | 67 | defined(GC_DGUX386_THREADS) || defined(GC_DARWIN_THREADS) || \ |
| 66 | 68 | defined(GC_AIX_THREADS) || defined(GC_NETBSD_THREADS) || \ |
| 67 | 69 | (defined(GC_WIN32_THREADS) && defined(__CYGWIN32__)) || \ |
diff -Naur boost_1_50_0/tools/build/v2/engine/boehm_gc/include/gc.h boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/include/gc.h
|
old
|
new
|
|
| 494 | 494 | /* of compilers. */ |
| 495 | 495 | /* This may also be desirable if it is possible but expensive to */ |
| 496 | 496 | /* retrieve the call chain. */ |
| 497 | | #if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) \ |
| | 497 | #if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__HAIKU__) \ |
| 498 | 498 | || defined(__FreeBSD__) || defined(__DragonFly__)) & !defined(GC_CAN_SAVE_CALL_STACKS) |
| 499 | 499 | # define GC_ADD_CALLER |
| 500 | 500 | # if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) |
diff -Naur boost_1_50_0/tools/build/v2/engine/boehm_gc/include/private/gcconfig.h boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/include/private/gcconfig.h
|
old
|
new
|
|
| 215 | 215 | # define BEOS |
| 216 | 216 | # define mach_type_known |
| 217 | 217 | # endif |
| | 218 | # if defined(__HAIKU__) && defined(_X86_) |
| | 219 | # define I386 |
| | 220 | # define HAIKU |
| | 221 | # define mach_type_known |
| | 222 | # endif |
| 218 | 223 | # if defined(LINUX) && (defined(i386) || defined(__i386__)) |
| 219 | 224 | # define I386 |
| 220 | 225 | # define mach_type_known |
| … |
… |
|
| 1014 | 1019 | extern int etext[]; |
| 1015 | 1020 | # define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff)) |
| 1016 | 1021 | # endif |
| | 1022 | # ifdef HAIKU |
| | 1023 | # define OS_TYPE "HAIKU" |
| | 1024 | # include <OS.h> |
| | 1025 | # define GETPAGESIZE() B_PAGE_SIZE |
| | 1026 | extern int etext[]; |
| | 1027 | # define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff)) |
| | 1028 | # endif |
| 1017 | 1029 | # ifdef SOLARIS |
| 1018 | 1030 | # define OS_TYPE "SOLARIS" |
| 1019 | 1031 | extern int _etext[], _end[]; |
diff -Naur boost_1_50_0/tools/build/v2/engine/boehm_gc/os_dep.c boost_1_50_0-haiku/tools/build/v2/engine/boehm_gc/os_dep.c
|
old
|
new
|
|
| 777 | 777 | # endif /* BEOS */ |
| 778 | 778 | |
| 779 | 779 | |
| | 780 | # ifdef HAIKU |
| | 781 | # include <kernel/OS.h> |
| | 782 | ptr_t GC_get_main_stack_base(void){ |
| | 783 | thread_info th; |
| | 784 | get_thread_info(find_thread(NULL),&th); |
| | 785 | return th.stack_end; |
| | 786 | } |
| | 787 | # endif /* HAIKU */ |
| | 788 | |
| | 789 | |
| 780 | 790 | # ifdef OS2 |
| 781 | 791 | |
| 782 | 792 | ptr_t GC_get_main_stack_base(void) |
| … |
… |
|
| 1095 | 1105 | |
| 1096 | 1106 | #endif /* FREEBSD_STACKBOTTOM */ |
| 1097 | 1107 | |
| 1098 | | #if !defined(BEOS) && !defined(AMIGA) && !defined(MSWIN32) \ |
| | 1108 | #if !defined(BEOS) && !defined(HAIKU) && !defined(AMIGA) && !defined(MSWIN32) \ |
| 1099 | 1109 | && !defined(MSWINCE) && !defined(OS2) && !defined(NOSYS) && !defined(ECOS) \ |
| 1100 | 1110 | && !defined(CYGWIN32) |
| 1101 | 1111 | |
| … |
… |
|
| 1154 | 1164 | # endif /* STACKBOTTOM */ |
| 1155 | 1165 | } |
| 1156 | 1166 | |
| 1157 | | # endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !NOSYS, !ECOS */ |
| | 1167 | # endif /* ! AMIGA, !OS 2, ! MS Windows, !BEOS, !HAIKU, !NOSYS, !ECOS */ |
| 1158 | 1168 | |
| 1159 | 1169 | #if defined(GC_LINUX_THREADS) && !defined(HAVE_GET_STACK_BASE) |
| 1160 | 1170 | |
diff -Naur boost_1_50_0/tools/build/v2/engine/fileunix.c boost_1_50_0-haiku/tools/build/v2/engine/fileunix.c
|
old
|
new
|
|
| 81 | 81 | |
| 82 | 82 | # if defined( OS_QNX ) || \ |
| 83 | 83 | defined( OS_BEOS ) || \ |
| | 84 | defined( OS_HAIKU ) || \ |
| 84 | 85 | defined( OS_MPEIX ) |
| 85 | 86 | # define NO_AR |
| 86 | 87 | # define HAVE_AR |
diff -Naur boost_1_50_0/tools/build/v2/engine/jam.h boost_1_50_0-haiku/tools/build/v2/engine/jam.h
|
old
|
new
|
|
| 151 | 151 | #define OS_BEOS |
| 152 | 152 | #define NO_VFORK |
| 153 | 153 | #endif |
| | 154 | #ifdef __HAIKU__ |
| | 155 | #define unix |
| | 156 | #define OSMINOR "OS=HAIKU" |
| | 157 | #define OS_HAIKU |
| | 158 | #endif |
| 154 | 159 | #ifdef __bsdi__ |
| 155 | 160 | #define OSMINOR "OS=BSDI" |
| 156 | 161 | #define OS_BSDI |
diff -Naur boost_1_50_0/tools/build/v2/engine/jambase.c boost_1_50_0-haiku/tools/build/v2/engine/jambase.c
|
old
|
new
|
|
| 548 | 548 | "NOARSCAN ?= true ;\n", |
| 549 | 549 | "STDHDRS ?= /boot/develop/headers/posix ;\n", |
| 550 | 550 | "}\n", |
| | 551 | "else if $(OS) = HAIKU\n", |
| | 552 | "{\n", |
| | 553 | "BINDIR ?= /boot/common/bin ;\n", |
| | 554 | "CC ?= gcc ;\n", |
| | 555 | "C++ ?= $(CC) ;\n", |
| | 556 | "FORTRAN ?= \"\" ;\n", |
| | 557 | "LIBDIR ?= /boot/common/lib ;\n", |
| | 558 | "LINK ?= gcc ;\n", |
| | 559 | "LINKLIBS ?= -lnetwork ;\n", |
| | 560 | "NOARSCAN ?= true ;\n", |
| | 561 | "STDHDRS ?= /boot/develop/headers/posix ;\n", |
| | 562 | "}\n", |
| 551 | 563 | "else if $(OS) = BEOS\n", |
| 552 | 564 | "{\n", |
| 553 | 565 | "BINDIR ?= /boot/apps ;\n", |
diff -Naur boost_1_50_0/tools/build/v2/tools/builtin.jam boost_1_50_0-haiku/tools/build/v2/tools/builtin.jam
|
old
|
new
|
|
| 40 | 40 | |
| 41 | 41 | |
| 42 | 42 | .os-names = aix bsd cygwin darwin freebsd hpux iphone linux netbsd |
| 43 | | openbsd osf qnx qnxnto sgi solaris unix unixware windows |
| | 43 | openbsd osf qnx qnxnto sgi solaris unix unixware windows haiku |
| 44 | 44 | elf # Not actually an OS -- used for targeting bare metal where |
| 45 | 45 | # object format is ELF. This catches both -elf and -eabi gcc |
| 46 | 46 | # targets and well as other compilers targeting ELF. It is not |
| … |
… |
|
| 75 | 75 | case COHERENT : host-os = unix ; |
| 76 | 76 | case DRAGONFLYBSD : host-os = bsd ; |
| 77 | 77 | case IRIX : host-os = sgi ; |
| | 78 | case HAIKU : host-os = haiku ; |
| 78 | 79 | case MACOSX : host-os = darwin ; |
| 79 | 80 | case KFREEBSD : host-os = freebsd ; |
| 80 | 81 | case LINUX : host-os = linux ; |
diff -Naur boost_1_50_0/tools/build/v2/tools/builtin.py boost_1_50_0-haiku/tools/build/v2/tools/builtin.py
|
old
|
new
|
|
| 103 | 103 | elif host_os == 'MACOSX': host_os = 'darwin' |
| 104 | 104 | elif host_os == 'KFREEBSD': host_os = 'freebsd' |
| 105 | 105 | elif host_os == 'LINUX': host_os = 'linux' |
| | 106 | elif host_os == 'HAIKU': host_os = 'haiku' |
| 106 | 107 | else: host_os = 'unix' |
| 107 | 108 | return host_os.lower() |
| 108 | 109 | |
diff -Naur boost_1_50_0/tools/build/v2/tools/gcc.jam boost_1_50_0-haiku/tools/build/v2/tools/gcc.jam
|
old
|
new
|
|
| 1050 | 1050 | case beos : |
| 1051 | 1051 | { |
| 1052 | 1052 | # BeOS has no threading options, so do not set anything here. |
| | 1053 | } |
| | 1054 | case haiku : |
| | 1055 | { |
| | 1056 | option = -lroot ; |
| 1053 | 1057 | } |
| 1054 | 1058 | case *bsd : |
| 1055 | 1059 | { |
| … |
… |
|
| 1067 | 1071 | } |
| 1068 | 1072 | case * : |
| 1069 | 1073 | { |
| 1070 | | option = -pthread ; |
| | 1074 | option = -pthreads ; |
| 1071 | 1075 | libs = rt ; |
| 1072 | 1076 | } |
| 1073 | 1077 | } |
diff -Naur boost_1_50_0/tools/build/v2/tools/gcc.py boost_1_50_0-haiku/tools/build/v2/tools/gcc.py
|
old
|
new
|
|
| 675 | 675 | elif host_os_name == 'BeOS': |
| 676 | 676 | # BeOS has no threading options, don't set anything here. |
| 677 | 677 | pass |
| | 678 | elif host_os_name == 'Haiku': |
| | 679 | flags('gcc', 'OPTIONS', ['<threading>multi'], ['-lroot']) |
| | 680 | # there is no -lrt on HAIKU |
| 678 | 681 | elif host_os_name.endswith('BSD'): |
| 679 | 682 | flags('gcc', 'OPTIONS', ['<threading>multi'], ['-pthread']) |
| 680 | 683 | # there is no -lrt on BSD |
diff -Naur boost_1_50_0/tools/build/v2/tools/python.jam boost_1_50_0-haiku/tools/build/v2/tools/python.jam
|
old
|
new
|
|
| 648 | 648 | case qnx* : return ; |
| 649 | 649 | case darwin : return ; |
| 650 | 650 | case windows : return ; |
| | 651 | case haiku : return ; |
| 651 | 652 | |
| 652 | 653 | case hpux : return <library>rt ; |
| 653 | 654 | case *bsd : return <library>pthread <toolset>gcc:<library>util ; |
| 654 | 655 | |
| 655 | 656 | case aix : return <library>pthread <library>dl ; |
| 656 | 657 | |
| 657 | | case * : return <library>pthread <library>dl |
| | 658 | case * : return ; <library>pthread <library>dl |
| 658 | 659 | <toolset>gcc:<library>util <toolset-intel:platform>linux:<library>util ; |
| 659 | 660 | } |
| 660 | 661 | } |