Changeset View
Changeset View
Standalone View
Standalone View
src/compat.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_COMPAT_H | #ifndef BITCOIN_COMPAT_H | ||||
#define BITCOIN_COMPAT_H | #define BITCOIN_COMPAT_H | ||||
#if defined(HAVE_CONFIG_H) | #if defined(HAVE_CONFIG_H) | ||||
#include "config/bitcoin-config.h" | #include "config/bitcoin-config.h" | ||||
#endif | #endif | ||||
#include <type_traits> | |||||
// GCC 4.8 is missing some C++11 type_traits, | |||||
// https://www.gnu.org/software/gcc/gcc-5/changes.html | |||||
#if defined(__GNUC__) && __GNUC__ < 5 | |||||
#define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivial | |||||
#else | |||||
#define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivially_constructible | |||||
#endif | |||||
#ifdef WIN32 | #ifdef WIN32 | ||||
#ifdef _WIN32_WINNT | #ifdef _WIN32_WINNT | ||||
#undef _WIN32_WINNT | #undef _WIN32_WINNT | ||||
#endif | #endif | ||||
#define _WIN32_WINNT 0x0501 | #define _WIN32_WINNT 0x0501 | ||||
#ifndef WIN32_LEAN_AND_MEAN | #ifndef WIN32_LEAN_AND_MEAN | ||||
#define WIN32_LEAN_AND_MEAN 1 | #define WIN32_LEAN_AND_MEAN 1 | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines |