File indexing completed on 2025-09-18 08:47:57
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) || (BOOST_CXX_VERSION >= 202002) || \
0096 (defined(_MSVC_STL_VERSION) && _MSVC_STL_VERSION < 142)
0097
0098
0099
0100
0101
0102
0103 # define BOOST_LOG_NO_CXX11_CODECVT_FACETS
0104 #endif
0105
0106 #if defined(__CYGWIN__)
0107
0108 # define BOOST_LOG_NO_ASIO
0109 #endif
0110
0111 #if defined(__VXWORKS__)
0112 # define BOOST_LOG_NO_GETPGRP
0113 # define BOOST_LOG_NO_GETSID
0114
0115 # include <vsbConfig.h>
0116 #endif
0117
0118 #if (!defined(__CRYSTAX__) && defined(__ANDROID__) && (__ANDROID_API__ < 21)) || \
0119 (defined(__VXWORKS__) && !defined(_WRS_CONFIG_USER_MANAGEMENT))
0120
0121 # define BOOST_LOG_NO_GETPWUID_R
0122 #endif
0123
0124 #if !defined(BOOST_LOG_USE_NATIVE_SYSLOG) && defined(BOOST_LOG_NO_ASIO)
0125 # ifndef BOOST_LOG_WITHOUT_SYSLOG
0126 # define BOOST_LOG_WITHOUT_SYSLOG
0127 # endif
0128 #endif
0129
0130 #if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)
0131
0132 # define BOOST_LOG_ANONYMOUS_NAMESPACE namespace anonymous {} using namespace anonymous; namespace anonymous
0133 #else
0134 # define BOOST_LOG_ANONYMOUS_NAMESPACE namespace
0135 #endif
0136
0137 #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || (defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ <= 6))
0138
0139 #define BOOST_LOG_NO_CXX11_ARG_PACKS_TO_NON_VARIADIC_ARGS_EXPANSION
0140 #endif
0141
0142 #if defined(BOOST_NO_CXX11_CONSTEXPR) || (defined(BOOST_GCC) && (BOOST_GCC / 100) <= 406)
0143
0144 #define BOOST_LOG_NO_CXX11_CONSTEXPR_DATA_MEMBER_BRACE_INITIALIZERS
0145 #endif
0146
0147 #if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_GCC) && (BOOST_GCC / 100) <= 406)
0148
0149 #define BOOST_LOG_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
0150 #define BOOST_LOG_NO_CXX11_DEFAULTED_VIRTUAL_FUNCTIONS
0151 #endif
0152
0153 #if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_CLANG) && ((__clang_major__ == 3) && (__clang_minor__ <= 1)))
0154
0155 #define BOOST_LOG_NO_CXX11_DEFAULTED_CONSTEXPR_CONSTRUCTORS
0156 #endif
0157
0158
0159
0160
0161 #if (!defined(__cpp_init_captures) || (__cpp_init_captures < 201803)) && \
0162 !(\
0163 BOOST_CXX_VERSION > 201703 && \
0164 (\
0165 (defined(BOOST_GCC) && (BOOST_GCC >= 90000)) || \
0166 (defined(BOOST_CLANG) && (BOOST_CLANG_VERSION >= 90000)) || \
0167 (defined(BOOST_MSVC) && (BOOST_MSVC >= 1922))\
0168 )\
0169 )
0170 #define BOOST_LOG_NO_CXX20_PACK_EXPANSION_IN_LAMBDA_INIT_CAPTURE
0171 #endif
0172
0173 #if defined(_MSC_VER)
0174 # define BOOST_LOG_NO_VTABLE __declspec(novtable)
0175 #else
0176 # define BOOST_LOG_NO_VTABLE
0177 #endif
0178
0179
0180 #if defined(_MSC_VER)
0181 # define BOOST_LOG_ASSUME(expr) __assume(expr)
0182 #elif defined(__has_builtin)
0183
0184
0185 # if __has_builtin(__builtin_assume) && (!defined(__clang__) || (__clang_major__ * 100 + __clang_minor__) >= 307)
0186 # define BOOST_LOG_ASSUME(expr) __builtin_assume(expr)
0187 # else
0188 # define BOOST_LOG_ASSUME(expr)
0189 # endif
0190 #else
0191 # define BOOST_LOG_ASSUME(expr)
0192 #endif
0193
0194
0195 #if defined(BOOST_CLANG)
0196 # if __has_builtin(__builtin_unreachable)
0197 # define BOOST_LOG_UNREACHABLE() __builtin_unreachable()
0198 # endif
0199 #elif defined(__GNUC__)
0200 # if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
0201 # define BOOST_LOG_UNREACHABLE() __builtin_unreachable()
0202 # endif
0203 #elif defined(_MSC_VER)
0204 # define BOOST_LOG_UNREACHABLE() __assume(0)
0205 #endif
0206 #if !defined(BOOST_LOG_UNREACHABLE)
0207 # define BOOST_LOG_UNREACHABLE()
0208 # define BOOST_LOG_UNREACHABLE_RETURN(r) return r
0209 #else
0210 # define BOOST_LOG_UNREACHABLE_RETURN(r) BOOST_LOG_UNREACHABLE()
0211 #endif
0212
0213
0214
0215 #if defined(BOOST_HAS_NRVO)
0216 #define BOOST_LOG_NRVO_RESULT(x) x
0217 #else
0218 #define BOOST_LOG_NRVO_RESULT(x) boost::move(x)
0219 #endif
0220
0221
0222 #if defined(__GNUC__) || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x590)
0223
0224 # define BOOST_LOG_NORETURN __attribute__((noreturn))
0225 #elif defined (_MSC_VER)
0226
0227 # define BOOST_LOG_NORETURN __declspec(noreturn)
0228 #else
0229
0230
0231 # define BOOST_LOG_NORETURN
0232 #endif
0233
0234
0235 #define BOOST_LOG_MAY_ALIAS BOOST_MAY_ALIAS
0236
0237 #if !defined(BOOST_LOG_BUILDING_THE_LIB)
0238
0239
0240 # if defined(BOOST_LOG_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
0241 # define BOOST_LOG_DLL
0242 # endif
0243
0244 # if defined(BOOST_LOG_DLL)
0245 # define BOOST_LOG_API BOOST_SYMBOL_IMPORT
0246 # else
0247 # define BOOST_LOG_API
0248 # endif
0249
0250
0251
0252 # if !defined(BOOST_ALL_NO_LIB)
0253 # if !defined(BOOST_LOG_NO_LIB)
0254 # define BOOST_LIB_NAME boost_log
0255 # if defined(BOOST_LOG_DLL)
0256 # define BOOST_DYN_LINK
0257 # endif
0258 # include <boost/config/auto_link.hpp>
0259 # endif
0260
0261
0262
0263 # if !defined(BOOST_LOG_DLL)
0264 # include <boost/filesystem/config.hpp>
0265
0266 # endif
0267 # endif
0268
0269 #else
0270
0271 # if defined(BOOST_LOG_DLL)
0272 # define BOOST_LOG_API BOOST_SYMBOL_EXPORT
0273 # else
0274 # define BOOST_LOG_API BOOST_SYMBOL_VISIBLE
0275 # endif
0276
0277 #endif
0278
0279
0280 #if !defined(BOOST_LOG_WITHOUT_CHAR)
0281 # define BOOST_LOG_USE_CHAR
0282 #endif
0283 #if !defined(BOOST_LOG_WITHOUT_WCHAR_T)
0284 # define BOOST_LOG_USE_WCHAR_T
0285 #endif
0286
0287 #if !defined(BOOST_LOG_DOXYGEN_PASS)
0288
0289 # if !defined(BOOST_LOG_NO_THREADS) && !defined(BOOST_HAS_THREADS)
0290 # define BOOST_LOG_NO_THREADS
0291 # endif
0292 #endif
0293
0294 #if !defined(BOOST_LOG_NO_THREADS)
0295
0296
0297 # include <boost/thread/detail/config.hpp>
0298 #endif
0299
0300 #if !defined(BOOST_LOG_NO_THREADS)
0301 # define BOOST_LOG_EXPR_IF_MT(expr) expr
0302 #else
0303 # undef BOOST_LOG_USE_COMPILER_TLS
0304 # define BOOST_LOG_EXPR_IF_MT(expr)
0305 #endif
0306
0307 #if defined(BOOST_LOG_USE_COMPILER_TLS)
0308 # if defined(__GNUC__) || defined(__SUNPRO_CC)
0309 # define BOOST_LOG_TLS __thread
0310 # elif defined(BOOST_MSVC)
0311 # define BOOST_LOG_TLS __declspec(thread)
0312 # else
0313 # undef BOOST_LOG_USE_COMPILER_TLS
0314 # endif
0315 #endif
0316
0317 #ifndef BOOST_LOG_CPU_CACHE_LINE_SIZE
0318
0319 #if defined(__s390__) || defined(__s390x__)
0320 #define BOOST_LOG_CPU_CACHE_LINE_SIZE 256
0321 #elif defined(powerpc) || defined(__powerpc__) || defined(__ppc__)
0322 #define BOOST_LOG_CPU_CACHE_LINE_SIZE 128
0323 #else
0324 #define BOOST_LOG_CPU_CACHE_LINE_SIZE 64
0325 #endif
0326 #endif
0327
0328 namespace boost {
0329
0330
0331 #if !defined(BOOST_LOG_DOXYGEN_PASS)
0332 # if defined(BOOST_LOG_DLL)
0333 # if defined(BOOST_LOG_NO_THREADS)
0334 # define BOOST_LOG_VERSION_NAMESPACE v2_st
0335 # else
0336 # if defined(BOOST_THREAD_PLATFORM_PTHREAD)
0337 # define BOOST_LOG_VERSION_NAMESPACE v2_mt_posix
0338 # elif defined(BOOST_THREAD_PLATFORM_WIN32)
0339 # if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN8
0340 # define BOOST_LOG_VERSION_NAMESPACE v2_mt_nt62
0341 # elif BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
0342 # define BOOST_LOG_VERSION_NAMESPACE v2_mt_nt6
0343 # else
0344 # define BOOST_LOG_VERSION_NAMESPACE v2_mt_nt5
0345 # endif
0346 # else
0347 # define BOOST_LOG_VERSION_NAMESPACE v2_mt
0348 # endif
0349 # endif
0350 # else
0351 # if defined(BOOST_LOG_NO_THREADS)
0352 # define BOOST_LOG_VERSION_NAMESPACE v2s_st
0353 # else
0354 # if defined(BOOST_THREAD_PLATFORM_PTHREAD)
0355 # define BOOST_LOG_VERSION_NAMESPACE v2s_mt_posix
0356 # elif defined(BOOST_THREAD_PLATFORM_WIN32)
0357 # if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN8
0358 # define BOOST_LOG_VERSION_NAMESPACE v2s_mt_nt62
0359 # elif BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
0360 # define BOOST_LOG_VERSION_NAMESPACE v2s_mt_nt6
0361 # else
0362 # define BOOST_LOG_VERSION_NAMESPACE v2s_mt_nt5
0363 # endif
0364 # else
0365 # define BOOST_LOG_VERSION_NAMESPACE v2s_mt
0366 # endif
0367 # endif
0368 # endif
0369
0370
0371 namespace log {
0372
0373 # if !defined(BOOST_NO_CXX11_INLINE_NAMESPACES)
0374
0375 inline namespace BOOST_LOG_VERSION_NAMESPACE {}
0376
0377 # define BOOST_LOG_OPEN_NAMESPACE namespace log { inline namespace BOOST_LOG_VERSION_NAMESPACE {
0378 # define BOOST_LOG_CLOSE_NAMESPACE }}
0379
0380 # elif defined(BOOST_GCC) && (BOOST_GCC >= 40400)
0381
0382
0383 __extension__ inline namespace BOOST_LOG_VERSION_NAMESPACE {}
0384
0385 # define BOOST_LOG_OPEN_NAMESPACE namespace log { __extension__ inline namespace BOOST_LOG_VERSION_NAMESPACE {
0386 # define BOOST_LOG_CLOSE_NAMESPACE }}
0387
0388 # else
0389
0390 namespace BOOST_LOG_VERSION_NAMESPACE {}
0391
0392 using namespace BOOST_LOG_VERSION_NAMESPACE
0393 # if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && !defined(__clang__)
0394 __attribute__((__strong__))
0395 # endif
0396 ;
0397
0398 # define BOOST_LOG_OPEN_NAMESPACE namespace log { namespace BOOST_LOG_VERSION_NAMESPACE {
0399 # define BOOST_LOG_CLOSE_NAMESPACE }}
0400 # endif
0401
0402 }
0403
0404 #else
0405
0406 namespace log {}
0407 # define BOOST_LOG_OPEN_NAMESPACE namespace log {
0408 # define BOOST_LOG_CLOSE_NAMESPACE }
0409
0410 #endif
0411
0412 #if defined(BOOST_LOG_HAS_PRAGMA_DETECT_MISMATCH)
0413 #pragma detect_mismatch("boost_log_abi", BOOST_STRINGIZE(BOOST_LOG_VERSION_NAMESPACE))
0414 #endif
0415
0416 }
0417
0418 #endif