diff options
| author | Kenny Root <kroot@google.com> | 2011-02-16 10:13:53 -0800 |
|---|---|---|
| committer | Alex Ray <aray@google.com> | 2013-07-30 13:56:55 -0700 |
| commit | dafff0bcc10fe1ff80e68a31793bbdea2ec8d0c3 (patch) | |
| tree | d6d10a1a8d8a2478e2a737bb34b0a1b74d60b9f8 /libs/utils | |
| parent | ff49de731f3361afc77abe9b60bc7c8e6708f886 (diff) | |
| download | system_core-dafff0bcc10fe1ff80e68a31793bbdea2ec8d0c3.zip system_core-dafff0bcc10fe1ff80e68a31793bbdea2ec8d0c3.tar.gz system_core-dafff0bcc10fe1ff80e68a31793bbdea2ec8d0c3.tar.bz2 | |
Clean up use of HAVE_ANDROID_OS
HAVE_ANDROID_OS was defined as "1" for targets, but never defined as "0"
for non-targets. Changing them to #ifdef should be safe and matches
all the other uses of HAVE_ANDROID_OS throughout the system.
Change-Id: I82257325a8ae5e4e4371ddfc4dbf51cea8ea0abb
Diffstat (limited to 'libs/utils')
| -rw-r--r-- | libs/utils/SystemClock.cpp | 8 | ||||
| -rw-r--r-- | libs/utils/Threads.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libs/utils/SystemClock.cpp b/libs/utils/SystemClock.cpp index 2bdc0ce..062e6d7 100644 --- a/libs/utils/SystemClock.cpp +++ b/libs/utils/SystemClock.cpp @@ -19,7 +19,7 @@ * System clock functions. */ -#if HAVE_ANDROID_OS +#ifdef HAVE_ANDROID_OS #include <linux/ioctl.h> #include <linux/rtc.h> #include <utils/Atomic.h> @@ -50,7 +50,7 @@ int setCurrentTimeMillis(int64_t millis) return -1; #else struct timeval tv; -#if HAVE_ANDROID_OS +#ifdef HAVE_ANDROID_OS struct timespec ts; int fd; int res; @@ -66,7 +66,7 @@ int setCurrentTimeMillis(int64_t millis) LOGD("Setting time of day to sec=%d\n", (int) tv.tv_sec); -#if HAVE_ANDROID_OS +#ifdef HAVE_ANDROID_OS fd = open("/dev/alarm", O_RDWR); if(fd < 0) { LOGW("Unable to open alarm driver: %s\n", strerror(errno)); @@ -106,7 +106,7 @@ int64_t uptimeMillis() */ int64_t elapsedRealtime() { -#if HAVE_ANDROID_OS +#ifdef HAVE_ANDROID_OS static int s_fd = -1; if (s_fd == -1) { diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp index b1bd828..35dcbcb 100644 --- a/libs/utils/Threads.cpp +++ b/libs/utils/Threads.cpp @@ -739,7 +739,7 @@ int Thread::_threadLoop(void* user) wp<Thread> weak(strong); self->mHoldSelf.clear(); -#if HAVE_ANDROID_OS +#ifdef HAVE_ANDROID_OS // this is very useful for debugging with gdb self->mTid = gettid(); #endif |
