[boost][android][hack] To compile boost system lib files for Android

This commit is contained in:
Alex Zolotarev 2014-09-11 02:11:14 -07:00 committed by Alex Zolotarev
parent c6940b430a
commit 902258ccaa
3 changed files with 10 additions and 5 deletions

View file

@ -17,6 +17,10 @@
# pragma once
#endif
#if defined(ANDROID) && (defined(__i386__) || defined(mips))
// do not define anything to avoid compilation issue with libc++ in Android SDK
// it uses gabi for libc++ on mips and x86
#else
#if defined( __clang__ ) && defined( __has_include )
# if __has_include(<cxxabi.h>)
# define BOOST_CORE_HAS_CXXABI_H
@ -24,6 +28,7 @@
#elif defined( __GLIBCXX__ ) || defined( __GLIBCPP__ )
# define BOOST_CORE_HAS_CXXABI_H
#endif
#endif
#if defined( BOOST_CORE_HAS_CXXABI_H )
# include <cxxabi.h>

View file

@ -92,11 +92,11 @@ namespace std {
}
#endif
#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__)
#define BOOST_CODECVT_DO_LENGTH_CONST const
#else
//#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__)
// #define BOOST_CODECVT_DO_LENGTH_CONST const
//#else
#define BOOST_CODECVT_DO_LENGTH_CONST
#endif
//#endif
// maximum lenght of a multibyte string
#define MB_LENGTH_MAX 8

View file

@ -171,7 +171,7 @@ std::codecvt_base::result utf8_codecvt_facet::do_out(
// How many char objects can I process to get <= max_limit
// wchar_t objects?
int utf8_codecvt_facet::do_length(
const std::mbstate_t &,
std::mbstate_t &,
const char * from,
const char * from_end,
std::size_t max_limit