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
|
#else
|
||||||
# include <signal.h>
|
# include <signal.h>
|
||||||
# include <unistd.h> // for fork()
|
# include <unistd.h> // for fork()
|
||||||
|
# include "apr_signal.h" // for apr_signal_description_get(int signum)
|
||||||
void setup_signals();
|
void setup_signals();
|
||||||
void default_unix_signal_handler(int signum, siginfo_t *info, void *);
|
void default_unix_signal_handler(int signum, siginfo_t *info, void *);
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
//Prefer boost over stl over apr.
|
//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"
|
#include "boost/atomic.hpp"
|
||||||
template<typename T>
|
template<typename T>
|
||||||
struct impl_atomic_type { typedef boost::atomic<T> type; };
|
struct impl_atomic_type { typedef boost::atomic<T> type; };
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ typedef CONDITION_VARIABLE impl_cond_handle_type;
|
|||||||
//----APR specific------
|
//----APR specific------
|
||||||
#include "apr_thread_cond.h"
|
#include "apr_thread_cond.h"
|
||||||
#include "apr_thread_mutex.h"
|
#include "apr_thread_mutex.h"
|
||||||
#include "apr_signal.h"
|
|
||||||
typedef LLAPRPool native_pool_type;
|
typedef LLAPRPool native_pool_type;
|
||||||
typedef apr_thread_mutex_t* impl_mutex_handle_type;
|
typedef apr_thread_mutex_t* impl_mutex_handle_type;
|
||||||
typedef apr_thread_cond_t* impl_cond_handle_type;
|
typedef apr_thread_cond_t* impl_cond_handle_type;
|
||||||
@@ -662,10 +661,10 @@ private:
|
|||||||
|
|
||||||
// Simple responder for self destructing callbacks
|
// Simple responder for self destructing callbacks
|
||||||
// Pure virtual class
|
// Pure virtual class
|
||||||
class LL_COMMON_API LLResponder : public LLThreadSafeRefCount
|
class LLResponder : public LLThreadSafeRefCount
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual ~LLResponder();
|
virtual ~LLResponder() {}
|
||||||
public:
|
public:
|
||||||
virtual void completed(bool success) = 0;
|
virtual void completed(bool success) = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -55,53 +55,38 @@ T max_glue(T a, T b)
|
|||||||
return std::max(a, b);
|
return std::max(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template<typename RT>
|
||||||
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>
|
|
||||||
struct lazy_ufunc_
|
struct lazy_ufunc_
|
||||||
{
|
{
|
||||||
template<class> struct result;
|
typedef RT result_type;
|
||||||
template<class F>
|
|
||||||
struct result
|
|
||||||
{
|
|
||||||
typedef T 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_
|
struct lazy_bfunc_
|
||||||
{
|
{
|
||||||
template<class> struct result;
|
typedef F32 result_type;
|
||||||
template<class F>
|
|
||||||
struct result
|
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;
|
return f(a1, a2);
|
||||||
};
|
|
||||||
double operator()(T(*fn)(T, T), T x, T y) const
|
|
||||||
{
|
|
||||||
return fn(x, y);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//} // end namespace anonymous
|
||||||
|
|
||||||
template <typename FPT, typename Iterator>
|
template <typename FPT, typename Iterator>
|
||||||
struct grammar
|
struct grammar
|
||||||
: boost::spirit::qi::grammar<
|
: boost::spirit::qi::grammar<
|
||||||
@@ -187,7 +172,6 @@ struct grammar
|
|||||||
using boost::spirit::qi::no_case;
|
using boost::spirit::qi::no_case;
|
||||||
using boost::spirit::qi::_val;
|
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_ufunc_<FPT> > lazy_ufunc;
|
||||||
boost::phoenix::function< lazy_bfunc_<FPT> > lazy_bfunc;
|
boost::phoenix::function< lazy_bfunc_<FPT> > lazy_bfunc;
|
||||||
|
|
||||||
@@ -207,7 +191,7 @@ struct grammar
|
|||||||
|
|
||||||
factor =
|
factor =
|
||||||
primary [_val = _1]
|
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
|
//call completed callbacks on finished decompositions
|
||||||
mDecompThread->notifyCompleted();
|
mDecompThread->notifyCompleted();
|
||||||
|
|
||||||
if (!mThread->mSignal->tryLock())
|
if (!mThread->mSignal->try_lock())
|
||||||
{ //curl thread is churning, wait for it to go idle
|
{ //curl thread is churning, wait for it to go idle
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user