Add and use constants for the Android API levels.

Test: bionic tests still pass
Change-Id: If1b619cfc9db1d3f5d91f14f2ace71058dca0c4a
diff --git a/libc/include/string.h b/libc/include/string.h
index b3b3ed0..3e52f48 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -114,7 +114,7 @@
 int strcoll(const char* _Nonnull, const char* _Nonnull) __attribute_pure__;
 size_t strxfrm(char* __restrict, const char* _Nonnull __restrict, size_t);
 
-#if __ANDROID_API__ >= 21
+#if __ANDROID_API__ >= __ANDROID_API_L__
 int strcoll_l(const char* _Nonnull, const char* _Nonnull, locale_t) __attribute_pure__ __INTRODUCED_IN(21);
 size_t strxfrm_l(char* __restrict, const char* _Nonnull __restrict, size_t, locale_t) __INTRODUCED_IN(21);
 #else
@@ -152,7 +152,7 @@
 
 #if defined(__BIONIC_FORTIFY)
 
-#if __ANDROID_API__ >= 23
+#if __ANDROID_API__ >= __ANDROID_API_M__
 __BIONIC_FORTIFY_INLINE
 void* memchr(const void* s, int c, size_t n) {
     size_t bos = __bos(s);
@@ -194,9 +194,9 @@
 
     return __memrchr_chk(s, c, n, bos);
 }
-#endif /* __ANDROID_API__ >= 23 */
+#endif /* __ANDROID_API__ >= __ANDROID_API_M__ */
 
-#if __ANDROID_API__ >= 17
+#if __ANDROID_API__ >= __ANDROID_API_J_MR1__
 __BIONIC_FORTIFY_INLINE
 void* memcpy(void* _Nonnull __restrict dst, const void* _Nonnull __restrict src, size_t copy_amount) {
     return __builtin___memcpy_chk(dst, src, copy_amount, __bos0(dst));
@@ -206,23 +206,23 @@
 void* memmove(void* _Nonnull dst, const void* _Nonnull src, size_t len) {
     return __builtin___memmove_chk(dst, src, len, __bos0(dst));
 }
-#endif /* __ANDROID_API__ >= 17 */
+#endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
 
-#if __ANDROID_API__ >= 21
+#if __ANDROID_API__ >= __ANDROID_API_L__
 __BIONIC_FORTIFY_INLINE
 char* stpcpy(char* _Nonnull __restrict dst, const char* _Nonnull __restrict src) {
     return __builtin___stpcpy_chk(dst, src, __bos(dst));
 }
-#endif /* __ANDROID_API__ >= 21 */
+#endif /* __ANDROID_API__ >= __ANDROID_API_L__ */
 
-#if __ANDROID_API__ >= 17
+#if __ANDROID_API__ >= __ANDROID_API_J_MR1__
 __BIONIC_FORTIFY_INLINE
 char* strcpy(char* _Nonnull __restrict dst, const char* _Nonnull __restrict src) {
     return __builtin___strcpy_chk(dst, src, __bos(dst));
 }
-#endif /* __ANDROID_API__ >= 17 */
+#endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
 
-#if __ANDROID_API__ >= 21
+#if __ANDROID_API__ >= __ANDROID_API_L__
 __BIONIC_FORTIFY_INLINE
 char* stpncpy(char* _Nonnull __restrict dst, const char* _Nonnull __restrict src, size_t n) {
     size_t bos_dst = __bos(dst);
@@ -264,9 +264,9 @@
 
     return __strncpy_chk2(dst, src, n, bos_dst, bos_src);
 }
-#endif /* __ANDROID_API__ >= 21 */
+#endif /* __ANDROID_API__ >= __ANDROID_API_L__ */
 
-#if __ANDROID_API__ >= 17
+#if __ANDROID_API__ >= __ANDROID_API_J_MR1__
 __BIONIC_FORTIFY_INLINE
 char* strcat(char* _Nonnull __restrict dst, const char* _Nonnull __restrict src) {
     return __builtin___strcat_chk(dst, src, __bos(dst));
@@ -341,9 +341,9 @@
 
     return __strlen_chk(s, bos);
 }
-#endif /* __ANDROID_API__ >= 17 */
+#endif /* __ANDROID_API__ >= __ANDROID_API_J_MR1__ */
 
-#if  __ANDROID_API__ >= 18
+#if  __ANDROID_API__ >= __ANDROID_API_J_MR2__
 __BIONIC_FORTIFY_INLINE
 char* strchr(const char* _Nonnull s, int c) {
     size_t bos = __bos(s);
@@ -381,7 +381,7 @@
 
     return __strrchr_chk(s, c, bos);
 }
-#endif /* __ANDROID_API__ >= 18 */
+#endif /* __ANDROID_API__ >= __ANDROID_API_J_MR2__ */
 
 #endif /* defined(__BIONIC_FORTIFY) */