Updated Boost headers

This commit is contained in:
pelya
2011-06-07 13:24:38 +03:00
parent 0970661c21
commit b8e71daa73
5 changed files with 11 additions and 34 deletions

View File

@@ -1,33 +0,0 @@
diff --git a/boost/config/user.hpp b/boost/config/user.hpp
index 5a4a9d4..cc268fe 100644
--- a/boost/config/user.hpp
+++ b/boost/config/user.hpp
@@ -13,6 +13,15 @@
// configuration policy:
//
+// Android defines
+#define BOOST_THREAD_LINUX 1
+#define BOOST_HAS_PTHREADS 1
+#define __arm__ 1
+#define _REENTRANT 1
+#define _GLIBCXX__PTHREADS 1
+#define BOOST_HAS_GETTIMEOFDAY 1
+#define BOOST_HAS_UNISTD_H 1
+
// define this to locate a compiler config file:
// #define BOOST_COMPILER_CONFIG <myheader>
diff --git a/boost/interprocess/detail/workaround.hpp b/boost/interprocess/detail/workaround.hpp
index cb3d4a5..221967f 100644
--- a/boost/interprocess/detail/workaround.hpp
+++ b/boost/interprocess/detail/workaround.hpp
@@ -64,7 +64,7 @@
#endif
//Check for XSI shared memory objects. They are available in nearly all UNIX platforms
- #if !defined(__QNXNTO__)
+ #if !defined(__QNXNTO__) && !defined(ANDROID)
# define BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS
#endif

View File

@@ -21,6 +21,7 @@
#define _GLIBCXX__PTHREADS 1
#define BOOST_HAS_GETTIMEOFDAY 1
#define BOOST_HAS_UNISTD_H 1
#define BOOST_INTERPROCESS_POSIX_PROCESS_SHARED 1
// define this to locate a compiler config file:
// #define BOOST_COMPILER_CONFIG <myheader>

View File

@@ -265,7 +265,7 @@ inline void atomic_write32(volatile boost::uint32_t *mem, boost::uint32_t val)
} //namespace interprocess{
} //namespace boost{
#elif defined(__GNUC__) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 )
#elif defined(__GNUC__) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) && !defined(ANDROID)
namespace boost {
namespace interprocess {

View File

@@ -18,6 +18,7 @@ namespace interprocess {
inline interprocess_condition::interprocess_condition()
{
#if !defined(ANDROID)
int res;
pthread_condattr_t cond_attr;
res = pthread_condattr_init(&cond_attr);
@@ -34,6 +35,12 @@ inline interprocess_condition::interprocess_condition()
if(res != 0){
throw interprocess_exception(res);
}
#else
int res = pthread_cond_init(&m_condition, NULL);
if(res != 0){
throw interprocess_exception(res);
}
#endif
}
inline interprocess_condition::~interprocess_condition()

View File

@@ -50,6 +50,7 @@ namespace detail{
pthread_mutexattr_t m_attr;
};
#if !defined(ANDROID)
//!Makes pthread_condattr_t cleanup easy when using exceptions
struct condattr_wrapper
{
@@ -69,6 +70,7 @@ namespace detail{
pthread_condattr_t m_attr;
};
#endif
//!Makes initialized pthread_mutex_t cleanup easy when using exceptions
class mutex_initializer