From 6038d5fd7e86ecb46708c921b9e77eda9869eae4 Mon Sep 17 00:00:00 2001 From: Jessica Hamilton Date: Sun, 16 Nov 2014 13:28:57 +1300 Subject: [PATCH] haiku: add platform support --- include/boost/config/platform/haiku.hpp | 34 +++++++++++++++++++ .../boost/config/select_platform_config.hpp | 4 +++ include/boost/config/stdlib/libstdcpp3.hpp | 3 +- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 include/boost/config/platform/haiku.hpp diff --git a/include/boost/config/platform/haiku.hpp b/include/boost/config/platform/haiku.hpp new file mode 100644 index 00000000..5b2cd03f --- /dev/null +++ b/include/boost/config/platform/haiku.hpp @@ -0,0 +1,34 @@ +// (C) Copyright John Maddock 2001. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for most recent version. + +// Haiku specific config options: + +#define BOOST_PLATFORM "Haiku" + +#define BOOST_HAS_UNISTD_H +#define GLIBC_HAVE_LONG_LONG +#define BOOST_HAS_STDINT_H +#define BOOST_HASH_NO_EXTENSIONS + +#ifndef BOOST_DISABLE_THREADS +# define BOOST_HAS_THREADS +#endif + +#define BOOST_NO_CXX11_HDR_TYPE_TRAITS +#define BOOST_NO_CXX11_ATOMIC_SMART_PTR +#define BOOST_NO_CXX11_STATIC_ASSERT +#define BOOST_NO_CXX11_VARIADIC_MACROS + +// +// thread API's not auto detected: +// +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_PTHREAD_YIELD +#define BOOST_HAS_GETTIMEOFDAY + +// boilerplate code: +#include diff --git a/include/boost/config/select_platform_config.hpp b/include/boost/config/select_platform_config.hpp index 2dddc6a2..acd1409e 100644 --- a/include/boost/config/select_platform_config.hpp +++ b/include/boost/config/select_platform_config.hpp @@ -41,6 +41,10 @@ // win32: # define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" +#elif defined(__HAIKU__) +// Haiku +# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp" + #elif defined(__BEOS__) // BeOS # define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index b26d1ff9..24c768cb 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -36,7 +36,8 @@ || defined(_GLIBCXX__PTHREADS) \ || defined(_GLIBCXX_HAS_GTHREADS) \ || defined(_WIN32) \ - || defined(_AIX) + || defined(_AIX) \ + || defined(__HAIKU__) // // If the std lib has thread support turned on, then turn it on in Boost // as well. We do this because some gcc-3.4 std lib headers define _REENTANT