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.
This commit is contained in:
parent
e86e3c9db2
commit
f68c4dd925
69
boost-1.48.0-xtime.patch
Normal file
69
boost-1.48.0-xtime.patch
Normal file
@ -0,0 +1,69 @@
|
||||
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;
|
10
boost.spec
10
boost.spec
@ -144,6 +144,10 @@ Patch12: boost-1.48.0-polygon.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=807780
|
||||
Patch13: boost-1.48.0-python3.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=824810
|
||||
# https://svn.boost.org/trac/boost/ticket/6940
|
||||
Patch14: boost-1.48.0-xtime.patch
|
||||
|
||||
%bcond_with tests
|
||||
%bcond_with docs_generated
|
||||
|
||||
@ -531,6 +535,7 @@ sed 's/_FEDORA_SONAME/%{sonamever}/' %{PATCH1} | %{__patch} -p0 --fuzz=0
|
||||
%patch11 -p1
|
||||
%patch12 -p3
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
|
||||
%build
|
||||
# Support for building tests.
|
||||
@ -1072,6 +1077,11 @@ rm -rf $RPM_BUILD_ROOT
|
||||
* Thu May 24 2012 Petr Machata <pmachata@redhat.com> - 1.48.0-14
|
||||
- Don't attempt to install Python 3 portions of boost when given
|
||||
--without python3
|
||||
- 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.
|
||||
- Resolves: #824810
|
||||
- BR on hwloc-devel shouldn't be required anymore (see #814798)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user