eliminate macro redefine error when used in biicode

This commit is contained in:
qqiangwu
2015-04-12 11:40:58 +08:00
parent 9c3f53eab8
commit 79ec3c927d
7 changed files with 101 additions and 95 deletions

View File

@@ -23,7 +23,6 @@
#if defined(__MINGW32__)
#define NANA_MINGW
#define STD_CODECVT_NOT_SUPPORTED
//#define STD_THREAD_NOT_SUPPORTED //Use this flag if MinGW version is older than 4.8.1
#endif
#elif (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC)
//Linux:
@@ -31,13 +30,29 @@
#define NANA_X11 1
#define PLATFORM_SPEC_HPP <nana/detail/linux_X11/platform_spec.hpp>
#define STD_CODECVT_NOT_SUPPORTED
#else
# error "Only Windows and Unix are support now"
#endif
// C++11 detection
#if defined(__GNUC_MINOR__)
# if __GNUC_MINOR__ < 8
# define NANA_NO_CPP11
# endif
#elif _MSC_VER < 1700
# define NANA_NO_CPP11
#endif
#if defined(NANA_NO_CPP11)
# define STD_THREAD_NOT_SUPPORTED
#endif
//Here defines some flags that tell Nana what features will be supported.
#define NANA_UNICODE
#define NANA_ENABLE_PNG
#define NANA_UNICODE // always use unicode, don't make users confusing!
#if defined(NANA_UNICODE) && defined(NANA_WINDOWS)
#if defined(NANA_WINDOWS)
#ifndef _UNICODE
#define _UNICODE
#endif
@@ -47,13 +62,4 @@
#endif
#endif
//Support for PNG
// Comment it to disable the feature of support for PNG.
//#define NANA_ENABLE_PNG
#if defined(NANA_ENABLE_PNG)
//Comment it to use libpng from operating system.
#define NANA_LIBPNG
#endif
#endif //NANA_CONFIG_HPP

View File

@@ -24,7 +24,7 @@
#endif
//Implement workarounds for MinGW
#if defined(NANA_MINGW) && __GNUC_MINOR__ < 8
#if NANA_NO_CPP11
namespace std
{
//Workaround for no implemenation of std::stoi in MinGW.

View File

@@ -2,7 +2,7 @@
#define NANA_STD_CONDITION_VARIABLE_HPP
#include <nana/config.hpp>
#if defined(STD_THREAD_NOT_SUPPORTED) && !defined(NANA_MINGW) || __GNUC_MINOR__ < 8
#if NANA_NO_CPP11
#include <boost/thread/condition_variable.hpp>
namespace std

View File

@@ -2,7 +2,7 @@
#define NANA_STD_MUTEX_HPP
#include <nana/config.hpp>
#if defined(STD_THREAD_NOT_SUPPORTED) && !defined(NANA_MINGW) || __GNUC_MINOR__ < 8
#if NANA_NO_CPP11
#include <boost/thread/mutex.hpp>
#include <boost/thread/recursive_mutex.hpp>

View File

@@ -2,7 +2,7 @@
#define NANA_STD_THREAD_HPP
#include <nana/config.hpp>
#if defined(STD_THREAD_NOT_SUPPORTED) && !defined(NANA_MINGW) || __GNUC_MINOR__ < 8
#if NANA_NO_CPP11
#include <boost/thread.hpp>
namespace std
{