boost/boost-1.48.0-xtime.patch
Petr Machata f68c4dd925 Drop enum xtime_clock_types, update uses of boost::TIME_UTC
glibc newly defines a macro TIME_UTC, which collides with boost::TIME_UTC.
We can't avoid expanding that macro, but the value happens to be the same
as that of boost::TIME_UTC.  So drop enum xtime_clock_types.  Update boost
to use macro TIME_UTC instead of the scoped enum value.  External clients
will have to do the same.
2012-05-24 23:21:25 +02:00

70 lines
2.2 KiB
Diff

diff -up boost_1_48_0/boost/thread/xtime.hpp\~ boost_1_48_0/boost/thread/xtime.hpp
--- boost_1_48_0/boost/thread/xtime.hpp~ 2008-06-18 15:01:08.000000000 +0200
+++ boost_1_48_0/boost/thread/xtime.hpp 2012-05-24 20:45:18.000000000 +0200
@@ -18,18 +18,6 @@
namespace boost {
-enum xtime_clock_types
-{
- TIME_UTC=1
-// TIME_TAI,
-// TIME_MONOTONIC,
-// TIME_PROCESS,
-// TIME_THREAD,
-// TIME_LOCAL,
-// TIME_SYNC,
-// TIME_RESOLUTION
-};
-
struct xtime
{
#if defined(BOOST_NO_INT64_T)
diff -up boost_1_48_0/libs/thread/src/pthread/timeconv.inl\~ boost_1_48_0/libs/thread/src/pthread/timeconv.inl
--- boost_1_48_0/libs/thread/src/pthread/timeconv.inl~ 2010-04-01 17:04:15.000000000 +0200
+++ boost_1_48_0/libs/thread/src/pthread/timeconv.inl 2012-05-24 20:55:43.000000000 +0200
@@ -20,8 +20,8 @@ const int NANOSECONDS_PER_MICROSECOND =
inline void to_time(int milliseconds, boost::xtime& xt)
{
int res = 0;
- res = boost::xtime_get(&xt, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC);
+ res = boost::xtime_get(&xt, TIME_UTC);
+ BOOST_ASSERT(res == TIME_UTC);
xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
@@ -57,8 +57,8 @@ inline void to_timespec_duration(const b
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, TIME_UTC);
+ BOOST_ASSERT(res == TIME_UTC);
if (boost::xtime_cmp(xt, cur) <= 0)
{
@@ -88,8 +88,8 @@ inline void to_duration(boost::xtime xt,
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, TIME_UTC);
+ BOOST_ASSERT(res == TIME_UTC);
if (boost::xtime_cmp(xt, cur) <= 0)
milliseconds = 0;
@@ -110,8 +110,8 @@ inline void to_microduration(boost::xtim
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, TIME_UTC);
+ BOOST_ASSERT(res == TIME_UTC);
if (boost::xtime_cmp(xt, cur) <= 0)
microseconds = 0;