mirror of
https://github.com/boostorg/config.git
synced 2026-03-09 15:30:52 +01:00
Compare commits
21 Commits
boost-1.77
...
mclow-patc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8df65862c7 | ||
|
|
01f00de731 | ||
|
|
47614564ec | ||
|
|
76d4eaf4be | ||
|
|
c3de80c2ef | ||
|
|
a8bdf6ae2f | ||
|
|
42cff96876 | ||
|
|
73557f7766 | ||
|
|
cfc6545ce9 | ||
|
|
eb3a0a98ae | ||
|
|
b80c25f474 | ||
|
|
8595667b36 | ||
|
|
a5b2dbdcf1 | ||
|
|
f1b4a51cea | ||
|
|
098ca4a3cf | ||
|
|
0148ea5ea2 | ||
|
|
1e63c7729d | ||
|
|
f6fdfb9291 | ||
|
|
e52aa58652 | ||
|
|
9e80993844 | ||
|
|
98c3ac8158 |
@@ -1481,6 +1481,12 @@ compiler version macro.
|
||||
[[`BOOST_CLANG`][`<boost/config.hpp>`][
|
||||
Defined to 1 if the compiler is the Clang compiler.
|
||||
]]
|
||||
[[`BOOST_CLANG_VERSION`][`<boost/config.hpp>`][
|
||||
Defined to the version of the Clang compiler, usually
|
||||
`__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__`. On
|
||||
Apple Clang, has a best-effort value reflecting the upstream version, rather
|
||||
than the Apple version.
|
||||
]]
|
||||
[[`BOOST_BORLANDC`][`<boost/config.hpp>`][
|
||||
Defined to the value of __BORLANDC__ if the compiler is the Embarcadero
|
||||
non-clang based compiler.
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
// This file was automatically generated on Wed Mar 3 08:46:11 2021
|
||||
// by libs/config/tools/generate.cpp
|
||||
// Copyright John Maddock 2002-4.
|
||||
// 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/libs/config for the most recent version.//
|
||||
// Revision $Id$
|
||||
//
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/assert_cxx17.hpp>
|
||||
|
||||
#ifdef BOOST_NO_CXX98_BINDERS
|
||||
# error "Your compiler appears not to be fully C++98 compliant. Detected via defect macro BOOST_NO_CXX98_BINDERS."
|
||||
#endif
|
||||
#ifdef BOOST_NO_CXX98_FUNCTION_BASE
|
||||
# error "Your compiler appears not to be fully C++98 compliant. Detected via defect macro BOOST_NO_CXX98_FUNCTION_BASE."
|
||||
#endif
|
||||
#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
|
||||
# error "Your compiler appears not to be fully C++98 compliant. Detected via defect macro BOOST_NO_CXX98_RANDOM_SHUFFLE."
|
||||
#endif
|
||||
@@ -351,3 +351,5 @@
|
||||
// Macro used to identify the Clang compiler.
|
||||
#define BOOST_CLANG 1
|
||||
|
||||
// BOOST_CLANG_VERSION
|
||||
#include <boost/config/compiler/clang_version.hpp>
|
||||
|
||||
77
include/boost/config/compiler/clang_version.hpp
Normal file
77
include/boost/config/compiler/clang_version.hpp
Normal file
@@ -0,0 +1,77 @@
|
||||
// Copyright 2021 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
|
||||
# define BOOST_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
|
||||
|
||||
#else
|
||||
# define BOOST_CLANG_REPORTED_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
|
||||
|
||||
// https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
|
||||
|
||||
# if BOOST_CLANG_REPORTED_VERSION >= 130000
|
||||
# define BOOST_CLANG_VERSION 120000
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 120005
|
||||
# define BOOST_CLANG_VERSION 110100
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 120000
|
||||
# define BOOST_CLANG_VERSION 100000
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 110003
|
||||
# define BOOST_CLANG_VERSION 90000
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 110000
|
||||
# define BOOST_CLANG_VERSION 80000
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 100001
|
||||
# define BOOST_CLANG_VERSION 70000
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 100000
|
||||
# define BOOST_CLANG_VERSION 60001
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 90100
|
||||
# define BOOST_CLANG_VERSION 50002
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 90000
|
||||
# define BOOST_CLANG_VERSION 40000
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 80000
|
||||
# define BOOST_CLANG_VERSION 30900
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 70300
|
||||
# define BOOST_CLANG_VERSION 30800
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 70000
|
||||
# define BOOST_CLANG_VERSION 30700
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 60100
|
||||
# define BOOST_CLANG_VERSION 30600
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 60000
|
||||
# define BOOST_CLANG_VERSION 30500
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 50100
|
||||
# define BOOST_CLANG_VERSION 30400
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 50000
|
||||
# define BOOST_CLANG_VERSION 30300
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 40200
|
||||
# define BOOST_CLANG_VERSION 30200
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 30100
|
||||
# define BOOST_CLANG_VERSION 30100
|
||||
|
||||
# elif BOOST_CLANG_REPORTED_VERSION >= 20100
|
||||
# define BOOST_CLANG_VERSION 30000
|
||||
|
||||
# else
|
||||
# define BOOST_CLANG_VERSION 20900
|
||||
|
||||
# endif
|
||||
|
||||
# undef BOOST_CLANG_REPORTED_VERSION
|
||||
#endif
|
||||
@@ -323,9 +323,10 @@
|
||||
# define BOOST_FALLTHROUGH __attribute__((fallthrough))
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) && !defined(__MINGW64__)
|
||||
// Currently (March 2019) thread_local is broken on mingw for all current 32bit compiler releases, see
|
||||
#if (__GNUC__ < 11) && defined(__MINGW32__) && !defined(__MINGW64__)
|
||||
// thread_local was broken on mingw for all 32bit compiler releases prior to 11.x, see
|
||||
// https://sourceforge.net/p/mingw-w64/bugs/527/
|
||||
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83562
|
||||
// Not setting this causes program termination on thread exit.
|
||||
#define BOOST_NO_CXX11_THREAD_LOCAL
|
||||
#endif
|
||||
|
||||
@@ -288,3 +288,4 @@
|
||||
// Macro used to identify the Clang compiler.
|
||||
#define BOOST_CLANG 1
|
||||
|
||||
#define BOOST_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
|
||||
|
||||
@@ -629,6 +629,9 @@ namespace std{ using ::type_info; }
|
||||
// nvcc doesn't always parse __noinline__,
|
||||
// see: https://svn.boost.org/trac/boost/ticket/9392
|
||||
# define BOOST_NOINLINE __attribute__ ((noinline))
|
||||
# elif defined(HIP_VERSION)
|
||||
// See https://github.com/boostorg/config/issues/392
|
||||
# define BOOST_NOINLINE __attribute__ ((noinline))
|
||||
# else
|
||||
# define BOOST_NOINLINE __attribute__ ((__noinline__))
|
||||
# endif
|
||||
@@ -1204,18 +1207,6 @@ namespace std{ using ::type_info; }
|
||||
# define BOOST_CXX_VERSION __cplusplus
|
||||
#endif
|
||||
|
||||
//
|
||||
// Define composite agregate macros:
|
||||
//
|
||||
#include <boost/config/detail/cxx_composite.hpp>
|
||||
|
||||
//
|
||||
// Define the std level that the compiler claims to support:
|
||||
//
|
||||
#ifndef BOOST_CXX_VERSION
|
||||
# define BOOST_CXX_VERSION __cplusplus
|
||||
#endif
|
||||
|
||||
//
|
||||
// Finish off with checks for macros that are depricated / no longer supported,
|
||||
// if any of these are set then it's very likely that much of Boost will no
|
||||
|
||||
@@ -184,16 +184,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
#if (BOOST_LIBSTDCXX_VERSION >= 100000) && defined(BOOST_HAS_HASH)
|
||||
//
|
||||
// hash_set/hash_map deprecated and have terminal bugs:
|
||||
//
|
||||
#undef BOOST_HAS_HASH
|
||||
#undef BOOST_HAS_SET_HEADER
|
||||
#undef BOOST_HAS_MAP_HEADER
|
||||
#endif
|
||||
|
||||
|
||||
#if (BOOST_LIBSTDCXX_VERSION < 50100)
|
||||
// libstdc++ does not define this function as it's deprecated in C++11, but clang still looks for it,
|
||||
// defining it here is a terrible cludge, but should get things working:
|
||||
|
||||
@@ -192,6 +192,11 @@
|
||||
#else
|
||||
#define _COMPILER_VERSION_WORKAROUND_GUARD 0
|
||||
#endif
|
||||
#ifndef __clang_major__
|
||||
#define __clang_major___WORKAROUND_GUARD 1
|
||||
#else
|
||||
#define __clang_major___WORKAROUND_GUARD 0
|
||||
#endif
|
||||
|
||||
#ifndef _RWSTD_VER
|
||||
#define _RWSTD_VER_WORKAROUND_GUARD 1
|
||||
@@ -254,6 +259,12 @@
|
||||
#else
|
||||
#define BOOST_INTEL_WORKAROUND_GUARD 0
|
||||
#endif
|
||||
#ifndef BOOST_CLANG_VERSION
|
||||
#define BOOST_CLANG_VERSION_WORKAROUND_GUARD 1
|
||||
#else
|
||||
#define BOOST_CLANG_VERSION_WORKAROUND_GUARD 0
|
||||
#endif
|
||||
|
||||
// Always define to zero, if it's used it'll be defined my MPL:
|
||||
#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// 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)
|
||||
#ifndef WORKAROUND_DWA2002126_HPP
|
||||
#define WORKAROUND_DWA2002126_HPP
|
||||
#ifndef BOOST_WORKAROUND_DWA2002126_HPP
|
||||
#define BOOST_WORKAROUND_DWA2002126_HPP
|
||||
|
||||
#include <boost/config/workaround.hpp>
|
||||
|
||||
#endif // WORKAROUND_DWA2002126_HPP
|
||||
#endif // BOOST_WORKAROUND_DWA2002126_HPP
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
// BOOST_VERSION / 100 % 1000 is the minor version
|
||||
// BOOST_VERSION / 100000 is the major version
|
||||
|
||||
#define BOOST_VERSION 107700
|
||||
#define BOOST_VERSION 107800
|
||||
|
||||
//
|
||||
// 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 <config/auto_link.hpp> to select which library version to link to.
|
||||
|
||||
#define BOOST_LIB_VERSION "1_77"
|
||||
#define BOOST_LIB_VERSION "1_78"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,8 @@ exe has_pthread_lib : config_info.cpp pthread ;
|
||||
explicit has_pthread_lib ;
|
||||
exe has_rt_lib : config_info.cpp rt ;
|
||||
explicit has_rt_lib ;
|
||||
obj check_memory : check_memory.cpp ;
|
||||
explicit check_memory ;
|
||||
|
||||
test-suite config
|
||||
:
|
||||
@@ -65,6 +67,7 @@ test-suite config
|
||||
[ check-target-builds has_atomic_lib : <source>atomic ]
|
||||
[ check-target-builds has_pthread_lib : <source>pthread ]
|
||||
[ check-target-builds has_rt_lib : <source>rt ]
|
||||
[ check-target-builds check_memory : : <build>no ]
|
||||
: config_test_no_rtti
|
||||
]
|
||||
[ run config_test.cpp
|
||||
|
||||
@@ -12,32 +12,40 @@
|
||||
// macros and don't provide functions. Under C++ it's an error
|
||||
// to provide the macros at all, but that's a separate issue.
|
||||
|
||||
#include <ctype.h>
|
||||
#include <cctype>
|
||||
|
||||
namespace boost_no_ctype_functions {
|
||||
|
||||
extern "C" {
|
||||
typedef int (* character_classify_function)(int);
|
||||
}
|
||||
|
||||
void pass_function(character_classify_function)
|
||||
{
|
||||
}
|
||||
|
||||
int test()
|
||||
{
|
||||
pass_function(isalpha);
|
||||
pass_function(isalnum);
|
||||
pass_function(iscntrl);
|
||||
pass_function(isdigit);
|
||||
pass_function(isgraph);
|
||||
pass_function(islower);
|
||||
pass_function(isprint);
|
||||
pass_function(ispunct);
|
||||
pass_function(isspace);
|
||||
pass_function(isupper);
|
||||
pass_function(isxdigit);
|
||||
return 0;
|
||||
using std::isalpha;
|
||||
using std::isalnum;
|
||||
using std::iscntrl;
|
||||
using std::isdigit;
|
||||
using std::isgraph;
|
||||
using std::islower;
|
||||
using std::isprint;
|
||||
using std::ispunct;
|
||||
using std::isspace;
|
||||
using std::isupper;
|
||||
using std::isxdigit;
|
||||
|
||||
int r = 0;
|
||||
char c = 'a';
|
||||
|
||||
r |= (isalpha)(c);
|
||||
r |= (isalnum)(c);
|
||||
r |= (iscntrl)(c);
|
||||
r |= (isdigit)(c);
|
||||
r |= (isgraph)(c);
|
||||
r |= (islower)(c);
|
||||
r |= (isprint)(c);
|
||||
r |= (ispunct)(c);
|
||||
r |= (isspace)(c);
|
||||
r |= (isupper)(c);
|
||||
r |= (isxdigit)(c);
|
||||
|
||||
return r == 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
11
test/check_memory.cpp
Normal file
11
test/check_memory.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
// (C) Copyright John Maddock 2021.
|
||||
// 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)
|
||||
|
||||
//
|
||||
// Quick santity check that <memory> is OK. It was broken for some old gcc versions and -fno-rtti
|
||||
//
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -380,6 +380,7 @@ void print_compiler_macros()
|
||||
PRINT_MACRO(__clang_minor__);
|
||||
PRINT_MACRO(__clang_version__);
|
||||
PRINT_MACRO(__clang_patchlevel__);
|
||||
PRINT_MACRO(__apple_build_version__);
|
||||
|
||||
// misc compilers not covered so far:
|
||||
PRINT_MACRO(__USLC__);
|
||||
@@ -1268,6 +1269,8 @@ void print_boost_macros()
|
||||
PRINT_MACRO(BOOST_INTEL);
|
||||
PRINT_MACRO(BOOST_MSVC);
|
||||
PRINT_MACRO(BOOST_GCC);
|
||||
PRINT_MACRO(BOOST_CLANG);
|
||||
PRINT_MACRO(BOOST_CLANG_VERSION);
|
||||
PRINT_MACRO(BOOST_LIBSTDCXX_VERSION);
|
||||
PRINT_MACRO(BOOST_STD_EXTENSION_NAMESPACE);
|
||||
PRINT_MACRO(BOOST_UNREACHABLE_RETURN(0));
|
||||
|
||||
Reference in New Issue
Block a user