Boost 1.52 uses a completely different api for atomics. Not going to be supporting them. Also, fix llcalcparser in more old-boost compatible manner, and fix linux usage of apr_signal_description_get.
This commit is contained in:
@@ -66,6 +66,7 @@ bool windows_post_minidump_callback(const wchar_t* dump_path,
|
||||
#else
|
||||
# include <signal.h>
|
||||
# include <unistd.h> // for fork()
|
||||
# include "apr_signal.h" // for apr_signal_description_get(int signum)
|
||||
void setup_signals();
|
||||
void default_unix_signal_handler(int signum, siginfo_t *info, void *);
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
//Prefer boost over stl over apr.
|
||||
|
||||
#if defined(USE_BOOST_ATOMIC) && (BOOST_VERSION >= 105200)
|
||||
#if defined(USE_BOOST_ATOMIC) && (BOOST_VERSION >= 105300)
|
||||
#include "boost/atomic.hpp"
|
||||
template<typename T>
|
||||
struct impl_atomic_type { typedef boost::atomic<T> type; };
|
||||
|
||||
@@ -210,7 +210,6 @@ typedef CONDITION_VARIABLE impl_cond_handle_type;
|
||||
//----APR specific------
|
||||
#include "apr_thread_cond.h"
|
||||
#include "apr_thread_mutex.h"
|
||||
#include "apr_signal.h"
|
||||
typedef LLAPRPool native_pool_type;
|
||||
typedef apr_thread_mutex_t* impl_mutex_handle_type;
|
||||
typedef apr_thread_cond_t* impl_cond_handle_type;
|
||||
@@ -662,10 +661,10 @@ private:
|
||||
|
||||
// Simple responder for self destructing callbacks
|
||||
// Pure virtual class
|
||||
class LL_COMMON_API LLResponder : public LLThreadSafeRefCount
|
||||
class LLResponder : public LLThreadSafeRefCount
|
||||
{
|
||||
protected:
|
||||
virtual ~LLResponder();
|
||||
virtual ~LLResponder() {}
|
||||
public:
|
||||
virtual void completed(bool success) = 0;
|
||||
};
|
||||
|
||||
@@ -54,54 +54,39 @@ T max_glue(T a, T b)
|
||||
{
|
||||
return std::max(a, b);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
struct lazy_pow_
|
||||
{
|
||||
template<class> struct result;
|
||||
template<class F>
|
||||
struct result
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
T operator()(T x, T y) const
|
||||
{
|
||||
return std::pow(x, y);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
||||
template<typename RT>
|
||||
struct lazy_ufunc_
|
||||
{
|
||||
template<class> struct result;
|
||||
template<class F>
|
||||
struct result
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
typedef RT result_type;
|
||||
|
||||
T operator()(T(*fn)(T), T x) const
|
||||
template <typename F, typename A1>
|
||||
struct result { typedef RT type; };
|
||||
|
||||
template <typename F, typename A1>
|
||||
RT operator()(F f, A1 a1) const
|
||||
{
|
||||
return fn(x);
|
||||
return f(a1);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
template<typename RT>
|
||||
struct lazy_bfunc_
|
||||
{
|
||||
template<class> struct result;
|
||||
template<class F>
|
||||
struct result
|
||||
typedef F32 result_type;
|
||||
|
||||
template <typename F, typename A1, typename A2>
|
||||
struct result { typedef RT type; };
|
||||
|
||||
template <typename F, typename A1, typename A2>
|
||||
RT operator()(F f, A1 a1, A2 a2) const
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
double operator()(T(*fn)(T, T), T x, T y) const
|
||||
{
|
||||
return fn(x, y);
|
||||
return f(a1, a2);
|
||||
}
|
||||
};
|
||||
|
||||
//} // end namespace anonymous
|
||||
|
||||
template <typename FPT, typename Iterator>
|
||||
struct grammar
|
||||
: boost::spirit::qi::grammar<
|
||||
@@ -187,10 +172,9 @@ struct grammar
|
||||
using boost::spirit::qi::no_case;
|
||||
using boost::spirit::qi::_val;
|
||||
|
||||
boost::phoenix::function< lazy_pow_<FPT> > lazy_pow;
|
||||
boost::phoenix::function< lazy_ufunc_<FPT> > lazy_ufunc;
|
||||
boost::phoenix::function< lazy_bfunc_<FPT> > lazy_bfunc;
|
||||
|
||||
|
||||
expression =
|
||||
term [_val = _1]
|
||||
>> *( ('+' >> term [_val += _1])
|
||||
@@ -207,7 +191,7 @@ struct grammar
|
||||
|
||||
factor =
|
||||
primary [_val = _1]
|
||||
>> *( ("**" >> factor [_val = lazy_pow(_val, _1)])
|
||||
>> *( ("**" >> factor [_val = boost::phoenix::bind(static_cast<FPT (*)(FPT,FPT)>(&std::pow),_val,_1)])
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
@@ -2334,7 +2334,7 @@ void LLMeshRepository::notifyLoadedMeshes()
|
||||
//call completed callbacks on finished decompositions
|
||||
mDecompThread->notifyCompleted();
|
||||
|
||||
if (!mThread->mSignal->tryLock())
|
||||
if (!mThread->mSignal->try_lock())
|
||||
{ //curl thread is churning, wait for it to go idle
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user