updated boost on windows

This commit is contained in:
Bassem Girgis
2019-08-13 21:48:48 -05:00
parent 7d77d485fd
commit b40a3bee82
5162 changed files with 473027 additions and 116452 deletions

View File

@@ -309,8 +309,7 @@ namespace boost
t /= den;
if (t > duration_values<common_type_t>::zero())
{
Rep pt = t;
if ( (duration_values<Rep>::max)() < pt)
if ( (duration_values<Rep>::max)() < Rep(t))
{
// Conversion to Period overflowed
err |= std::ios_base::failbit;
@@ -318,8 +317,7 @@ namespace boost
}
}
// Success! Store it.
r = Rep(t);
d = duration<Rep, Period> (r);
d = duration<Rep, Period> (Rep(t));
return s;
}

View File

@@ -21,7 +21,7 @@
#include <boost/type_traits/is_integral.hpp>
#include <boost/type_traits/is_floating_point.hpp>
#include <locale>
#include <iostream>
#include <iosfwd>
#include <sstream>
namespace boost

View File

@@ -34,20 +34,22 @@
#include <locale>
#include <ctime>
#define BOOST_CHRONO_INTERNAL_TIMEGM \
( defined BOOST_WINDOWS && ! defined(__CYGWIN__) ) \
#if ( defined BOOST_WINDOWS && ! defined(__CYGWIN__) ) \
|| (defined(sun) || defined(__sun)) \
|| (defined __IBMCPP__) \
|| defined __ANDROID__ \
|| defined __QNXNTO__ \
|| (defined(_AIX) && defined __GNUC__)
#define BOOST_CHRONO_INTERNAL_TIMEGM
#endif
#define BOOST_CHRONO_INTERNAL_GMTIME \
(defined BOOST_WINDOWS && ! defined(__CYGWIN__)) \
#if (defined BOOST_WINDOWS && ! defined(__CYGWIN__)) \
|| ( (defined(sun) || defined(__sun)) && defined __GNUC__) \
|| (defined __IBMCPP__) \
|| defined __ANDROID__ \
|| (defined(_AIX) && defined __GNUC__)
#define BOOST_CHRONO_INTERNAL_GMTIME
#endif
#define BOOST_CHRONO_USES_INTERNAL_TIME_GET
@@ -746,7 +748,7 @@ namespace boost
namespace detail
{
//#if BOOST_CHRONO_INTERNAL_TIMEGM
//#if defined BOOST_CHRONO_INTERNAL_TIMEGM
inline int32_t is_leap(int32_t year)
{
@@ -765,7 +767,7 @@ namespace boost
}
inline int32_t days_from_1970(int32_t year)
{
static const int days_from_0_to_1970 = days_from_0(1970);
static const int32_t days_from_0_to_1970 = days_from_0(1970);
return days_from_0(year) - days_from_0_to_1970;
}
inline int32_t days_from_1jan(int32_t year,int32_t month,int32_t day)
@@ -938,18 +940,22 @@ namespace boost
if (tz == timezone::local)
{
#if defined BOOST_WINDOWS && ! defined(__CYGWIN__)
#if BOOST_MSVC < 1400 // localtime_s doesn't exist in vc7.1
std::tm *tmp = 0;
if ((tmp=localtime(&t)) == 0)
failed = true;
else
tm =*tmp;
# else
if (localtime_s(&tm, &t) != 0) failed = true;
# endif
#else
if (localtime_r(&t, &tm) == 0) failed = true;
#endif
}
else
{
#if BOOST_CHRONO_INTERNAL_GMTIME
#if defined BOOST_CHRONO_INTERNAL_GMTIME
if (detail::internal_gmtime(&t, &tm) == 0) failed = true;
#elif defined BOOST_WINDOWS && ! defined(__CYGWIN__)
@@ -1157,7 +1163,7 @@ namespace boost
if (err & std::ios_base::failbit) goto exit;
time_t t;
#if BOOST_CHRONO_INTERNAL_TIMEGM
#if defined BOOST_CHRONO_INTERNAL_TIMEGM
t = detail::internal_timegm(&tm);
#else
t = timegm(&tm);
@@ -1209,7 +1215,7 @@ namespace boost
time_t t;
if (tz == timezone::utc || fz != pe)
{
#if BOOST_CHRONO_INTERNAL_TIMEGM
#if defined BOOST_CHRONO_INTERNAL_TIMEGM
t = detail::internal_timegm(&tm);
#else
t = timegm(&tm);

View File

@@ -15,7 +15,7 @@
#include <boost/chrono/thread_clock.hpp>
#include <boost/chrono/io/ios_base_state.hpp>
#include <string>
#include <iostream>
#include <iosfwd>
#include <ios>
#include <locale>
#include <algorithm>