}
// No valloc on Windows or Android.
-#if !defined(_WIN32) && !defined(ANDROID) && !defined(__ANDROID__)
+#if !defined(_WIN32) && !defined(__ANDROID__)
TEST(AddressSanitizer, VallocTest) {
void *a = valloc(100);
EXPECT_EQ(0U, (uintptr_t)a % kPageSize);
return MallocAndMemsetString(size, 'z');
}
-#if defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__)
+#if defined(__linux__) && !defined(__ANDROID__)
#define READ_TEST(READ_N_BYTES) \
char *x = new char[10]; \
int fd = open("/proc/self/stat", O_RDONLY); \
TEST(AddressSanitizer, read) {
READ_TEST(read(fd, x, 15));
}
-#endif // defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__)
+#endif // defined(__linux__) && !defined(__ANDROID__)
// This test case fails
// Clang optimizes memcpy/memset calls which lead to unaligned access
// https://code.google.com/p/address-sanitizer/issues/detail?id=131
// Windows support is tracked here:
// https://code.google.com/p/address-sanitizer/issues/detail?id=309
-#if !defined(ANDROID) && !defined(__ANDROID__) && \
+#if !defined(__ANDROID__) && \
!defined(__APPLE__) && \
!defined(_WIN32)
static string MismatchStr(const string &str) {
#include <machine/sysarch.h>
#endif
-#if defined(ANDROID) && defined(__mips__)
+#if defined(__ANDROID__) && defined(__mips__)
#include <sys/cachectl.h>
#endif
-#if defined(ANDROID) && defined(__arm__)
+#if defined(__ANDROID__) && defined(__arm__)
#include <asm/unistd.h>
#endif
arg.len = (uintptr_t)end - (uintptr_t)start;
sysarch(ARM_SYNC_ICACHE, &arg);
- #elif defined(ANDROID)
+ #elif defined(__ANDROID__)
const register int start_reg __asm("r0") = (int) (intptr_t) start;
const register int end_reg __asm("r1") = (int) (intptr_t) end;
const register int flags __asm("r2") = 0;
#else
compilerrt_abort();
#endif
-#elif defined(ANDROID) && defined(__mips__)
+#elif defined(__ANDROID__) && defined(__mips__)
const uintptr_t start_int = (uintptr_t) start;
const uintptr_t end_int = (uintptr_t) end;
_flush_cache(start, (end_int - start_int), BCACHE);
# define SANITIZER_WINDOWS 0
#endif
-#if defined(__ANDROID__) || defined(ANDROID)
+#if defined(__ANDROID__)
# define SANITIZER_ANDROID 1
#else
# define SANITIZER_ANDROID 0
// Set availability of platform-specific functions.
-#if !defined(__APPLE__) && !defined(ANDROID) && !defined(__ANDROID__) && !defined(_WIN32)
+#if !defined(__APPLE__) && !defined(__ANDROID__) && !defined(_WIN32)
# define SANITIZER_TEST_HAS_POSIX_MEMALIGN 1
#else
# define SANITIZER_TEST_HAS_POSIX_MEMALIGN 0
#endif
-#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(ANDROID) && \
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && \
!defined(__ANDROID__) && !defined(_WIN32)
# define SANITIZER_TEST_HAS_MEMALIGN 1
# define SANITIZER_TEST_HAS_PVALLOC 1