Merge \"Remove __BIONIC_LEGACY_INLINE.\"

am: 767e8147d7

Change-Id: I510e31c8820dffc6a212dd6f390b5eac8eea84c4
This commit is contained in:
Josh Gao 2016-07-23 00:08:54 +00:00 committed by android-build-merger
commit fc49e01100
5 changed files with 48 additions and 39 deletions

View file

@ -115,15 +115,18 @@ struct sigaction {
int sigaction(int, const struct sigaction*, struct sigaction*);
__BIONIC_LEGACY_INLINE sighandler_t signal(int, sighandler_t);
int siginterrupt(int, int);
__BIONIC_LEGACY_INLINE int sigaddset(sigset_t* _Nonnull, int);
__BIONIC_LEGACY_INLINE int sigdelset(sigset_t* _Nonnull, int);
__BIONIC_LEGACY_INLINE int sigemptyset(sigset_t* _Nonnull);
__BIONIC_LEGACY_INLINE int sigfillset(sigset_t* _Nonnull);
__BIONIC_LEGACY_INLINE int sigismember(const sigset_t* _Nonnull, int);
#if __ANDROID_API__ >= 21
sighandler_t signal(int, sighandler_t);
int sigaddset(sigset_t*, int);
int sigdelset(sigset_t*, int);
int sigemptyset(sigset_t*);
int sigfillset(sigset_t*);
int sigismember(const sigset_t*, int);
#else
// Implemented as static inlines before 21.
#endif
int sigpending(sigset_t* _Nonnull);
int sigprocmask(int, const sigset_t*, sigset_t*);

View file

@ -74,10 +74,7 @@ extern unsigned long long strtoull(const char *, char **, int);
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 int atoi(const char*) __purefunc;
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 @@ void arc4random_buf(void*, size_t);
#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 @@ unsigned short* seed48(unsigned short[3]);
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 @@ char* realpath(const char* path, char* resolved) {
#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>

View file

@ -289,12 +289,6 @@
/* Used to rename functions so that the compiler emits a call to 'x' rather than the function this was applied to. */
#define __RENAME(x) __asm__(#x)
#if __ANDROID_API__ < 21
#define __BIONIC_LEGACY_INLINE static __inline
#else
#define __BIONIC_LEGACY_INLINE extern
#endif
#ifdef __clang__
#define __AVAILABILITY(...) __attribute__((availability(android,__VA_ARGS__)))
#else

View file

@ -177,7 +177,12 @@ mode_t umask(mode_t mode) {
}
#endif /* defined(__BIONIC_FORTIFY) */
__BIONIC_LEGACY_INLINE int mkfifo(const char*, mode_t);
#if __ANDROID_API__ >= 21
int mkfifo(const char*, mode_t);
#else
// Implemented as a static inline before 21.
#endif
extern int mkfifoat(int, const char*, mode_t) __INTRODUCED_IN(23);
extern int fchmodat(int, const char*, mode_t, int);

View file

@ -35,19 +35,23 @@
__BEGIN_DECLS
__BIONIC_LEGACY_INLINE speed_t cfgetispeed(const struct termios*);
__BIONIC_LEGACY_INLINE speed_t cfgetospeed(const struct termios*);
__BIONIC_LEGACY_INLINE void cfmakeraw(struct termios*);
__BIONIC_LEGACY_INLINE int cfsetispeed(struct termios*, speed_t);
__BIONIC_LEGACY_INLINE int cfsetospeed(struct termios*, speed_t);
__BIONIC_LEGACY_INLINE int cfsetspeed(struct termios*, speed_t) __INTRODUCED_IN(21);
__BIONIC_LEGACY_INLINE int tcdrain(int) __INTRODUCED_IN(21);
__BIONIC_LEGACY_INLINE int tcflow(int, int);
__BIONIC_LEGACY_INLINE int tcflush(int, int);
__BIONIC_LEGACY_INLINE int tcgetattr(int, struct termios*);
__BIONIC_LEGACY_INLINE pid_t tcgetsid(int);
__BIONIC_LEGACY_INLINE int tcsendbreak(int, int);
__BIONIC_LEGACY_INLINE int tcsetattr(int, int, const struct termios*);
#if __ANDROID_API__ >= 21
// Implemented as static inlines before 21.
speed_t cfgetispeed(const struct termios*);
speed_t cfgetospeed(const struct termios*);
void cfmakeraw(struct termios*);
int cfsetispeed(struct termios*, speed_t);
int cfsetospeed(struct termios*, speed_t);
int tcflow(int, int);
int tcflush(int, int);
int tcgetattr(int, struct termios*);
pid_t tcgetsid(int);
int tcsendbreak(int, int);
int tcsetattr(int, int, const struct termios*);
#endif
int cfsetspeed(struct termios*, speed_t) __INTRODUCED_IN(21);
int tcdrain(int) __INTRODUCED_IN(21);
__END_DECLS