$OpenBSD: patch-boost_config_compiler_clang_hpp,v 1.4 2018/01/31 21:54:49 rsadowski Exp $

boost does not like mixing different compilers at build and compile
time.

We build boost itself with gcc-4.2.1 from base, which doesn't support
the integer scalar type __int128, and this results in a
/usr/local/include/boost/config/user.hpp lacking the "BOOST_HAS_INT128"
define.

When compiling something that depends on boost using a newer compiler
like gcc-4.9 or clang, a code snippet in
/usr/local/include/boost/config/compiler/{clang,gcc}.hpp reactivates
__int128 support, but the code containing typedef declarations
inside /usr/local/include/boost/config/suffix.hpp is never reached,
because /usr/local/include/boost/config/user.hpp lacks "BOOST_HAS_INT128".
Hence, the following errors occur:

/usr/local/include/boost/type_traits/is_integral.hpp:72:1: error: 'int128_type' is not a member of 'boost'
/usr/local/include/boost/type_traits/is_integral.hpp:73:1: error: 'uint128_type' is not a member of 'boost'

As a temporary band-aid, completely disable __int128 support on
OpenBSD.

Index: boost/config/compiler/clang.hpp
--- boost/config/compiler/clang.hpp.orig
+++ boost/config/compiler/clang.hpp
@@ -90,7 +90,7 @@
 #  endif
 #endif
 
-#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) && !defined(_MSC_VER)
+#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) && !defined(_MSC_VER) && !defined(__OpenBSD__)
 #  define BOOST_HAS_INT128
 #endif
 
@@ -316,7 +316,9 @@
 #endif
 
 // Clang has supported the 'unused' attribute since the first release.
+#if defined(__GNUC__) && (__GNUC__ >= 4) || defined(__clang__)
 #define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__))
+#endif
 
 // Type aliasing hint.
 #if __has_attribute(__may_alias__)
