diff options
author | Elliott Hughes <enh@google.com> | 2015-07-30 16:50:15 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-30 16:50:15 +0000 |
commit | 145afc2cc4f973a4ad63aeabe5b0f633c8e99cec (patch) | |
tree | 43391eef0509bc8627b09a5b11326ff3c043fac1 /libcutils | |
parent | c6dbc85845e58464541bb0644ebd570c44841a4c (diff) | |
parent | fb1ecbc55e7edeafb138eb2a60ca89ba9a7b1f0f (diff) | |
download | core-145afc2cc4f973a4ad63aeabe5b0f633c8e99cec.tar.gz core-145afc2cc4f973a4ad63aeabe5b0f633c8e99cec.tar.bz2 core-145afc2cc4f973a4ad63aeabe5b0f633c8e99cec.zip |
am fb1ecbc5: am e6e71608: Merge "Use __ANDROID__ instead of HAVE_ANDROID_OS."
* commit 'fb1ecbc55e7edeafb138eb2a60ca89ba9a7b1f0f':
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 ab0331deb..298e3dac7 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> @@ -146,7 +146,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); |