summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/nowide/standalone/config.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/nowide/standalone/config.hpp')
-rw-r--r--src/boost/libs/nowide/standalone/config.hpp81
1 files changed, 81 insertions, 0 deletions
diff --git a/src/boost/libs/nowide/standalone/config.hpp b/src/boost/libs/nowide/standalone/config.hpp
new file mode 100644
index 000000000..8a07e20d4
--- /dev/null
+++ b/src/boost/libs/nowide/standalone/config.hpp
@@ -0,0 +1,81 @@
+//
+// Copyright (c) 2012 Artyom Beilis (Tonkikh)
+// Copyright (c) 2020 Alexander Grund
+//
+// 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 NOWIDE_CONFIG_HPP_INCLUDED
+#define NOWIDE_CONFIG_HPP_INCLUDED
+
+#include <boost/nowide/replacement.hpp>
+
+#if(defined(__WIN32) || defined(_WIN32) || defined(WIN32)) && !defined(__CYGWIN__)
+#define NOWIDE_WINDOWS
+#endif
+
+#ifdef _MSC_VER
+#define NOWIDE_MSVC _MSC_VER
+#endif
+
+#ifdef __GNUC__
+#define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
+#endif
+
+#ifndef BOOST_SYMBOL_VISIBLE
+#define BOOST_SYMBOL_VISIBLE
+#endif
+
+#ifdef NOWIDE_WINDOWS
+#define BOOST_SYMBOL_EXPORT __declspec(dllexport)
+#define BOOST_SYMBOL_IMPORT __declspec(dllimport)
+#else
+#define BOOST_SYMBOL_EXPORT BOOST_SYMBOL_VISIBLE
+#define BOOST_SYMBOL_IMPORT
+#endif
+
+#if defined(BOOST_NOWIDE_DYN_LINK)
+#ifdef BOOST_NOWIDE_SOURCE
+#define BOOST_NOWIDE_DECL BOOST_SYMBOL_EXPORT
+#else
+#define BOOST_NOWIDE_DECL BOOST_SYMBOL_IMPORT
+#endif // BOOST_NOWIDE_SOURCE
+#else
+#define BOOST_NOWIDE_DECL
+#endif // BOOST_NOWIDE_DYN_LINK
+
+#ifndef NOWIDE_DECL
+#define NOWIDE_DECL
+#endif
+
+#if defined(NOWIDE_WINDOWS)
+#ifdef BOOST_NOWIDE_USE_FILEBUF_REPLACEMENT
+#undef BOOST_NOWIDE_USE_FILEBUF_REPLACEMENT
+#endif
+#define BOOST_NOWIDE_USE_FILEBUF_REPLACEMENT 1
+#elif !defined(BOOST_NOWIDE_USE_FILEBUF_REPLACEMENT)
+#define BOOST_NOWIDE_USE_FILEBUF_REPLACEMENT 0
+#endif
+
+#if defined(__GNUC__) && __GNUC__ >= 7
+#define BOOST_NOWIDE_FALLTHROUGH __attribute__((fallthrough))
+#else
+#define BOOST_NOWIDE_FALLTHROUGH
+#endif
+
+// MSVC 2015 (1900) has reasonable C++11 support (especially auto-generated move ctors)
+#if __cplusplus >= 201103L || (defined(NOWIDE_MSVC) && NOWIDE_MSVC >= 1900)
+#define BOOST_NOWIDE_CXX11 1
+#else
+#define BOOST_NOWIDE_CXX11 0
+#endif
+
+#if !defined(BOOST_LIKELY)
+#define BOOST_LIKELY(x) x
+#endif
+#if !defined(BOOST_UNLIKELY)
+#define BOOST_UNLIKELY(x) x
+#endif
+
+#endif