From 034817c492923a05181d5ad745ccaa8578feb1b0 Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Thu, 27 Aug 2015 13:34:22 +0200 Subject: [PATCH 1/5] Use __has_attribute instead of gcc version in clang --- include/boost/config/compiler/clang.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 47ea65b0..c78edb24 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -23,6 +23,10 @@ #define __has_extension __has_feature #endif +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif + #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif @@ -256,9 +260,7 @@ # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif - -// Unused attribute: -#if defined(__GNUC__) && (__GNUC__ >= 4) +#if __has_attribute(unused) # define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) #endif From 00705343486081d9d1a25ccbd60baf6d855a652f Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Thu, 27 Aug 2015 16:23:21 +0200 Subject: [PATCH 2/5] Add basic platform bits for Nuxi CloudABI. Nuxi CloudABI is a POSIX-like runtime environment purely built on the principle of capability-based security[1]. It allows you to run arbitrary untrusted binaries directly on top of a UNIX kernel without compromising system integrity. This change adds a basic platform configuration that defines a small set of options that allow it to build most of the Boost sources. The next step is to send out small fixes to individual libraries that don't build yet. [1] Nuxi CloudABI: https://github.com/NuxiNL/cloudlibc --- include/boost/config/platform/cloudabi.hpp | 18 ++++++++++++++++++ .../boost/config/select_platform_config.hpp | 4 ++++ 2 files changed, 22 insertions(+) create mode 100644 include/boost/config/platform/cloudabi.hpp diff --git a/include/boost/config/platform/cloudabi.hpp b/include/boost/config/platform/cloudabi.hpp new file mode 100644 index 00000000..bed7b631 --- /dev/null +++ b/include/boost/config/platform/cloudabi.hpp @@ -0,0 +1,18 @@ +// Copyright Nuxi, https://nuxi.nl/ 2015. +// Distributed under 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) + +#define BOOST_PLATFORM "CloudABI" + +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_UNISTD_H + +#define BOOST_HAS_CLOCK_GETTIME +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_GETTIMEOFDAY +#define BOOST_HAS_LOG1P +#define BOOST_HAS_NANOSLEEP +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_SCHED_YIELD diff --git a/include/boost/config/select_platform_config.hpp b/include/boost/config/select_platform_config.hpp index acd1409e..62fd818b 100644 --- a/include/boost/config/select_platform_config.hpp +++ b/include/boost/config/select_platform_config.hpp @@ -80,6 +80,10 @@ #elif defined(__VMS) // VMS: # define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" + +#elif defined(__CloudABI__) +// Nuxi CloudABI: +# define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp" #else # if defined(unix) \ From cdcb3fc1aa910bd68807e17e183df07530722c85 Mon Sep 17 00:00:00 2001 From: morinmorin Date: Thu, 3 Sep 2015 18:32:02 +0900 Subject: [PATCH 3/5] Remove the detection code for 'unused' attribute on Clang. --- include/boost/config/compiler/clang.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index c78edb24..90f747c0 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -260,9 +260,8 @@ # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif -#if __has_attribute(unused) -# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) -#endif +// Clang has supported the 'unused' attribute since the first release. +#define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ From 2656ae42d49eae203c40ed537249a88e62bf96a6 Mon Sep 17 00:00:00 2001 From: morinmorin Date: Thu, 3 Sep 2015 19:02:48 +0900 Subject: [PATCH 4/5] Guard attribute names with double underscores. --- include/boost/config/compiler/clang.hpp | 2 +- include/boost/config/compiler/gcc.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/config/compiler/clang.hpp b/include/boost/config/compiler/clang.hpp index 90f747c0..1ecd85e3 100644 --- a/include/boost/config/compiler/clang.hpp +++ b/include/boost/config/compiler/clang.hpp @@ -261,7 +261,7 @@ #endif // Clang has supported the 'unused' attribute since the first release. -#define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) +#define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ diff --git a/include/boost/config/compiler/gcc.hpp b/include/boost/config/compiler/gcc.hpp index 07147ee0..350431d0 100644 --- a/include/boost/config/compiler/gcc.hpp +++ b/include/boost/config/compiler/gcc.hpp @@ -276,7 +276,7 @@ // // Unused attribute: #if __GNUC__ >= 4 -# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) +# define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) #endif #ifndef BOOST_COMPILER From c99044f49298f461300d3c656d54d92de8608b96 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 5 Sep 2015 21:34:42 +0100 Subject: [PATCH 5/5] Version bump --- include/boost/version.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/version.hpp b/include/boost/version.hpp index 7b64aedb..fce02ec7 100644 --- a/include/boost/version.hpp +++ b/include/boost/version.hpp @@ -19,7 +19,7 @@ // BOOST_VERSION / 100 % 1000 is the minor version // BOOST_VERSION / 100000 is the major version -#define BOOST_VERSION 105900 +#define BOOST_VERSION 106000 // // BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION @@ -27,6 +27,6 @@ // number, y is the minor version number, and z is the patch level if not 0. // This is used by to select which library version to link to. -#define BOOST_LIB_VERSION "1_59" +#define BOOST_LIB_VERSION "1_60" #endif