add auto config of numeric conversions

auto config of numeric conversions for GCC/MinGW
add contributors info
This commit is contained in:
Jinhao
2015-03-13 14:24:24 +08:00
parent 3062f70d83
commit bc8a157971
8 changed files with 54 additions and 29 deletions

View File

@@ -1,7 +1,7 @@
/*
* Nana Configuration
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2014 Jinhao(cnjinhao@hotmail.com)
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
@@ -20,10 +20,13 @@
#define PLATFORM_SPEC_HPP <nana/detail/win32/platform_spec.hpp>
//Test if it is MINGW
#if defined(__MINGW32__)
#if defined(__MINGW32__) || defined(__MINGW64__)
#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
#if (__GNUC__ == 4) && ((__GNUC_MINOR__ < 8) || (__GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ < 1))
//Use this flag if MinGW version is older than 4.8.1
#define STD_THREAD_NOT_SUPPORTED
#endif
#endif
#elif (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC)
//Linux:
@@ -33,6 +36,13 @@
#define STD_CODECVT_NOT_SUPPORTED
#endif
#if defined(NANA_MINGW) || defined(NANA_LINUX)
#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) && (__GNUC_PATCHLEVEL__ <= 1)
//Some functions which are specified in 21.5 Numeric conversions in Strings library have not yet implemented
#define STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED
#endif
#endif
//Here defines some flags that tell Nana what features will be supported.
#define NANA_UNICODE

View File

@@ -21,8 +21,8 @@
#undef NANA_WINDOWS
#endif
//Implement workarounds for MinGW
#if defined(NANA_MINGW)
//Implement workarounds for GCC/MinGW which version is below 4.8.2
#if defined(STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED)
namespace std
{
//Workaround for no implemenation of std::stoi in MinGW.

View File

@@ -1,3 +1,15 @@
/*
* Bitmap Format Graphics Implementation
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
*
* 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)
*
* @file: nana/paint/detail/image_bmp.hpp
* @contributors: Ryan Gonzalez
*/
#ifndef NANA_PAINT_DETAIL_IMAGE_BMP_HPP
#define NANA_PAINT_DETAIL_IMAGE_BMP_HPP