Stop using the __ANDROID_API_x__ constants.
Historically we've made a few mistakes where they haven't matched the
right number. And most non-Googlers are much more familiar with the
numbers, so it seems to make sense to rely more on them. Especially in
header files, which we actually expect real people to have to read from
time to time.
Test: treehugger
Change-Id: I0d4a97454ee108de1d32f21df285315c5488d886
diff --git a/libc/include/pthread.h b/libc/include/pthread.h
index b549871..331e92c 100644
--- a/libc/include/pthread.h
+++ b/libc/include/pthread.h
@@ -54,7 +54,7 @@
#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP { { ((PTHREAD_MUTEX_ERRORCHECK & 3) << 14) } }
#define PTHREAD_COND_INITIALIZER { { 0 } }
-#if __ANDROID_API__ >= __ANDROID_API_L__
+#if __ANDROID_API__ >= 21
#define PTHREAD_COND_INITIALIZER_MONOTONIC_NP { { 1 << 1 } }
#endif
@@ -67,7 +67,7 @@
#define PTHREAD_ONCE_INIT 0
-#if __ANDROID_API__ >= __ANDROID_API_N__
+#if __ANDROID_API__ >= 24
#define PTHREAD_BARRIER_SERIAL_THREAD -1
#endif
@@ -254,20 +254,20 @@
int pthread_rwlock_unlock(pthread_rwlock_t* __rwlock);
int pthread_rwlock_wrlock(pthread_rwlock_t* __rwlock);
-#if __ANDROID_API__ >= __ANDROID_API_N__
+#if __ANDROID_API__ >= 24
int pthread_barrierattr_init(pthread_barrierattr_t* __attr) __INTRODUCED_IN(24);
int pthread_barrierattr_destroy(pthread_barrierattr_t* __attr) __INTRODUCED_IN(24);
int pthread_barrierattr_getpshared(const pthread_barrierattr_t* __attr, int* __shared) __INTRODUCED_IN(24);
int pthread_barrierattr_setpshared(pthread_barrierattr_t* __attr, int __shared) __INTRODUCED_IN(24);
#endif
-#if __ANDROID_API__ >= __ANDROID_API_N__
+#if __ANDROID_API__ >= 24
int pthread_barrier_init(pthread_barrier_t* __barrier, const pthread_barrierattr_t* __attr, unsigned __count) __INTRODUCED_IN(24);
int pthread_barrier_destroy(pthread_barrier_t* __barrier) __INTRODUCED_IN(24);
int pthread_barrier_wait(pthread_barrier_t* __barrier) __INTRODUCED_IN(24);
#endif
-#if __ANDROID_API__ >= __ANDROID_API_N__
+#if __ANDROID_API__ >= 24
int pthread_spin_destroy(pthread_spinlock_t* __spinlock) __INTRODUCED_IN(24);
int pthread_spin_init(pthread_spinlock_t* __spinlock, int __shared) __INTRODUCED_IN(24);
int pthread_spin_lock(pthread_spinlock_t* __spinlock) __INTRODUCED_IN(24);