File indexing completed on 2025-01-18 09:39:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef BOOST_LOG_DETAIL_CONFIG_HPP_INCLUDED_
0018 #define BOOST_LOG_DETAIL_CONFIG_HPP_INCLUDED_
0019
0020
0021 #if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__)
0022 #include <boost/winapi/config.hpp>
0023 #endif
0024
0025 #include <limits.h> // To bring in libc macros
0026 #include <boost/config.hpp>
0027
0028
0029 #if defined(BOOST_NO_RTTI)
0030 # error Boost.Log: RTTI is required by the library
0031 #endif
0032
0033 #if defined(_MSC_VER) && _MSC_VER >= 1600
0034 # define BOOST_LOG_HAS_PRAGMA_DETECT_MISMATCH
0035 #endif
0036
0037 #if !defined(BOOST_WINDOWS)
0038 # ifndef BOOST_LOG_WITHOUT_DEBUG_OUTPUT
0039 # define BOOST_LOG_WITHOUT_DEBUG_OUTPUT
0040 # endif
0041 # ifndef BOOST_LOG_WITHOUT_EVENT_LOG
0042 # define BOOST_LOG_WITHOUT_EVENT_LOG
0043 # endif
0044 #endif
0045
0046 #ifdef BOOST_HAS_PRAGMA_ONCE
0047 #pragma once
0048 #endif
0049
0050 #if defined(BOOST_MSVC)
0051
0052 # define BOOST_LOG_BROKEN_STATIC_CONSTANTS_LINKAGE
0053 # if _MSC_VER <= 1310
0054
0055
0056
0057 # define BOOST_LOG_BROKEN_TEMPLATE_DEFINITION_MATCHING
0058 # endif
0059 # if _MSC_VER <= 1400
0060
0061 # define BOOST_LOG_BROKEN_FRIEND_TEMPLATE_SPECIALIZATIONS
0062 # endif
0063 # if _MSC_VER <= 1600
0064
0065
0066
0067
0068
0069
0070
0071 # define BOOST_LOG_BROKEN_REFERENCE_FROM_RVALUE_INIT
0072 # endif
0073 # if !defined(_STLPORT_VERSION)
0074
0075
0076
0077
0078
0079
0080
0081 # define BOOST_LOG_BROKEN_STL_ALIGNMENT
0082 # endif
0083 #endif
0084
0085 #if defined(BOOST_INTEL) || defined(__SUNPRO_CC)
0086
0087 # define BOOST_LOG_NO_MEMBER_TEMPLATE_FRIENDS
0088 #endif
0089
0090 #if defined(BOOST_MSVC) && BOOST_MSVC <= 1600
0091
0092 # define BOOST_LOG_BROKEN_CONSTANT_EXPRESSIONS
0093 #endif
0094
0095 #if (defined(BOOST_NO_CXX11_HDR_CODECVT) && BOOST_CXX_VERSION < 201703) || (defined(_MSVC_STL_VERSION) && _MSVC_STL_VERSION < 142)
0096
0097
0098
0099
0100
0101 # define BOOST_LOG_NO_CXX11_CODECVT_FACETS
0102 #endif
0103
0104 #if defined(__CYGWIN__)
0105
0106 # define BOOST_LOG_NO_ASIO
0107 #endif
0108
0109 #if defined(__VXWORKS__)
0110 # define BOOST_LOG_NO_GETPGRP
0111 # define BOOST_LOG_NO_GETSID
0112
0113 # include <vsbConfig.h>
0114 #endif
0115
0116 #if (!defined(__CRYSTAX__) && defined(__ANDROID__) && (__ANDROID_API__ < 21)) \
0117 || (defined(__VXWORKS__) && !defined(_WRS_CONFIG_USER_MANAGEMENT))
0118
0119 # define BOOST_LOG_NO_GETPWUID_R
0120 #endif
0121
0122 #if !defined(BOOST_LOG_USE_NATIVE_SYSLOG) && defined(BOOST_LOG_NO_ASIO)
0123 # ifndef BOOST_LOG_WITHOUT_SYSLOG
0124 # define BOOST_LOG_WITHOUT_SYSLOG
0125 # endif
0126 #endif
0127
0128 #if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)
0129
0130 # define BOOST_LOG_ANONYMOUS_NAMESPACE namespace anonymous {} using namespace anonymous; namespace anonymous
0131 #else
0132 # define BOOST_LOG_ANONYMOUS_NAMESPACE namespace
0133 #endif
0134
0135 #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || (defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ <= 6))
0136
0137 #define BOOST_LOG_NO_CXX11_ARG_PACKS_TO_NON_VARIADIC_ARGS_EXPANSION
0138 #endif
0139
0140 #if defined(BOOST_NO_CXX11_CONSTEXPR) || (defined(BOOST_GCC) && (BOOST_GCC / 100) <= 406)
0141
0142 #define BOOST_LOG_NO_CXX11_CONSTEXPR_DATA_MEMBER_BRACE_INITIALIZERS
0143 #endif
0144
0145 #if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_GCC) && (BOOST_GCC / 100) <= 406)
0146
0147 #define BOOST_LOG_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
0148 #define BOOST_LOG_NO_CXX11_DEFAULTED_VIRTUAL_FUNCTIONS
0149 #endif
0150
0151 #if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_CLANG) && ((__clang_major__ == 3) && (__clang_minor__ <= 1)))
0152
0153 #define BOOST_LOG_NO_CXX11_DEFAULTED_CONSTEXPR_CONSTRUCTORS
0154 #endif
0155
0156
0157
0158
0159 #if (!defined(__cpp_init_captures) || (__cpp_init_captures < 201803)) && \
0160 !(\
0161 BOOST_CXX_VERSION > 201703 && \
0162 (\
0163 (defined(BOOST_GCC) && (BOOST_GCC >= 90000)) || \
0164 (defined(BOOST_CLANG) && (BOOST_CLANG_VERSION >= 90000)) || \
0165 (defined(BOOST_MSVC) && (BOOST_MSVC >= 1922))\
0166 )\
0167 )
0168 #define BOOST_LOG_NO_CXX20_PACK_EXPANSION_IN_LAMBDA_INIT_CAPTURE
0169 #endif
0170
0171 #if defined(_MSC_VER)
0172 # define BOOST_LOG_NO_VTABLE __declspec(novtable)
0173 #else
0174 # define BOOST_LOG_NO_VTABLE
0175 #endif
0176
0177
0178 #if defined(_MSC_VER)
0179 # define BOOST_LOG_ASSUME(expr) __assume(expr)
0180 #elif defined(__has_builtin)
0181
0182
0183 # if __has_builtin(__builtin_assume) && (!defined(__clang__) || (__clang_major__ * 100 + __clang_minor__) >= 307)
0184 # define BOOST_LOG_ASSUME(expr) __builtin_assume(expr)
0185 # else
0186 # define BOOST_LOG_ASSUME(expr)
0187 # endif
0188 #else
0189 # define BOOST_LOG_ASSUME(expr)
0190 #endif
0191
0192
0193 #if defined(BOOST_CLANG)
0194 # if __has_builtin(__builtin_unreachable)
0195 # define BOOST_LOG_UNREACHABLE() __builtin_unreachable()
0196 # endif
0197 #elif defined(__GNUC__)
0198 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
0199 # define BOOST_LOG_UNREACHABLE() __builtin_unreachable()
0200 # endif
0201 #elif defined(_MSC_VER)
0202 # define BOOST_LOG_UNREACHABLE() __assume(0)
0203 #endif
0204 #if !defined(BOOST_LOG_UNREACHABLE)
0205 # define BOOST_LOG_UNREACHABLE()
0206 # define BOOST_LOG_UNREACHABLE_RETURN(r) return r
0207 #else
0208 # define BOOST_LOG_UNREACHABLE_RETURN(r) BOOST_LOG_UNREACHABLE()
0209 #endif
0210
0211
0212
0213 #if defined(BOOST_HAS_NRVO)
0214 #define BOOST_LOG_NRVO_RESULT(x) x
0215 #else
0216 #define BOOST_LOG_NRVO_RESULT(x) boost::move(x)
0217 #endif
0218
0219
0220 #if defined(__GNUC__) || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x590)
0221
0222 # define BOOST_LOG_NORETURN __attribute__((noreturn))
0223 #elif defined (_MSC_VER)
0224
0225 # define BOOST_LOG_NORETURN __declspec(noreturn)
0226 #else
0227
0228
0229 # define BOOST_LOG_NORETURN
0230 #endif
0231
0232
0233 #define BOOST_LOG_MAY_ALIAS BOOST_MAY_ALIAS
0234
0235 #if !defined(BOOST_LOG_BUILDING_THE_LIB)
0236
0237
0238 # if defined(BOOST_LOG_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
0239 # define BOOST_LOG_DLL
0240 # endif
0241
0242 # if defined(BOOST_LOG_DLL)
0243 # define BOOST_LOG_API BOOST_SYMBOL_IMPORT
0244 # else
0245 # define BOOST_LOG_API
0246 # endif
0247
0248
0249
0250 # if !defined(BOOST_ALL_NO_LIB)
0251 # if !defined(BOOST_LOG_NO_LIB)
0252 # define BOOST_LIB_NAME boost_log
0253 # if defined(BOOST_LOG_DLL)
0254 # define BOOST_DYN_LINK
0255 # endif
0256 # include <boost/config/auto_link.hpp>
0257 # endif
0258
0259
0260
0261 # if !defined(BOOST_LOG_DLL)
0262 # include <boost/filesystem/config.hpp>
0263
0264 # endif
0265 # endif
0266
0267 #else
0268
0269 # if defined(BOOST_LOG_DLL)
0270 # define BOOST_LOG_API BOOST_SYMBOL_EXPORT
0271 # else
0272 # define BOOST_LOG_API BOOST_SYMBOL_VISIBLE
0273 # endif
0274
0275 #endif
0276
0277
0278 #if !defined(BOOST_LOG_WITHOUT_CHAR)
0279 # define BOOST_LOG_USE_CHAR
0280 #endif
0281 #if !defined(BOOST_LOG_WITHOUT_WCHAR_T)
0282 # define BOOST_LOG_USE_WCHAR_T
0283 #endif
0284
0285 #if !defined(BOOST_LOG_DOXYGEN_PASS)
0286
0287 # if !defined(BOOST_LOG_NO_THREADS) && !defined(BOOST_HAS_THREADS)
0288 # define BOOST_LOG_NO_THREADS
0289 # endif
0290 #endif
0291
0292 #if !defined(BOOST_LOG_NO_THREADS)
0293
0294
0295 # include <boost/thread/detail/config.hpp>
0296 #endif
0297
0298 #if !defined(BOOST_LOG_NO_THREADS)
0299 # define BOOST_LOG_EXPR_IF_MT(expr) expr
0300 #else
0301 # undef BOOST_LOG_USE_COMPILER_TLS
0302 # define BOOST_LOG_EXPR_IF_MT(expr)
0303 #endif
0304
0305 #if defined(BOOST_LOG_USE_COMPILER_TLS)
0306 # if defined(__GNUC__) || defined(__SUNPRO_CC)
0307 # define BOOST_LOG_TLS __thread
0308 # elif defined(BOOST_MSVC)
0309 # define BOOST_LOG_TLS __declspec(thread)
0310 # else
0311 # undef BOOST_LOG_USE_COMPILER_TLS
0312 # endif
0313 #endif
0314
0315 #ifndef BOOST_LOG_CPU_CACHE_LINE_SIZE
0316
0317 #if defined(__s390__) || defined(__s390x__)
0318 #define BOOST_LOG_CPU_CACHE_LINE_SIZE 256
0319 #elif defined(powerpc) || defined(__powerpc__) || defined(__ppc__)
0320 #define BOOST_LOG_CPU_CACHE_LINE_SIZE 128
0321 #else
0322 #define BOOST_LOG_CPU_CACHE_LINE_SIZE 64
0323 #endif
0324 #endif
0325
0326 namespace boost {
0327
0328
0329 #if !defined(BOOST_LOG_DOXYGEN_PASS)
0330 # if defined(BOOST_LOG_DLL)
0331 # if defined(BOOST_LOG_NO_THREADS)
0332 # define BOOST_LOG_VERSION_NAMESPACE v2_st
0333 # else
0334 # if defined(BOOST_THREAD_PLATFORM_PTHREAD)
0335 # define BOOST_LOG_VERSION_NAMESPACE v2_mt_posix
0336 # elif defined(BOOST_THREAD_PLATFORM_WIN32)
0337 # if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN8
0338 # define BOOST_LOG_VERSION_NAMESPACE v2_mt_nt62
0339 # elif BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
0340 # define BOOST_LOG_VERSION_NAMESPACE v2_mt_nt6
0341 # else
0342 # define BOOST_LOG_VERSION_NAMESPACE v2_mt_nt5
0343 # endif
0344 # else
0345 # define BOOST_LOG_VERSION_NAMESPACE v2_mt
0346 # endif
0347 # endif
0348 # else
0349 # if defined(BOOST_LOG_NO_THREADS)
0350 # define BOOST_LOG_VERSION_NAMESPACE v2s_st
0351 # else
0352 # if defined(BOOST_THREAD_PLATFORM_PTHREAD)
0353 # define BOOST_LOG_VERSION_NAMESPACE v2s_mt_posix
0354 # elif defined(BOOST_THREAD_PLATFORM_WIN32)
0355 # if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN8
0356 # define BOOST_LOG_VERSION_NAMESPACE v2s_mt_nt62
0357 # elif BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
0358 # define BOOST_LOG_VERSION_NAMESPACE v2s_mt_nt6
0359 # else
0360 # define BOOST_LOG_VERSION_NAMESPACE v2s_mt_nt5
0361 # endif
0362 # else
0363 # define BOOST_LOG_VERSION_NAMESPACE v2s_mt
0364 # endif
0365 # endif
0366 # endif
0367
0368
0369 namespace log {
0370
0371 # if !defined(BOOST_NO_CXX11_INLINE_NAMESPACES)
0372
0373 inline namespace BOOST_LOG_VERSION_NAMESPACE {}
0374
0375 # define BOOST_LOG_OPEN_NAMESPACE namespace log { inline namespace BOOST_LOG_VERSION_NAMESPACE {
0376 # define BOOST_LOG_CLOSE_NAMESPACE }}
0377
0378 # elif defined(BOOST_GCC) && (BOOST_GCC >= 40400)
0379
0380
0381 __extension__ inline namespace BOOST_LOG_VERSION_NAMESPACE {}
0382
0383 # define BOOST_LOG_OPEN_NAMESPACE namespace log { __extension__ inline namespace BOOST_LOG_VERSION_NAMESPACE {
0384 # define BOOST_LOG_CLOSE_NAMESPACE }}
0385
0386 # else
0387
0388 namespace BOOST_LOG_VERSION_NAMESPACE {}
0389
0390 using namespace BOOST_LOG_VERSION_NAMESPACE
0391 # if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && !defined(__clang__)
0392 __attribute__((__strong__))
0393 # endif
0394 ;
0395
0396 # define BOOST_LOG_OPEN_NAMESPACE namespace log { namespace BOOST_LOG_VERSION_NAMESPACE {
0397 # define BOOST_LOG_CLOSE_NAMESPACE }}
0398 # endif
0399
0400 }
0401
0402 #else
0403
0404 namespace log {}
0405 # define BOOST_LOG_OPEN_NAMESPACE namespace log {
0406 # define BOOST_LOG_CLOSE_NAMESPACE }
0407
0408 #endif
0409
0410 #if defined(BOOST_LOG_HAS_PRAGMA_DETECT_MISMATCH)
0411 #pragma detect_mismatch("boost_log_abi", BOOST_STRINGIZE(BOOST_LOG_VERSION_NAMESPACE))
0412 #endif
0413
0414 }
0415
0416 #endif