diff options
author | Elliott Hughes <enh@google.com> | 2015-07-30 16:34:47 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-07-30 16:34:47 +0000 |
commit | e6e71608bd60b4745b048ec466b5ea1301020b32 (patch) | |
tree | 62aaf762c22798dceb58494ca621bf99660a2278 /libcutils | |
parent | 44443bead6cf3c6e71029e7181f64ba82c6a8c8e (diff) | |
parent | 9b828adfad09200f3f1bd3602187fe3dd5335774 (diff) | |
download | core-e6e71608bd60b4745b048ec466b5ea1301020b32.tar.gz core-e6e71608bd60b4745b048ec466b5ea1301020b32.tar.bz2 core-e6e71608bd60b4745b048ec466b5ea1301020b32.zip |
Merge "Use __ANDROID__ instead of HAVE_ANDROID_OS."
Diffstat (limited to 'libcutils')
-rw-r--r-- | libcutils/iosched_policy.c | 6 | ||||
-rw-r--r-- | libcutils/process_name.c | 8 | ||||
-rw-r--r-- | libcutils/sched_policy.c | 4 | ||||
-rw-r--r-- | libcutils/sockets.c | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/libcutils/iosched_policy.c b/libcutils/iosched_policy.c index 8946d3c14..71bc94b25 100644 --- a/libcutils/iosched_policy.c +++ b/libcutils/iosched_policy.c @@ -23,7 +23,7 @@ #include <cutils/iosched_policy.h> -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) #include <linux/ioprio.h> #include <sys/syscall.h> #define __android_unused @@ -32,7 +32,7 @@ #endif int android_set_ioprio(int pid __android_unused, IoSchedClass clazz __android_unused, int ioprio __android_unused) { -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) if (syscall(SYS_ioprio_set, IOPRIO_WHO_PROCESS, pid, ioprio | (clazz << IOPRIO_CLASS_SHIFT))) { return -1; } @@ -41,7 +41,7 @@ int android_set_ioprio(int pid __android_unused, IoSchedClass clazz __android_un } int android_get_ioprio(int pid __android_unused, IoSchedClass *clazz, int *ioprio) { -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) int rc; if ((rc = syscall(SYS_ioprio_get, IOPRIO_WHO_PROCESS, pid)) < 0) { diff --git a/libcutils/process_name.c b/libcutils/process_name.c index cc931ebaf..5d28b6ff2 100644 --- a/libcutils/process_name.c +++ b/libcutils/process_name.c @@ -25,19 +25,19 @@ #include <unistd.h> #include <cutils/process_name.h> -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) #include <cutils/properties.h> #endif #define PROCESS_NAME_DEVICE "/sys/qemu_trace/process_name" static const char* process_name = "unknown"; -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) static int running_in_emulator = -1; #endif void set_process_name(const char* new_name) { -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) char propBuf[PROPERTY_VALUE_MAX]; #endif @@ -59,7 +59,7 @@ void set_process_name(const char* new_name) { } #endif -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) // If we know we are not running in the emulator, then return. if (running_in_emulator == 0) { return; diff --git a/libcutils/sched_policy.c b/libcutils/sched_policy.c index dfc877752..103ff66b3 100644 --- a/libcutils/sched_policy.c +++ b/libcutils/sched_policy.c @@ -37,7 +37,7 @@ static inline SchedPolicy _policy(SchedPolicy p) return p == SP_DEFAULT ? SP_SYSTEM_DEFAULT : p; } -#if defined(HAVE_ANDROID_OS) +#if defined(__ANDROID__) #include <pthread.h> #include <sched.h> @@ -142,7 +142,7 @@ static void __initialize(void) { */ static int getSchedulerGroup(int tid, char* buf, size_t bufLen) { -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) char pathBuf[32]; char lineBuf[256]; FILE *fp; diff --git a/libcutils/sockets.c b/libcutils/sockets.c index 15ede2b5b..d43878258 100644 --- a/libcutils/sockets.c +++ b/libcutils/sockets.c @@ -17,7 +17,7 @@ #include <cutils/sockets.h> #include <log/log.h> -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) /* For the socket trust (credentials) check */ #include <private/android_filesystem_config.h> #define __android_unused @@ -27,7 +27,7 @@ bool socket_peer_is_trusted(int fd __android_unused) { -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) struct ucred cr; socklen_t len = sizeof(cr); int n = getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &len); |