Go to the SVN repository for this file.
1 #ifndef COMMON___NCBICONF_IMPL__H 2 #define COMMON___NCBICONF_IMPL__H 40 #ifndef FORWARDING_NCBICONF_H 41 # error "The header can be used from <ncbiconf.h> only." 52 #if defined(NCBI_COMPILER_APPLE_CLANG) || defined(NCBI_COMPILER_LLVM_CLANG) 53 # define NCBI_COMPILER_ANY_CLANG 1 59 #undef NCBI_NO_THREADS 61 #undef NCBI_POSIX_THREADS 62 #undef NCBI_WIN32_THREADS 64 #if defined(_MT) && !defined(NCBI_WITHOUT_MT) 65 # if defined(NCBI_OS_MSWIN) 66 # define NCBI_WIN32_THREADS 67 # elif defined(NCBI_OS_UNIX) 68 # define NCBI_POSIX_THREADS 70 # define NCBI_NO_THREADS 73 # define NCBI_NO_THREADS 76 #if !defined(NCBI_NO_THREADS) 83 #if defined(UNICODE) && !defined(_UNICODE) 85 #elif defined(_UNICODE) && !defined(UNICODE) 99 #if defined(__cplusplus) && defined(__has_cpp_attribute) 100 # define NCBI_HAS_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) 102 # define NCBI_HAS_CPP_ATTRIBUTE(x) 0 106 #if !defined(__cplusplus) && defined(__has_c_attribute) 107 # define NCBI_HAS_C_ATTRIBUTE(x) __has_c_attribute(x) 109 # define NCBI_HAS_C_ATTRIBUTE(x) 0 112 #if defined(NCBI_COMPILER_MSVC) || defined(__clang__) 113 # define NCBI_HAS_SCOPED_C_ATTRIBUTE(x) 0 115 # define NCBI_HAS_SCOPED_C_ATTRIBUTE(x) NCBI_HAS_C_ATTRIBUTE(x) 119 # define NCBI_HAS_SCOPED_ATTRIBUTE(x) NCBI_HAS_CPP_ATTRIBUTE(x) 121 # define NCBI_HAS_SCOPED_ATTRIBUTE(x) NCBI_HAS_SCOPED_C_ATTRIBUTE(x) 126 # define NCBI_HAS_ATTRIBUTE(x) NCBI_HAS_CPP_ATTRIBUTE(x) 128 # define NCBI_HAS_ATTRIBUTE(x) NCBI_HAS_C_ATTRIBUTE(x) 137 # define NCBI_HAS_STD_ATTRIBUTE(x) \ 138 (NCBI_HAS_CPP_ATTRIBUTE(x) >= 200809L \ 139 && NCBI_HAS_CPP_ATTRIBUTE(x) <= __cplusplus) 141 # define NCBI_HAS_STD_ATTRIBUTE(x) (NCBI_HAS_CPP_ATTRIBUTE(x) >= 200809L) 145 # define NCBI_HAS_STD_ATTRIBUTE(x) \ 146 (NCBI_HAS_C_ATTRIBUTE(x) >= 201904L \ 147 && NCBI_HAS_C_ATTRIBUTE(x) <= __STDC_VERSION__) 149 # define NCBI_HAS_STD_ATTRIBUTE(x) (NCBI_HAS_C_ATTRIBUTE(x) >= 201904L) 154 #ifndef __has_attribute 155 # define __has_attribute(x) 0 158 #if defined(__cplusplus) && defined(NCBI_RESTRICT_CXX) 159 # define NCBI_RESTRICT NCBI_RESTRICT_CXX 160 #elif !defined(__cplusplus) && defined(NCBI_RESTRICT_C) 161 # define NCBI_RESTRICT NCBI_RESTRICT_C 162 #elif __STDC_VERSION__ >= 199901 163 # define NCBI_RESTRICT restrict 165 # define NCBI_RESTRICT 168 #ifdef NCBI_DEPRECATED 169 # undef NCBI_DEPRECATED 174 #if __has_attribute(deprecated) 175 # define NCBI_LEGACY_DEPRECATED_0 __attribute__((deprecated)) 176 # define NCBI_LEGACY_DEPRECATED_1(msg) __attribute__((deprecated(msg))) 177 #elif defined(NCBI_COMPILER_MSVC) 178 # define NCBI_LEGACY_DEPRECATED_0 __declspec(deprecated) 179 # define NCBI_LEGACY_DEPRECATED_1(msg) __declspec(deprecated(msg)) 181 # define NCBI_LEGACY_DEPRECATED_0 182 # define NCBI_LEGACY_DEPRECATED_1(msg) 184 #if NCBI_HAS_STD_ATTRIBUTE(deprecated) || \ 185 (defined(__cplusplus) && defined(NCBI_COMPILER_MSVC)) 186 # define NCBI_STD_DEPRECATED_0 [[deprecated]] 187 # define NCBI_STD_DEPRECATED_1(message) [[deprecated(message)]] 189 # define NCBI_STD_DEPRECATED_0 NCBI_LEGACY_DEPRECATED_0 190 # define NCBI_STD_DEPRECATED_1(message) NCBI_LEGACY_DEPRECATED_1(message) 192 #if !defined(NCBI_COMPILER_GCC) || NCBI_COMPILER_VERSION >= 600 193 # define NCBI_STD_DEPRECATED(message) NCBI_STD_DEPRECATED_1(message) 195 # define NCBI_STD_DEPRECATED(message) 198 # define NCBI_DEPRECATED NCBI_STD_DEPRECATED_0 200 # define NCBI_DEPRECATED NCBI_LEGACY_DEPRECATED_0 206 # undef NCBI_DEPRECATED 207 # define NCBI_DEPRECATED __attribute__((deprecated)) 208 # undef NCBI_STD_DEPRECATED 209 # if NCBI_HAS_STD_ATTRIBUTE(deprecated) 210 # define NCBI_STD_DEPRECATED(message) [[deprecated(message)]] 212 # define NCBI_STD_DEPRECATED(message) __attribute__((deprecated(message))) 216 #ifdef NCBI_COMPILER_MSVC 217 # define NCBI_SUSPEND_DEPRECATION_WARNINGS \ 218 _Pragma("warning(push)") _Pragma("warning(disable : 4996)")
219 # define NCBI_RESUME_DEPRECATION_WARNINGS _Pragma("warning(pop)")
220 # define NCBI_COARSE_DEPRECATION_WARNING_GRANULARITY 1 221 #elif defined(NCBI_COMPILER_ICC) && !defined(__clang__) 222 # define NCBI_SUSPEND_DEPRECATION_WARNINGS \ 223 _Pragma("warning(push)") _Pragma("warning(disable : 1478)")
224 # define NCBI_RESUME_DEPRECATION_WARNINGS _Pragma("warning(pop)")
225 #elif defined(NCBI_COMPILER_GCC) || defined(NCBI_COMPILER_ICC) \ 226 || defined(NCBI_COMPILER_ANY_CLANG) 227 # define NCBI_SUSPEND_DEPRECATION_WARNINGS \ 228 _Pragma("GCC diagnostic push") \
229_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
230 # define NCBI_RESUME_DEPRECATION_WARNINGS _Pragma("GCC diagnostic pop")
232 # define NCBI_SUSPEND_DEPRECATION_WARNINGS 233 # define NCBI_RESUME_DEPRECATION_WARNINGS 236 #ifndef NCBI_FORCEINLINE 238 # define NCBI_FORCEINLINE inline 240 # define NCBI_FORCEINLINE 244 #ifdef HAVE_ATTRIBUTE_DESTRUCTOR 245 # undef HAVE_ATTRIBUTE_DESTRUCTOR 247 #if __has_attribute(destructor) 248 # define HAVE_ATTRIBUTE_DESTRUCTOR 1 251 #ifndef NCBI_NORETURN 252 # if NCBI_HAS_STD_ATTRIBUTE(noreturn) 253 # define NCBI_NORETURN [[noreturn]] 254 # elif __has_attribute(noreturn) 255 # define NCBI_NORETURN __attribute__((__noreturn__)) 256 # elif defined(NCBI_COMPILER_MSVC) 257 # define NCBI_NORETURN __declspec(noreturn) 259 # define NCBI_NORETURN 263 #ifdef NCBI_WARN_UNUSED_RESULT 264 # undef NCBI_WARN_UNUSED_RESULT 266 #if NCBI_HAS_STD_ATTRIBUTE(nodiscard) 267 # define NCBI_WARN_UNUSED_RESULT [[nodiscard]] 268 #elif NCBI_HAS_SCOPED_ATTRIBUTE(gnu::warn_unused_result) 269 # define NCBI_WARN_UNUSED_RESULT [[gnu::warn_unused_result]] 270 #elif NCBI_HAS_SCOPED_ATTRIBUTE(clang::warn_unused_result) 271 # define NCBI_WARN_UNUSED_RESULT [[clang::warn_unused_result]] 272 #elif __has_attribute(warn_unused_result) 273 # define NCBI_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) 274 #elif defined(NCBI_COMPILER_MSVC) 275 # define NCBI_WARN_UNUSED_RESULT _Check_return_ 277 # define NCBI_WARN_UNUSED_RESULT 280 #if NCBI_HAS_STD_ATTRIBUTE(fallthrough) 281 # define NCBI_FALLTHROUGH [[fallthrough]] 282 #elif NCBI_HAS_SCOPED_ATTRIBUTE(gnu::fallthrough) 283 # define NCBI_FALLTHROUGH [[gnu::fallthrough]] 284 #elif NCBI_HAS_SCOPED_ATTRIBUTE(clang::fallthrough) 285 # define NCBI_FALLTHROUGH [[clang::fallthrough]] 286 #elif __has_attribute(fallthrough) 287 # define NCBI_FALLTHROUGH __attribute__ ((fallthrough)) 289 # define NCBI_FALLTHROUGH 296 # define NCBI_PACKED [[packed]] 297 #elif NCBI_HAS_SCOPED_ATTRIBUTE(gnu::packed) 298 # define NCBI_PACKED [[gnu::packed]] 299 #elif __has_attribute(packed) 300 # define NCBI_PACKED __attribute__((packed)) 307 #ifndef NCBI_PACKED_ENUM_TYPE 308 # define NCBI_PACKED_ENUM_TYPE(type) : type 310 #ifndef NCBI_PACKED_ENUM_END 311 # define NCBI_PACKED_ENUM_END() 315 # if NCBI_HAS_STD_ATTRIBUTE(maybe_unused) 316 # define NCBI_UNUSED [[maybe_unused]] 317 # elif NCBI_HAS_SCOPED_ATTRIBUTE(gnu::unused) 318 # define NCBI_UNUSED [[gnu::unused]] 319 # elif __has_attribute(unused) 320 # define NCBI_UNUSED __attribute__((unused)) 326 #if defined(__SSE4_2__) || defined(__AVX__) 328 #elif defined(__SSE4_1__) 330 #elif defined(__SSSE3__) 332 #elif defined(__SSE3__) 334 #elif defined(__SSE2__) || defined(_M_AMD64) || defined(_M_X64) \ 335 || (defined(_M_IX86_FP) && _M_IX86_FP >= 2) 337 #elif defined(__SSE__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1) 342 # define NCBI_HAVE_CXX11 1 343 # define HAVE_IS_SORTED 1 344 # define HAVE_NULLPTR 1 345 # define HAVE_ENUM_CLASS 1 347 # if defined(NCBI_COMPILER_MSVC) && defined(_MSVC_LANG) 348 # if (_MSVC_LANG >= 201700) 349 # define NCBI_HAVE_CXX17 1 352 # if (__cplusplus >= 201700) 353 # define NCBI_HAVE_CXX17 1 367 #if (defined(_MSC_VER) && _MSC_VER >= 1914) || \ 368 (defined(NCBI_COMPILER_GCC) && NCBI_COMPILER_VERSION >= 730) 369 # define HAVE_THREAD_LOCAL 1Implementation header to catch build setups that mix incompatible C and C++ Toolkit installations.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4