summaryrefslogtreecommitdiff
path: root/libc/include/stdlib.h
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-01-09 05:42:16 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-01-09 05:42:16 +0000
commit4a7c51a8851fbf27f673892ea66016bce318b38c (patch)
treeb8114e538af074462dcbdda466aa9ce193307ca1 /libc/include/stdlib.h
parentf9fcb1efae7458109b13260d7a7f8db939a1aa2c (diff)
parent51a7fe8fbdda866ab5364c0b37b102be0ea337ad (diff)
Merge "Mark abs/labs/llabs as 19+ rather than 21+"
Diffstat (limited to 'libc/include/stdlib.h')
-rw-r--r--libc/include/stdlib.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 1ae3c6e9a0..944d72ba9d 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -172,12 +172,17 @@ size_t __ctype_get_mb_cur_max(void) __INTRODUCED_IN(21);
#include <bits/fortify/stdlib.h>
#endif
+#if __ANDROID_API__ >= __ANDROID_API_K__
+int abs(int __x) __attribute_const__ __INTRODUCED_IN(19);
+long labs(long __x) __attribute_const__ __INTRODUCED_IN(19);
+long long llabs(long long __x) __attribute_const__ __INTRODUCED_IN(19);
+#else
+// Implemented as static inlines before 19.
+#endif
+
#if __ANDROID_API__ >= __ANDROID_API_L__
float strtof(const char* __s, char** __end_ptr) __INTRODUCED_IN(21);
double atof(const char* __s) __attribute_pure__ __INTRODUCED_IN(21);
-int abs(int __x) __attribute_const__ __INTRODUCED_IN(21);
-long labs(long __x) __attribute_const__ __INTRODUCED_IN(21);
-long long llabs(long long __x) __attribute_const__ __INTRODUCED_IN(21);
int rand(void) __INTRODUCED_IN(21);
void srand(unsigned int __seed) __INTRODUCED_IN(21);
long random(void) __INTRODUCED_IN(21);