diff --git a/project/jni/boost/include/003-headers.patch b/project/jni/boost/include/003-headers.patch deleted file mode 100644 index 3a6355ba1..000000000 --- a/project/jni/boost/include/003-headers.patch +++ /dev/null @@ -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 - -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 - diff --git a/project/jni/boost/include/boost/config/user.hpp b/project/jni/boost/include/boost/config/user.hpp index cc268fec6..5b7f5a410 100644 --- a/project/jni/boost/include/boost/config/user.hpp +++ b/project/jni/boost/include/boost/config/user.hpp @@ -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 diff --git a/project/jni/boost/include/boost/interprocess/detail/atomic.hpp b/project/jni/boost/include/boost/interprocess/detail/atomic.hpp index 71b7a55f0..dbfb2cd41 100644 --- a/project/jni/boost/include/boost/interprocess/detail/atomic.hpp +++ b/project/jni/boost/include/boost/interprocess/detail/atomic.hpp @@ -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 { diff --git a/project/jni/boost/include/boost/interprocess/sync/posix/interprocess_condition.hpp b/project/jni/boost/include/boost/interprocess/sync/posix/interprocess_condition.hpp index a506b619c..fa973555c 100644 --- a/project/jni/boost/include/boost/interprocess/sync/posix/interprocess_condition.hpp +++ b/project/jni/boost/include/boost/interprocess/sync/posix/interprocess_condition.hpp @@ -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() diff --git a/project/jni/boost/include/boost/interprocess/sync/posix/pthread_helpers.hpp b/project/jni/boost/include/boost/interprocess/sync/posix/pthread_helpers.hpp index e175b1856..a42927453 100644 --- a/project/jni/boost/include/boost/interprocess/sync/posix/pthread_helpers.hpp +++ b/project/jni/boost/include/boost/interprocess/sync/posix/pthread_helpers.hpp @@ -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