commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 01/01: pmt: Fixing #if boost version checks


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/01: pmt: Fixing #if boost version checks in pmt_t.
Date: Wed, 7 Dec 2016 03:44:23 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit 5cab06fcd36e42631d94625eb3e737d94be7bdf4
Author: Darek Kawamoto <address@hidden>
Date:   Mon Dec 5 00:51:57 2016 -0500

    pmt: Fixing #if boost version checks in pmt_t.
---
 gnuradio-runtime/lib/pmt/pmt.cc    | 2 +-
 gnuradio-runtime/lib/pmt/pmt_int.h | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gnuradio-runtime/lib/pmt/pmt.cc b/gnuradio-runtime/lib/pmt/pmt.cc
index 204befe..3b92481 100644
--- a/gnuradio-runtime/lib/pmt/pmt.cc
+++ b/gnuradio-runtime/lib/pmt/pmt.cc
@@ -63,7 +63,7 @@ pmt_base::operator delete(void *p, size_t size)
 
 #endif
 
-#if ((BOOST_VER_MAJOR >= 1) && (BOOST_VER_MINOR >= 53))
+#if ((BOOST_VERSION / 100000 >= 1) && (BOOST_VERSION / 100 % 1000 >= 53)) 
 void intrusive_ptr_add_ref(pmt_base* p)
 {
   p->refcount_.fetch_add(1, boost::memory_order_relaxed);
diff --git a/gnuradio-runtime/lib/pmt/pmt_int.h 
b/gnuradio-runtime/lib/pmt/pmt_int.h
index de91d0e..da48a0d 100644
--- a/gnuradio-runtime/lib/pmt/pmt_int.h
+++ b/gnuradio-runtime/lib/pmt/pmt_int.h
@@ -24,7 +24,8 @@
 
 #include <pmt/pmt.h>
 #include <boost/utility.hpp>
-#if ((BOOST_VER_MAJOR >= 1) && (BOOST_VER_MINOR >= 53)) 
+#include <boost/version.hpp>
+#if ((BOOST_VERSION / 100000 >= 1) && (BOOST_VERSION / 100 % 1000 >= 53)) 
   #include <boost/atomic.hpp>
 #else
   // boost::atomic not available before 1.53
@@ -43,7 +44,7 @@ namespace pmt {
 
 class PMT_API pmt_base : boost::noncopyable {
 
-#if ((BOOST_VER_MAJOR >= 1) && (BOOST_VER_MINOR >= 53)) 
+#if ((BOOST_VERSION / 100000 >= 1) && (BOOST_VERSION / 100 % 1000 >= 53)) 
   mutable boost::atomic<int> refcount_;
 #else
   // boost::atomic not available before 1.53
@@ -52,7 +53,7 @@ class PMT_API pmt_base : boost::noncopyable {
 #endif
 
 protected:
-#if ((BOOST_VER_MAJOR >= 1) && (BOOST_VER_MINOR >= 53)) 
+#if ((BOOST_VERSION / 100000 >= 1) && (BOOST_VERSION / 100 % 1000 >= 53)) 
   pmt_base() : refcount_(0) {};
 #else
   // boost::atomic not available before 1.53



reply via email to

[Prev in Thread] Current Thread [Next in Thread]