Remove __BIONIC_LEGACY_INLINE.
Don't use the same declaration to declare both static and non-static
functions, to make life easier for versioner.
(Also, remove __BIONIC_LEGACY_INLINE from two functions in termios.h
that weren't actually legacy inlines.)
Bug: http://b/30170081
Change-Id: Ibb73377d77a2b4cee016289b7c46a01452e45fae
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 65b92a6..28c2132 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -74,10 +74,7 @@
extern int posix_memalign(void** memptr, size_t alignment, size_t size) __INTRODUCED_IN(16);
-__BIONIC_LEGACY_INLINE double atof(const char*);
-
extern double strtod(const char*, char**);
-__BIONIC_LEGACY_INLINE float strtof(const char*, char**);
extern long double strtold(const char*, char**) __INTRODUCED_IN(21);
extern long double strtold_l(const char*, char**, locale_t) __INTRODUCED_IN(21);
@@ -88,10 +85,6 @@
extern long atol(const char*) __purefunc;
extern long long atoll(const char*) __purefunc;
-__BIONIC_LEGACY_INLINE int abs(int) __pure2;
-__BIONIC_LEGACY_INLINE long labs(long) __pure2;
-__BIONIC_LEGACY_INLINE long long llabs(long long) __pure2;
-
extern char * realpath(const char *path, char *resolved);
extern int system(const char *string);
@@ -107,9 +100,7 @@
#define RAND_MAX 0x7fffffff
-__BIONIC_LEGACY_INLINE int rand(void);
int rand_r(unsigned int*) __INTRODUCED_IN(21);
-__BIONIC_LEGACY_INLINE void srand(unsigned int);
double drand48(void);
double erand48(unsigned short[3]);
@@ -122,12 +113,9 @@
void srand48(long);
char* initstate(unsigned int, char*, size_t) __INTRODUCED_IN(21);
-__BIONIC_LEGACY_INLINE long random(void);
char* setstate(char*) __INTRODUCED_IN(21);
-__BIONIC_LEGACY_INLINE void srandom(unsigned int);
int getpt(void);
-__BIONIC_LEGACY_INLINE int grantpt(int);
int posix_openpt(int) __INTRODUCED_IN(21);
char* ptsname(int);
int ptsname_r(int, char*, size_t);
@@ -190,6 +178,21 @@
#endif /* defined(__BIONIC_FORTIFY) */
+#if __ANDROID_API__ >= 21
+float strtof(const char*, char**);
+double atof(const char*);
+int abs(int) __pure2;
+long labs(long) __pure2;
+long long llabs(long long) __pure2;
+int rand(void);
+void srand(unsigned int);
+long random(void);
+void srandom(unsigned int);
+int grantpt(int);
+#else
+// Implemented as static inlines before 21.
+#endif
+
__END_DECLS
#include <android/legacy_stdlib_inlines.h>