2
0
mirror of https://github.com/boostorg/nowide.git synced 2026-02-22 03:22:32 +00:00

Remove some unnecessary define checks

This commit is contained in:
Flamefire
2019-11-25 13:23:50 +01:00
parent 1fc5a49e27
commit 14d9b27140
3 changed files with 27 additions and 24 deletions

View File

@@ -11,23 +11,15 @@
#include <boost/config.hpp>
#include <boost/nowide/replacement.hpp>
#ifndef BOOST_SYMBOL_VISIBLE
# define BOOST_SYMBOL_VISIBLE
#endif
#ifdef BOOST_HAS_DECLSPEC
# if defined(BOOST_ALL_DYN_LINK) || 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
# endif // DYN_LINK
#endif // BOOST_HAS_DECLSPEC
#ifndef BOOST_NOWIDE_DECL
# define BOOST_NOWIDE_DECL
#endif
#if defined(BOOST_ALL_DYN_LINK) || 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 // DYN_LINK
//
// Automatically link to the correct build variant where possible.

View File

@@ -14,6 +14,8 @@
#include <ostream>
#include <istream>
#include <boost/config/abi_prefix.hpp> // must be the last #include
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4251)
@@ -52,7 +54,6 @@ namespace nowide {
winconsole_istream();
~winconsole_istream();
private:
struct data;
boost::scoped_ptr<console_input_buffer> d;
};
} // details
@@ -93,6 +94,7 @@ namespace nowide {
# pragma warning(pop)
#endif
#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
#endif
///

View File

@@ -7,12 +7,21 @@
//
#define BOOST_NOWIDE_SOURCE
#include <boost/nowide/iostream.hpp>
#ifndef BOOST_WINDOWS
namespace boost {
namespace nowide {
BOOST_NOWIDE_DECL void dummy_exported_function(){}
}
}
#else
#include <boost/nowide/convert.hpp>
#include <cstring>
#include <vector>
#ifdef BOOST_WINDOWS
#ifndef NOMINMAX
# define NOMINMAX
#endif
@@ -237,10 +246,10 @@ namespace details {
} // details
BOOST_NOWIDE_DECL details::winconsole_istream cin;
BOOST_NOWIDE_DECL details::winconsole_ostream cout(1);
BOOST_NOWIDE_DECL details::winconsole_ostream cerr(2);
BOOST_NOWIDE_DECL details::winconsole_ostream clog(2);
details::winconsole_istream cin;
details::winconsole_ostream cout(1);
details::winconsole_ostream cerr(2);
details::winconsole_ostream clog(2);
namespace {
struct initialize {