Core patched for android

git-svn-id: svn://ultimatepp.org/upp/trunk@9856 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-05-21 11:20:15 +00:00
parent cca3ad4c61
commit e03fe790bf
7 changed files with 25 additions and 9 deletions

View file

@ -9,7 +9,7 @@ library(MSC !MSC8ARM) "kernel32 user32 ws2_32";
library(WIN32 !GUI !GNU !GCC) "ole32 oleaut32 oldnames";
library(LINUX) "pthread dl rt";
library(LINUX !ANDROID) "pthread dl rt";
library(BSD) "pthread rt execinfo";

View file

@ -106,7 +106,11 @@ int CPU_Cores()
int CPU_Cores()
{
return minmax(get_nprocs(), 1, 256);
#ifdef PLATFORM_ANDROID
return 1;
#else
return minmax(get_nprocs(), 1, 256);
#endif
}
#else
int CPU_Cores()

View file

@ -6,7 +6,9 @@
#endif
#ifdef PLATFORM_POSIX
#include <locale.h>
#include <langinfo.h>
#ifndef PLATFORM_ANDROID
#include <langinfo.h>
#endif
#endif
NAMESPACE_UPP

View file

@ -6,7 +6,9 @@
#endif
#ifdef PLATFORM_POSIX
#include <locale.h>
#include <langinfo.h>
#ifndef PLATFORM_ANDROID
#include <langinfo.h>
#endif
#endif
namespace Upp {
@ -295,7 +297,7 @@ void LanguageInfo::Set(int lang_)
}
#endif
#ifdef PLATFORM_POSIX
#if defined(PLATFORM_POSIX) && !defined(PLATFORM_ANDROID)
String langtext = LNGAsText(language);
char ltext[6];
ltext[0] = ToLower(langtext[0]);

View file

@ -119,7 +119,6 @@ struct XmlRpcDo {
XmlRpcDo::XmlRpcDo(TcpSocket& http, const char *group)
: http(http), group(group)
{
data.rpc = this;
}
String XmlRpcDo::XmlResult()

View file

@ -4,7 +4,7 @@
# include <winnls.h>
#endif
#if defined(PLATFORM_POSIX) && defined(COMPILER_GCC)
#if defined(PLATFORM_POSIX) && defined(COMPILER_GCC) && !defined(PLATFORM_ANDROID)
# include <execinfo.h>
# include <cxxabi.h>
#endif
@ -38,7 +38,7 @@ void PanicMessageBox(const char *title, const char *text)
}
#if defined(PLATFORM_POSIX) && defined(COMPILER_GCC)
#if defined(PLATFORM_POSIX) && defined(COMPILER_GCC) && !defined(PLATFORM_ANDROID)
void AddStackTrace(char * str, int len)
{
const size_t max_depth = 100;

View file

@ -18,9 +18,12 @@
#if __unix || __unix__ || __APPLE__
#define PLATFORM_POSIX 1
#if __linux
#define PLATFORM_LINUX 1
#if __ANDROID__
#define PLATFORM_ANDROID 1
#endif
// zvzv add
// __linux is undef on APPLE MACOSX, MACOSX has BSD stuff
#elif __APPLE__
@ -76,6 +79,12 @@
#define CPU_BE 1
#define CPU_BIG_ENDIAN 1
#define CPU_ALIGNED 1
#elif __aarch64__
#define CPU_64 1
#define CPU_ARM 1
#define CPU_LE 1
#define CPU_LITTLE_ENDIAN 1
#define CPU_UNALIGNED 1
#elif __arm__
#define CPU_32 1
#define CPU_ARM 1