1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

build: detect Android via '__ANDROID__' macro

https://sourceforge.net/p/predef/wiki/OperatingSystems
This commit is contained in:
Alexander Alekhin
2017-07-10 12:43:59 +03:00
parent cddf868572
commit a4a47b538c
25 changed files with 73 additions and 73 deletions
+3 -3
View File
@@ -56,7 +56,7 @@
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#if defined ANDROID
#if defined __ANDROID__
#include <sys/sysconf.h>
#elif defined __APPLE__
#include <sys/sysctl.h>
@@ -590,7 +590,7 @@ int cv::getThreadNum(void)
#endif
}
#ifdef ANDROID
#ifdef __ANDROID__
static inline int getNumberOfCPUsImpl()
{
FILE* cpuPossible = fopen("/sys/devices/system/cpu/possible", "r");
@@ -641,7 +641,7 @@ int cv::getNumberOfCPUs(void)
#endif
return (int)sysinfo.dwNumberOfProcessors;
#elif defined ANDROID
#elif defined __ANDROID__
static int ncpus = getNumberOfCPUsImpl();
return ncpus;
#elif defined __linux__