Remove __INTRODUCED_IN for obsolete API levels.
The NDK only supports >= 16, so remove anything older than that to avoid
giving the misleading impression that such old targets are still
supported.
(This change doesn't touch <unistd.h>. I'll follow up with that once the
outstanding FORTIFY changes to that file are in.)
Test: builds
Change-Id: I6cc6ecdb99fe228a4afa71f78e5fd45309ba9786
diff --git a/libc/include/fenv.h b/libc/include/fenv.h
index 886612e..90ac805 100644
--- a/libc/include/fenv.h
+++ b/libc/include/fenv.h
@@ -46,11 +46,9 @@
// fenv was always available on x86.
#if __ANDROID_API__ >= __ANDROID_API_L__ || defined(__i386__)
int feclearexcept(int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21) __INTRODUCED_IN_X86(9);
-int fegetexceptflag(fexcept_t* __flag_ptr, int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21)
- __INTRODUCED_IN_X86(9);
+int fegetexceptflag(fexcept_t* __flag_ptr, int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21) __INTRODUCED_IN_X86(9);
int feraiseexcept(int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21) __INTRODUCED_IN_X86(9);
-int fesetexceptflag(const fexcept_t* __flag_ptr, int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21)
- __INTRODUCED_IN_X86(9);
+int fesetexceptflag(const fexcept_t* __flag_ptr, int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21) __INTRODUCED_IN_X86(9);
int fetestexcept(int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21) __INTRODUCED_IN_X86(9);
int fegetround(void) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21) __INTRODUCED_IN_X86(9);
@@ -59,8 +57,7 @@
int fegetenv(fenv_t* __env) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21) __INTRODUCED_IN_X86(9);
int feholdexcept(fenv_t* __env) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21) __INTRODUCED_IN_X86(9);
int fesetenv(const fenv_t* __env) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21) __INTRODUCED_IN_X86(9);
-int feupdateenv(const fenv_t* __env) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21)
- __INTRODUCED_IN_X86(9);
+int feupdateenv(const fenv_t* __env) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21) __INTRODUCED_IN_X86(9);
int feenableexcept(int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21) __INTRODUCED_IN_X86(9);
int fedisableexcept(int __exceptions) __INTRODUCED_IN_ARM(21) __INTRODUCED_IN_MIPS(21) __INTRODUCED_IN_X86(9);
diff --git a/libc/include/math.h b/libc/include/math.h
index beb66a7..7efc83a 100644
--- a/libc/include/math.h
+++ b/libc/include/math.h
@@ -217,7 +217,7 @@
long double lgammal(long double __x) __RENAME_LDBL(lgamma, 3, 21);
double tgamma(double __x);
-float tgammaf(float __x) __INTRODUCED_IN_ARM(13) __INTRODUCED_IN_MIPS(13) __INTRODUCED_IN_X86(9);
+float tgammaf(float __x);
long double tgammal(long double __x) __RENAME_LDBL(tgamma, 3, 21);
double ceil(double __x);
@@ -276,8 +276,8 @@
float copysignf(float __value, float __sign) __attribute_const__;
long double copysignl(long double __value, long double __sign) __RENAME_LDBL(copysign, 3, 3) __attribute_const__;
-double nan(const char* __kind) __attribute_const__ __INTRODUCED_IN_ARM(13) __INTRODUCED_IN_MIPS(13) __INTRODUCED_IN_X86(9);
-float nanf(const char* __kind) __attribute_const__ __INTRODUCED_IN_ARM(13) __INTRODUCED_IN_MIPS(13) __INTRODUCED_IN_X86(9);
+double nan(const char* __kind) __attribute_const__;
+float nanf(const char* __kind) __attribute_const__;
long double nanl(const char* __kind) __RENAME_LDBL(nan, 13, 13) __attribute_const__;
double nextafter(double __x, double __y);
diff --git a/libc/include/netinet/ether.h b/libc/include/netinet/ether.h
index 6268a14..480063d 100644
--- a/libc/include/netinet/ether.h
+++ b/libc/include/netinet/ether.h
@@ -43,39 +43,31 @@
* representation of the given Ethernet address.
*
* Returns a pointer to a static buffer.
- *
- * Available since API level 11.
*/
-char* ether_ntoa(const struct ether_addr* __addr) __INTRODUCED_IN(11);
+char* ether_ntoa(const struct ether_addr* __addr);
/**
* [ether_ntoa_r(3)](http://man7.org/linux/man-pages/man3/ether_ntoa_r.3.html) returns a string
* representation of the given Ethernet address.
*
* Returns a pointer to the given buffer.
- *
- * Available since API level 11.
*/
-char* ether_ntoa_r(const struct ether_addr* __addr, char* __buf) __INTRODUCED_IN(11);
+char* ether_ntoa_r(const struct ether_addr* __addr, char* __buf);
/**
* [ether_aton(3)](http://man7.org/linux/man-pages/man3/ether_aton.3.html) returns an `ether_addr`
* corresponding to the given Ethernet address string.
*
* Returns a pointer to a static buffer, or NULL if the given string isn't a valid MAC address.
- *
- * Available since API level 11.
*/
-struct ether_addr* ether_aton(const char* __ascii) __INTRODUCED_IN(11);
+struct ether_addr* ether_aton(const char* __ascii);
/**
* [ether_aton_r(3)](http://man7.org/linux/man-pages/man3/ether_aton_r.3.html) returns an
* `ether_addr` corresponding to the given Ethernet address string.
*
* Returns a pointer to the given buffer, or NULL if the given string isn't a valid MAC address.
- *
- * Available since API level 11.
*/
-struct ether_addr* ether_aton_r(const char* __ascii, struct ether_addr* __addr) __INTRODUCED_IN(11);
+struct ether_addr* ether_aton_r(const char* __ascii, struct ether_addr* __addr);
__END_DECLS
diff --git a/libc/include/pthread.h b/libc/include/pthread.h
index 31509b4..b549871 100644
--- a/libc/include/pthread.h
+++ b/libc/include/pthread.h
@@ -92,7 +92,7 @@
#define PTHREAD_SCOPE_SYSTEM 0
#define PTHREAD_SCOPE_PROCESS 1
-int pthread_atfork(void (*__prepare)(void), void (*__parent)(void), void (*__child)(void)) __INTRODUCED_IN(12);
+int pthread_atfork(void (*__prepare)(void), void (*__parent)(void), void (*__child)(void));
int pthread_attr_destroy(pthread_attr_t* __attr);
int pthread_attr_getdetachstate(const pthread_attr_t* __attr, int* __state);
diff --git a/libc/include/pwd.h b/libc/include/pwd.h
index 5c516d7..d481aac 100644
--- a/libc/include/pwd.h
+++ b/libc/include/pwd.h
@@ -89,8 +89,8 @@
void setpwent(void) __INTRODUCED_IN(26);
void endpwent(void) __INTRODUCED_IN(26);
-int getpwnam_r(const char* __name, struct passwd* __pwd, char* __buf, size_t __n, struct passwd** __result) __INTRODUCED_IN(12);
-int getpwuid_r(uid_t __uid, struct passwd* __pwd, char* __buf, size_t __n, struct passwd** __result) __INTRODUCED_IN(12);
+int getpwnam_r(const char* __name, struct passwd* __pwd, char* __buf, size_t __n, struct passwd** __result);
+int getpwuid_r(uid_t __uid, struct passwd* __pwd, char* __buf, size_t __n, struct passwd** __result);
__END_DECLS
diff --git a/libc/include/sched.h b/libc/include/sched.h
index 1f50366..52a8ca6 100644
--- a/libc/include/sched.h
+++ b/libc/include/sched.h
@@ -56,7 +56,7 @@
int clone(int (*__fn)(void*), void* __child_stack, int __flags, void* __arg, ...)
__INTRODUCED_IN_ARM(9) __INTRODUCED_IN_MIPS(12) __INTRODUCED_IN_X86(17);
int unshare(int __flags) __INTRODUCED_IN(17);
-int sched_getcpu(void) __INTRODUCED_IN(12);
+int sched_getcpu(void);
int setns(int __fd, int __ns_type) __INTRODUCED_IN(21);
#ifdef __LP64__
@@ -74,8 +74,8 @@
__CPU_BITTYPE __bits[ CPU_SETSIZE / __CPU_BITS ];
} cpu_set_t;
-int sched_setaffinity(pid_t __pid, size_t __set_size, const cpu_set_t* __set) __INTRODUCED_IN(12);
-int sched_getaffinity(pid_t __pid, size_t __set_size, cpu_set_t* __set) __INTRODUCED_IN(12);
+int sched_setaffinity(pid_t __pid, size_t __set_size, const cpu_set_t* __set);
+int sched_getaffinity(pid_t __pid, size_t __set_size, cpu_set_t* __set);
#define CPU_ZERO(set) CPU_ZERO_S(sizeof(cpu_set_t), set)
#define CPU_SET(cpu, set) CPU_SET_S(cpu, sizeof(cpu_set_t), set)
@@ -98,8 +98,8 @@
#define CPU_ALLOC(count) __sched_cpualloc((count))
#define CPU_FREE(set) __sched_cpufree((set))
-cpu_set_t* __sched_cpualloc(size_t __count) __INTRODUCED_IN(12);
-void __sched_cpufree(cpu_set_t* __set) __INTRODUCED_IN(12);
+cpu_set_t* __sched_cpualloc(size_t __count);
+void __sched_cpufree(cpu_set_t* __set);
#define CPU_ZERO_S(setsize, set) __builtin_memset(set, 0, setsize)
@@ -143,7 +143,7 @@
#define CPU_COUNT_S(setsize, set) __sched_cpucount((setsize), (set))
-int __sched_cpucount(size_t __set_size, const cpu_set_t* __set) __INTRODUCED_IN(12);
+int __sched_cpucount(size_t __set_size, const cpu_set_t* __set);
#endif /* __USE_GNU */
diff --git a/libc/include/setjmp.h b/libc/include/setjmp.h
index 67d3c2f..b22071f 100644
--- a/libc/include/setjmp.h
+++ b/libc/include/setjmp.h
@@ -73,10 +73,8 @@
#define setjmp(__env) setjmp(__env)
-int sigsetjmp(sigjmp_buf __env, int __save_signal_mask) __returns_twice __INTRODUCED_IN_ARM(9)
- __INTRODUCED_IN_MIPS(12) __INTRODUCED_IN_X86(12);
-__noreturn void siglongjmp(sigjmp_buf __env, int __value) __INTRODUCED_IN_ARM(9)
- __INTRODUCED_IN_MIPS(12) __INTRODUCED_IN_X86(12);
+int sigsetjmp(sigjmp_buf __env, int __save_signal_mask);
+__noreturn void siglongjmp(sigjmp_buf __env, int __value);
__END_DECLS
diff --git a/libc/include/signal.h b/libc/include/signal.h
index c788ca6..cd11656 100644
--- a/libc/include/signal.h
+++ b/libc/include/signal.h
@@ -105,7 +105,7 @@
int raise(int __signal);
int kill(pid_t __pid, int __signal);
int killpg(int __pgrp, int __signal);
-int tgkill(int __tgid, int __tid, int __signal) __INTRODUCED_IN_32(16);
+int tgkill(int __tgid, int __tid, int __signal);
int sigaltstack(const stack_t* __new_signal_stack, stack_t* __old_signal_stack);
diff --git a/libc/include/sys/personality.h b/libc/include/sys/personality.h
index cea0bf8..9eb992f 100644
--- a/libc/include/sys/personality.h
+++ b/libc/include/sys/personality.h
@@ -43,9 +43,7 @@
* process' personality.
*
* Returns the previous persona on success, and returns -1 and sets `errno` on failure.
- *
- * Available since API level 15.
*/
-int personality(unsigned int __persona) __INTRODUCED_IN(15);
+int personality(unsigned int __persona);
__END_DECLS
diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h
index 84a5015..79113b6 100644
--- a/libc/include/sys/stat.h
+++ b/libc/include/sys/stat.h
@@ -185,8 +185,7 @@
#define UTIME_NOW ((1L << 30) - 1L)
#define UTIME_OMIT ((1L << 30) - 2L)
-int utimensat(int __dir_fd, const char* __path, const struct timespec __times[2], int __flags)
- __INTRODUCED_IN(12);
+int utimensat(int __dir_fd, const char* __path, const struct timespec __times[2], int __flags);
int futimens(int __dir_fd, const struct timespec __times[2]) __INTRODUCED_IN(19);
__END_DECLS
diff --git a/libc/include/sys/system_properties.h b/libc/include/sys/system_properties.h
index f469599..a2e1923 100644
--- a/libc/include/sys/system_properties.h
+++ b/libc/include/sys/system_properties.h
@@ -43,7 +43,7 @@
/*
* Sets system property `name` to `value`, creating the system property if it doesn't already exist.
*/
-int __system_property_set(const char* __name, const char* __value) __INTRODUCED_IN(12);
+int __system_property_set(const char* __name, const char* __value);
/*
* Returns a `prop_info` corresponding system property `name`, or nullptr if it doesn't exist.
diff --git a/libc/include/time.h b/libc/include/time.h
index 48c5efc..a7a6fe5 100644
--- a/libc/include/time.h
+++ b/libc/include/time.h
@@ -105,8 +105,8 @@
int timer_getoverrun(timer_t __timer);
/* Non-standard extensions that are in the BSDs and glibc. */
-time_t timelocal(struct tm* __tm) __INTRODUCED_IN(12);
-time_t timegm(struct tm* __tm) __INTRODUCED_IN(12);
+time_t timelocal(struct tm* __tm);
+time_t timegm(struct tm* __tm);
#define TIME_UTC 1
int timespec_get(struct timespec* __ts, int __base) __INTRODUCED_IN(29);
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index 9000407..9766b36 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -214,7 +214,7 @@
int rmdir(const char* __path);
int pipe(int __fds[2]);
#if defined(__USE_GNU)
-int pipe2(int __fds[2], int __flags) __INTRODUCED_IN(9);
+int pipe2(int __fds[2], int __flags);
#endif
int chroot(const char* __path);
int symlink(const char* __old_path, const char* __new_path);
@@ -242,7 +242,7 @@
int dup2(int __old_fd, int __new_fd);
int dup3(int __old_fd, int __new_fd, int __flags) __INTRODUCED_IN(21);
int fsync(int __fd);
-int fdatasync(int __fd) __INTRODUCED_IN(9);
+int fdatasync(int __fd);
/* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
#if defined(__USE_FILE_OFFSET64)
@@ -280,7 +280,7 @@
int isatty(int __fd);
char* ttyname(int __fd);
-int ttyname_r(int __fd, char* __buf, size_t __buf_size) __INTRODUCED_IN(8);
+int ttyname_r(int __fd, char* __buf, size_t __buf_size);
int acct(const char* __path);