fix issues that nuwen/TDM MinGW distro

This commit is contained in:
Jinhao
2017-07-08 04:22:26 +08:00
parent 50db6f81f0
commit d4fb5a226f
2 changed files with 18 additions and 27 deletions

View File

@@ -15,6 +15,8 @@
//Implement workarounds for GCC/MinGW which version is below 4.8.2
#if defined(STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED)
#include <sstream>
#include <cstdlib>
#include <stdexcept>
namespace std
{
int stoi(const std::string& str, std::size_t * pos, int base)
@@ -449,14 +451,14 @@ namespace std
//{
// unsigned sz = 200;
// std::wstring str(sz, L'\0');
// sz = std::wcsftime(&str[0], str.size() - 1, fmt, tmb);
// sz = std::wcsftime(&str[0], str.size() - 1, fmt, tmb);
// str.resize(sz);
// return str;
//}
// http://en.cppreference.com/w/cpp/chrono/c/wcsftime
// Defined in header <cwchar>
// std::size_t wcsftime(wchar_t* str, std::size_t count, const wchar_t* format, const std::tm* time);
// Converts the date and time information from a given calendar time time to a null - terminated
// Converts the date and time information from a given calendar time time to a null - terminated
// wide character string str according to format string format.Up to count bytes are written.
// Parameters
// str - pointer to the first element of the wchar_t array for output
@@ -464,4 +466,4 @@ namespace std
// format - pointer to a null - terminated wide character string specifying the format of conversion.
}
#endif // _enable_std_put_time
#endif // _enable_std_put_time