Fix instances of '#if __LP64__'.
Triggers -Wundef, which is on in -Weverything.
Bug: http://b/31496165
Change-Id: Ib06107073f7dd1d584c19c222d0430da9d35630b
diff --git a/libc/bionic/brk.cpp b/libc/bionic/brk.cpp
index a8c078b..e1a4b05 100644
--- a/libc/bionic/brk.cpp
+++ b/libc/bionic/brk.cpp
@@ -29,7 +29,7 @@
#include <errno.h>
#include <unistd.h>
-#if __LP64__
+#if defined(__LP64__)
static void* __bionic_brk;
#else
void* __bionic_brk; // Accidentally exported by the NDK.
diff --git a/libc/bionic/fpclassify.cpp b/libc/bionic/fpclassify.cpp
index f8cea80..42ed3ef 100644
--- a/libc/bionic/fpclassify.cpp
+++ b/libc/bionic/fpclassify.cpp
@@ -113,7 +113,7 @@
}
__strong_alias(isnormalf, __isnormalf);
-#if __LP64__
+#if defined(__LP64__)
// LP64 uses 128-bit long doubles.
diff --git a/libc/bionic/legacy_32_bit_support.cpp b/libc/bionic/legacy_32_bit_support.cpp
index f2bb37d..983fb32 100644
--- a/libc/bionic/legacy_32_bit_support.cpp
+++ b/libc/bionic/legacy_32_bit_support.cpp
@@ -37,7 +37,7 @@
#include <sys/vfs.h>
#include <unistd.h>
-#if __LP64__
+#if defined(__LP64__)
#error This code is only needed on 32-bit systems!
#endif
diff --git a/libc/bionic/open.cpp b/libc/bionic/open.cpp
index 41dce43..2daa21f 100644
--- a/libc/bionic/open.cpp
+++ b/libc/bionic/open.cpp
@@ -36,7 +36,7 @@
extern "C" int __openat(int, const char*, int, int);
static inline int force_O_LARGEFILE(int flags) {
-#if __LP64__
+#if defined(__LP64__)
return flags; // No need, and aarch64's strace gets confused.
#else
return flags | O_LARGEFILE;
diff --git a/libc/bionic/pthread_create.cpp b/libc/bionic/pthread_create.cpp
index 58aa6f1..7986ada 100644
--- a/libc/bionic/pthread_create.cpp
+++ b/libc/bionic/pthread_create.cpp
@@ -101,7 +101,7 @@
sched_param param;
param.sched_priority = thread->attr.sched_priority;
if (sched_setscheduler(thread->tid, thread->attr.sched_policy, ¶m) == -1) {
-#if __LP64__
+#if defined(__LP64__)
// For backwards compatibility reasons, we only report failures on 64-bit devices.
error = errno;
#endif
diff --git a/libc/bionic/statvfs.cpp b/libc/bionic/statvfs.cpp
index 39ffb64..cd825eb 100644
--- a/libc/bionic/statvfs.cpp
+++ b/libc/bionic/statvfs.cpp
@@ -20,7 +20,7 @@
// Paper over the fact that 32-bit kernels use fstatfs64/statfs64 with an extra argument,
// but 64-bit kernels don't have the "64" bit suffix or the extra size_t argument.
-#if __LP64__
+#if defined(__LP64__)
extern "C" int __fstatfs(int, struct statfs*);
extern "C" int __statfs(const char*, struct statfs*);
# define __fstatfs64(fd,size,buf) __fstatfs(fd,buf)
diff --git a/libc/bionic/strtold.cpp b/libc/bionic/strtold.cpp
index 5616cf7..c55dd61 100644
--- a/libc/bionic/strtold.cpp
+++ b/libc/bionic/strtold.cpp
@@ -32,7 +32,7 @@
extern "C" int __strtorQ(const char*, char**, int, void*);
long double strtold(const char* s, char** end_ptr) {
-#if __LP64__
+#if defined(__LP64__)
long double result;
__strtorQ(s, end_ptr, FLT_ROUNDS, &result);
return result;