Commit 5d5f6191 authored by BogDan Vatra's avatar BogDan Vatra Committed by The Qt Project
Browse files

Fix compile on Android


Change-Id: Ide8d4a50169de13e9743f3b2304af2b23c3ce694
Reviewed-by: default avatarEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
parent a5116f19
Branches
Tags
No related merge requests found
Showing with 20 additions and 7 deletions
...@@ -36,7 +36,18 @@ ...@@ -36,7 +36,18 @@
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#include <elf.h> #include <elf.h>
#include <asm/hwcap.h> #if !OS(ANDROID) && !PLATFORM(QT)
# include <asm/hwcap.h>
# else
typedef struct
{
uint32_t a_type;
union
{
uint32_t a_val;
} a_un;
} Elf32_auxv_t;
# endif
#endif #endif
namespace JSC { namespace JSC {
...@@ -56,7 +67,6 @@ static bool isVFPPresent() ...@@ -56,7 +67,6 @@ static bool isVFPPresent()
close(fd); close(fd);
} }
#endif #endif
return false; return false;
} }
......
...@@ -452,6 +452,7 @@ ...@@ -452,6 +452,7 @@
|| defined(__unix) \ || defined(__unix) \
|| defined(__unix__) || defined(__unix__)
#define WTF_OS_UNIX 1 #define WTF_OS_UNIX 1
#endif #endif
/* Operating environments */ /* Operating environments */
...@@ -643,16 +644,18 @@ ...@@ -643,16 +644,18 @@
#endif #endif
#if PLATFORM(ANDROID) #if PLATFORM(ANDROID)
#if !PLATFORM(QT)
#define WTF_USE_PTHREADS 1 #define WTF_USE_PTHREADS 1
#define ENABLE_MAC_JAVA_BRIDGE 1
#define ENABLE_JAVASCRIPT_DEBUGGER 0
#endif /* !PLATFORM(QT) */
#define WTF_PLATFORM_SGL 1 #define WTF_PLATFORM_SGL 1
#define USE_SYSTEM_MALLOC 1 #define USE_SYSTEM_MALLOC 1
#define ENABLE_MAC_JAVA_BRIDGE 1
#define LOG_DISABLED 1 #define LOG_DISABLED 1
/* Prevents Webkit from drawing the caret in textfields and textareas /* Prevents Webkit from drawing the caret in textfields and textareas
This prevents unnecessary invals. */ This prevents unnecessary invals. */
#define ENABLE_TEXT_CARET 1 #define ENABLE_TEXT_CARET 1
#define ENABLE_JAVASCRIPT_DEBUGGER 0 #endif /* PLATFORM(ANDROID) */
#endif
#if PLATFORM(WIN) #if PLATFORM(WIN)
#define WTF_USE_WININET 1 #define WTF_USE_WININET 1
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
#include <windows.h> #include <windows.h>
#elif OS(DARWIN) #elif OS(DARWIN)
#include <libkern/OSAtomic.h> #include <libkern/OSAtomic.h>
#elif OS(ANDROID) #elif OS(ANDROID) && !PLATFORM(QT)
#include <cutils/atomic.h> #include <cutils/atomic.h>
#elif OS(QNX) #elif OS(QNX)
#include <atomic.h> #include <atomic.h>
...@@ -236,7 +236,7 @@ inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(r ...@@ -236,7 +236,7 @@ inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(r
inline int atomicIncrement(int volatile* addend) { return OSAtomicIncrement32Barrier(const_cast<int*>(addend)); } inline int atomicIncrement(int volatile* addend) { return OSAtomicIncrement32Barrier(const_cast<int*>(addend)); }
inline int atomicDecrement(int volatile* addend) { return OSAtomicDecrement32Barrier(const_cast<int*>(addend)); } inline int atomicDecrement(int volatile* addend) { return OSAtomicDecrement32Barrier(const_cast<int*>(addend)); }
#elif OS(ANDROID) #elif OS(ANDROID) && !PLATFORM(QT)
inline int atomicIncrement(int volatile* addend) { return android_atomic_inc(addend); } inline int atomicIncrement(int volatile* addend) { return android_atomic_inc(addend); }
inline int atomicDecrement(int volatile* addend) { return android_atomic_dec(addend); } inline int atomicDecrement(int volatile* addend) { return android_atomic_dec(addend); }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment