From b961ff51d7e42c116cdba9d68c805050d10eedee Mon Sep 17 00:00:00 2001 From: Jinhao Date: Thu, 21 Jan 2016 00:30:08 +0800 Subject: [PATCH] modify some symbols in config.hpp --- include/nana/c++defines.hpp | 9 --------- include/nana/config.hpp | 8 ++++++++ include/nana/std_condition_variable.hpp | 4 ++-- include/nana/std_mutex.hpp | 4 ++-- include/nana/std_thread.hpp | 4 ++-- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/include/nana/c++defines.hpp b/include/nana/c++defines.hpp index 6f6417ef..8af6ae5a 100644 --- a/include/nana/c++defines.hpp +++ b/include/nana/c++defines.hpp @@ -32,7 +32,6 @@ * - STD_CODECVT_NOT_SUPPORTED (VC RC, is a known issue on libstdc++, it works on libc++) * - STD_THREAD_NOT_SUPPORTED (GCC < 4.8.1) * - STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED (MinGW with GCC < 4.8.1) - * - USE_github_com_meganz_mingw_std_threads (MinGW with GCC < 4.8.1) * - STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED (MinGW with GCC < 4.8.1) * - STD_TO_STRING_NOT_SUPPORTED (MinGW with GCC < 4.8) * - VERBOSE_PREPROCESSOR, STOP_VERBOSE_PREPROCESSOR @@ -123,14 +122,6 @@ #if (__GNUC__ == 4) #if ((__GNUC_MINOR__ < 8) || (__GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ < 1)) #define STD_THREAD_NOT_SUPPORTED - - //boost.thread is preferred - //but if USE_github_com_meganz_mingw_std_threads is enabled, - //boost.thread will be replaced with meganz's mingw-std-threads. - // https://github.com/meganz/mingw-std-threads - #if !defined( USE_github_com_meganz_mingw_std_threads ) - //#define USE_github_com_meganz_mingw_std_threads - #endif #endif #if (__GNUC_MINOR__ < 9) diff --git a/include/nana/config.hpp b/include/nana/config.hpp index 28adebf4..1e6b7db7 100644 --- a/include/nana/config.hpp +++ b/include/nana/config.hpp @@ -23,6 +23,14 @@ // Here defines some flags that tell Nana what features will be supported. + +//Support of std::thread +//Boost.Thread is preferred. +//NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ is only available on MinGW when STD_THREAD_NOT_SUPPORTED is defined. +//if NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ is enabled, Boost.Thread will be replaced with meganz's mingw-std-threads. +//https://github.com/meganz/mingw-std-threads +//#define NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ + /////////////////// //Support for PNG // Define the NANA_ENABLE_PNG to enable the support of PNG. diff --git a/include/nana/std_condition_variable.hpp b/include/nana/std_condition_variable.hpp index 0c9813fc..5e202d9b 100644 --- a/include/nana/std_condition_variable.hpp +++ b/include/nana/std_condition_variable.hpp @@ -3,7 +3,7 @@ #include #if defined(STD_THREAD_NOT_SUPPORTED) -#if defined(USE_github_com_meganz_mingw_std_threads) +#if defined(NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ) #include #else #include @@ -11,6 +11,6 @@ namespace std { typedef boost::condition_variable condition_variable; } -#endif // (USE_github_com_meganz_mingw_std_threads) +#endif // (NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ) #endif // (STD_THREAD_NOT_SUPPORTED) #endif // NANA_STD_CONDITION_VARIABLE_HPP diff --git a/include/nana/std_mutex.hpp b/include/nana/std_mutex.hpp index 5eb6528a..b508548e 100644 --- a/include/nana/std_mutex.hpp +++ b/include/nana/std_mutex.hpp @@ -4,7 +4,7 @@ #if defined(STD_THREAD_NOT_SUPPORTED) -#if defined(USE_github_com_meganz_mingw_std_threads) +#if defined(NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ) #include #include #include @@ -32,6 +32,6 @@ namespace std typedef boost::mutex mutex; typedef boost::recursive_mutex recursive_mutex; } -#endif // (USE_github_com_meganz_mingw_std_threads) +#endif // (NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ) #endif // (STD_THREAD_NOT_SUPPORTED) #endif // NANA_STD_MUTEX_HPP diff --git a/include/nana/std_thread.hpp b/include/nana/std_thread.hpp index 321b3728..f3cf4bc0 100644 --- a/include/nana/std_thread.hpp +++ b/include/nana/std_thread.hpp @@ -4,7 +4,7 @@ #if defined(STD_THREAD_NOT_SUPPORTED) -#if defined(USE_github_com_meganz_mingw_std_threads) +#if defined(NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ) #include #else #include @@ -12,6 +12,6 @@ namespace std { typedef boost::thread thread; } -#endif // (USE_github_com_meganz_mingw_std_threads) +#endif // (NANA_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ) #endif // (STD_THREAD_NOT_SUPPORTED) #endif // NANA_STD_THREAD_HPP