Skip to content

Commit

Permalink
Merge "Remove the always-true __INTRODUCED_IN() annotations."
Browse files Browse the repository at this point in the history
  • Loading branch information
enh-google authored and Gerrit Code Review committed Jun 20, 2023
2 parents 90e2827 + 655e430 commit fee0b45
Show file tree
Hide file tree
Showing 52 changed files with 224 additions and 316 deletions.
5 changes: 1 addition & 4 deletions libc/include/android/dlext.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,8 @@ typedef struct {
* Opens the given library. The `__filename` and `__flags` arguments are
* the same as for [dlopen(3)](http://man7.org/linux/man-pages/man3/dlopen.3.html),
* with the Android-specific flags supplied via the `flags` member of `__info`.
*
* Available since API level 21.
*/
void* _Nullable android_dlopen_ext(const char* _Nullable __filename, int __flags, const android_dlextinfo* _Nullable __info)
__INTRODUCED_IN(21);
void* _Nullable android_dlopen_ext(const char* _Nullable __filename, int __flags, const android_dlextinfo* _Nullable __info);

__END_DECLS

Expand Down
4 changes: 1 addition & 3 deletions libc/include/android/set_abort_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ __BEGIN_DECLS
* This is meant for use by libraries that deliberately abort so that they can
* provide an explanation. It is used within bionic to implement assert() and
* all FORTIFY/fdsan aborts.
*
* Available since API level 21.
*/
void android_set_abort_message(const char* _Nullable __msg) __INTRODUCED_IN(21);
void android_set_abort_message(const char* _Nullable __msg);

__END_DECLS
8 changes: 4 additions & 4 deletions libc/include/arpa/inet.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ __BEGIN_DECLS

in_addr_t inet_addr(const char* _Nonnull __s);
int inet_aton(const char* _Nonnull __s, struct in_addr* _Nullable __addr);
in_addr_t inet_lnaof(struct in_addr __addr) __INTRODUCED_IN(21);
struct in_addr inet_makeaddr(in_addr_t __net, in_addr_t __host) __INTRODUCED_IN(21);
in_addr_t inet_netof(struct in_addr __addr) __INTRODUCED_IN(21);
in_addr_t inet_network(const char* _Nonnull __s) __INTRODUCED_IN(21);
in_addr_t inet_lnaof(struct in_addr __addr);
struct in_addr inet_makeaddr(in_addr_t __net, in_addr_t __host);
in_addr_t inet_netof(struct in_addr __addr);
in_addr_t inet_network(const char* _Nonnull __s);
char* _Nonnull inet_ntoa(struct in_addr __addr);
const char* _Nullable inet_ntop(int __af, const void* _Nonnull __src, char* _Nonnull __dst, socklen_t __size);
unsigned int inet_nsap_addr(const char* _Nonnull __ascii, unsigned char* _Nonnull __binary, int __n);
Expand Down
4 changes: 2 additions & 2 deletions libc/include/bits/fortify/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#error "Never include this file directly; instead, include <fcntl.h>"
#endif

int __open_2(const char* _Nonnull, int) __INTRODUCED_IN(17);
int __openat_2(int, const char* _Nonnull, int) __INTRODUCED_IN(17);
int __open_2(const char* _Nonnull, int);
int __openat_2(int, const char* _Nonnull, int);
/*
* These are the easiest way to call the real open even in clang FORTIFY.
*/
Expand Down
3 changes: 1 addition & 2 deletions libc/include/bits/fortify/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@

extern ssize_t __sendto_chk(int, const void* _Nonnull, size_t, size_t, int, const struct sockaddr* _Nullable,
socklen_t) __INTRODUCED_IN(26);
ssize_t __recvfrom_chk(int, void* _Nullable, size_t, size_t, int, struct sockaddr* _Nullable,
socklen_t* _Nullable) __INTRODUCED_IN(21);
ssize_t __recvfrom_chk(int, void* _Nullable, size_t, size_t, int, struct sockaddr* _Nullable, socklen_t* _Nullable);

#if defined(__BIONIC_FORTIFY)

Expand Down
2 changes: 1 addition & 1 deletion libc/include/bits/fortify/stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#pragma once

mode_t __umask_chk(mode_t) __INTRODUCED_IN(18);
mode_t __umask_chk(mode_t);
mode_t __umask_real(mode_t mode) __RENAME(umask);

#if defined(__BIONIC_FORTIFY)
Expand Down
2 changes: 1 addition & 1 deletion libc/include/bits/fortify/stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#error "Never include this file directly; instead, include <stdio.h>"
#endif

char* _Nullable __fgets_chk(char* _Nonnull, int, FILE* _Nonnull, size_t) __INTRODUCED_IN(17);
char* _Nullable __fgets_chk(char* _Nonnull, int, FILE* _Nonnull, size_t);
size_t __fread_chk(void* _Nonnull, size_t, size_t, FILE* _Nonnull, size_t) __INTRODUCED_IN(24);
size_t __fwrite_chk(const void* _Nonnull, size_t, size_t, FILE* _Nonnull, size_t) __INTRODUCED_IN(24);

Expand Down
8 changes: 4 additions & 4 deletions libc/include/bits/fortify/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@

void* _Nullable __memchr_chk(const void* _Nonnull, int, size_t, size_t) __INTRODUCED_IN(23);
void* _Nullable __memrchr_chk(const void* _Nonnull, int, size_t, size_t) __INTRODUCED_IN(23);
char* _Nonnull __stpncpy_chk2(char* _Nonnull, const char* _Nonnull, size_t, size_t, size_t) __INTRODUCED_IN(21);
char* _Nonnull __strncpy_chk2(char* _Nonnull, const char* _Nonnull, size_t, size_t, size_t) __INTRODUCED_IN(21);
size_t __strlcpy_chk(char* _Nonnull, const char* _Nonnull, size_t, size_t) __INTRODUCED_IN(17);
size_t __strlcat_chk(char* _Nonnull, const char* _Nonnull, size_t, size_t) __INTRODUCED_IN(17);
char* _Nonnull __stpncpy_chk2(char* _Nonnull, const char* _Nonnull, size_t, size_t, size_t);
char* _Nonnull __strncpy_chk2(char* _Nonnull, const char* _Nonnull, size_t, size_t, size_t);
size_t __strlcpy_chk(char* _Nonnull, const char* _Nonnull, size_t, size_t);
size_t __strlcat_chk(char* _Nonnull, const char* _Nonnull, size_t, size_t);

#if defined(__BIONIC_FORTIFY)
extern void* _Nullable __memrchr_real(const void* _Nonnull, int, size_t) __RENAME(memrchr);
Expand Down
2 changes: 1 addition & 1 deletion libc/include/bits/fortify/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ssize_t __pwrite_real(int, const void* _Nonnull, size_t, off_t) __RENAME(pwrite)
ssize_t __pwrite64_chk(int, const void* _Nonnull, size_t, off64_t, size_t) __INTRODUCED_IN(24);
ssize_t __pwrite64_real(int, const void* _Nonnull, size_t, off64_t) __RENAME(pwrite64);

ssize_t __read_chk(int, void* __BIONIC_COMPLICATED_NULLNESS, size_t, size_t) __INTRODUCED_IN(21);
ssize_t __read_chk(int, void* __BIONIC_COMPLICATED_NULLNESS, size_t, size_t);
ssize_t __write_chk(int, const void* __BIONIC_COMPLICATED_NULLNESS, size_t, size_t) __INTRODUCED_IN(24);
ssize_t __readlink_chk(const char* _Nonnull, char* _Nonnull, size_t, size_t) __INTRODUCED_IN(23);
ssize_t __readlinkat_chk(int dirfd, const char* _Nonnull, char* _Nonnull, size_t, size_t) __INTRODUCED_IN(23);
Expand Down
2 changes: 1 addition & 1 deletion libc/include/bits/wctype.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ typedef __WINT_TYPE__ wint_t;

int iswalnum(wint_t __wc);
int iswalpha(wint_t __wc);
int iswblank(wint_t __wc) __INTRODUCED_IN(21);
int iswblank(wint_t __wc);
int iswcntrl(wint_t __wc);
int iswdigit(wint_t __wc);
int iswgraph(wint_t __wc);
Expand Down
12 changes: 4 additions & 8 deletions libc/include/dirent.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ struct dirent* _Nullable readdir(DIR* _Nonnull __dir);
* or returns null and leaves `errno` unchanged at the end of the directory,
* or returns null and sets `errno` on failure.
*/
struct dirent64* _Nullable readdir64(DIR* _Nonnull __dir) __INTRODUCED_IN(21);
struct dirent64* _Nullable readdir64(DIR* _Nonnull __dir);

int readdir_r(DIR* _Nonnull __dir, struct dirent* _Nonnull __entry, struct dirent* _Nullable * _Nonnull __buffer) __attribute__((__deprecated__("readdir_r is deprecated; use readdir instead")));
int readdir64_r(DIR* _Nonnull __dir, struct dirent64* _Nonnull __entry, struct dirent64* _Nullable * _Nonnull __buffer) __INTRODUCED_IN(21) __attribute__((__deprecated__("readdir64_r is deprecated; use readdir64 instead")));
int readdir64_r(DIR* _Nonnull __dir, struct dirent64* _Nonnull __entry, struct dirent64* _Nullable * _Nonnull __buffer) __attribute__((__deprecated__("readdir64_r is deprecated; use readdir64 instead")));

/**
* [closedir(3)](http://man7.org/linux/man-pages/man3/closedir.3.html)
Expand Down Expand Up @@ -179,10 +179,8 @@ int alphasort(const struct dirent* _Nonnull * _Nonnull __lhs, const struct diren
/**
* [alphasort64](http://man7.org/linux/man-pages/man3/alphasort.3.html) is a
* comparator for use with scandir64() that uses strcmp().
*
* Available since API level 21.
*/
int alphasort64(const struct dirent64* _Nonnull * _Nonnull __lhs, const struct dirent64* _Nonnull * _Nonnull __rhs) __INTRODUCED_IN(21);
int alphasort64(const struct dirent64* _Nonnull * _Nonnull __lhs, const struct dirent64* _Nonnull * _Nonnull __rhs);

/**
* [scandir(3)](http://man7.org/linux/man-pages/man3/scandir.3.html)
Expand All @@ -205,10 +203,8 @@ int scandir(const char* _Nonnull __path, struct dirent* _Nonnull * _Nonnull * _N
*
* Returns the number of entries returned in the list on success,
* and returns -1 and sets `errno` on failure.
*
* Available since API level 21.
*/
int scandir64(const char* _Nonnull __path, struct dirent64* _Nonnull * _Nonnull * _Nonnull __name_list, int (* _Nullable __filter)(const struct dirent64* _Nonnull), int (* _Nullable __comparator)(const struct dirent64* _Nonnull * _Nonnull, const struct dirent64* _Nonnull * _Nonnull)) __INTRODUCED_IN(21);
int scandir64(const char* _Nonnull __path, struct dirent64* _Nonnull * _Nonnull * _Nonnull __name_list, int (* _Nullable __filter)(const struct dirent64* _Nonnull), int (* _Nullable __comparator)(const struct dirent64* _Nonnull * _Nonnull, const struct dirent64* _Nonnull * _Nonnull));

#if defined(__USE_GNU)

Expand Down
36 changes: 12 additions & 24 deletions libc/include/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ __BEGIN_DECLS
*/
int creat(const char* _Nonnull __path, mode_t __mode);
/** See creat(). */
int creat64(const char* _Nonnull __path, mode_t __mode) __INTRODUCED_IN(21);
int creat64(const char* _Nonnull __path, mode_t __mode);

/**
* [openat(2)](http://man7.org/linux/man-pages/man2/openat.2.html)
Expand All @@ -122,7 +122,7 @@ int creat64(const char* _Nonnull __path, mode_t __mode) __INTRODUCED_IN(21);
*/
int openat(int __dir_fd, const char* _Nonnull __path, int __flags, ...);
/** See openat(). */
int openat64(int __dir_fd, const char* _Nonnull __path, int __flags, ...) __INTRODUCED_IN(21);
int openat64(int __dir_fd, const char* _Nonnull __path, int __flags, ...);

/**
* [open(2)](http://man7.org/linux/man-pages/man2/open.2.html)
Expand All @@ -133,7 +133,7 @@ int openat64(int __dir_fd, const char* _Nonnull __path, int __flags, ...) __INTR
*/
int open(const char* _Nonnull __path, int __flags, ...);
/** See open(). */
int open64(const char* _Nonnull __path, int __flags, ...) __INTRODUCED_IN(21);
int open64(const char* _Nonnull __path, int __flags, ...);

/**
* [splice(2)](http://man7.org/linux/man-pages/man2/splice.2.html)
Expand All @@ -144,10 +144,8 @@ int open64(const char* _Nonnull __path, int __flags, ...) __INTRODUCED_IN(21);
*
* Returns the number of bytes spliced on success and returns -1 and sets
* `errno` on failure.
*
* Available since API level 21.
*/
ssize_t splice(int __in_fd, off64_t* __BIONIC_COMPLICATED_NULLNESS __in_offset, int __out_fd, off64_t* __BIONIC_COMPLICATED_NULLNESS __out_offset, size_t __length, unsigned int __flags) __INTRODUCED_IN(21);
ssize_t splice(int __in_fd, off64_t* __BIONIC_COMPLICATED_NULLNESS __in_offset, int __out_fd, off64_t* __BIONIC_COMPLICATED_NULLNESS __out_offset, size_t __length, unsigned int __flags);

/**
* [tee(2)](http://man7.org/linux/man-pages/man2/tee.2.html)
Expand All @@ -158,10 +156,8 @@ ssize_t splice(int __in_fd, off64_t* __BIONIC_COMPLICATED_NULLNESS __in_offset,
*
* Returns the number of bytes duplicated on success and returns -1 and sets
* `errno` on failure.
*
* Available since API level 21.
*/
ssize_t tee(int __in_fd, int __out_fd, size_t __length, unsigned int __flags) __INTRODUCED_IN(21);
ssize_t tee(int __in_fd, int __out_fd, size_t __length, unsigned int __flags);

/**
* [vmsplice(2)](http://man7.org/linux/man-pages/man2/vmsplice.2.html)
Expand All @@ -172,10 +168,8 @@ ssize_t tee(int __in_fd, int __out_fd, size_t __length, unsigned int __flags) __
*
* Returns the number of bytes spliced on success and returns -1 and sets
* `errno` on failure.
*
* Available since API level 21.
*/
ssize_t vmsplice(int __fd, const struct iovec* _Nonnull __iov, size_t __count, unsigned int __flags) __INTRODUCED_IN(21);
ssize_t vmsplice(int __fd, const struct iovec* _Nonnull __iov, size_t __count, unsigned int __flags);

/**
* [fallocate(2)](http://man7.org/linux/man-pages/man2/fallocate.2.html)
Expand All @@ -187,12 +181,10 @@ ssize_t vmsplice(int __fd, const struct iovec* _Nonnull __iov, size_t __count, u
* `FALLOC_FL_UNSHARE_RANGE`.
*
* Returns 0 on success and returns -1 and sets `errno` on failure.
*
* Available since API level 21.
*/
int fallocate(int __fd, int __mode, off_t __offset, off_t __length) __RENAME_IF_FILE_OFFSET64(fallocate64) __INTRODUCED_IN(21);
int fallocate(int __fd, int __mode, off_t __offset, off_t __length) __RENAME_IF_FILE_OFFSET64(fallocate64);
/** See fallocate(). */
int fallocate64(int __fd, int __mode, off64_t __offset, off64_t __length) __INTRODUCED_IN(21);
int fallocate64(int __fd, int __mode, off64_t __offset, off64_t __length);

/**
* [posix_fadvise(2)](http://man7.org/linux/man-pages/man2/posix_fadvise.2.html)
Expand All @@ -203,24 +195,20 @@ int fallocate64(int __fd, int __mode, off64_t __offset, off64_t __length) __INTR
* and `POSIX_FADV_NOREUSE`.
*
* Returns 0 on success and returns an error number on failure.
*
* Available since API level 21.
*/
int posix_fadvise(int __fd, off_t __offset, off_t __length, int __advice) __RENAME_IF_FILE_OFFSET64(posix_fadvise64) __INTRODUCED_IN(21);
int posix_fadvise(int __fd, off_t __offset, off_t __length, int __advice) __RENAME_IF_FILE_OFFSET64(posix_fadvise64);
/** See posix_fadvise(). */
int posix_fadvise64(int __fd, off64_t __offset, off64_t __length, int __advice) __INTRODUCED_IN(21);
int posix_fadvise64(int __fd, off64_t __offset, off64_t __length, int __advice);

/**
* [posix_fallocate(2)](http://man7.org/linux/man-pages/man2/posix_fallocate.2.html)
* allocates file space.
*
* Returns 0 on success and returns an error number on failure.
*
* Available since API level 21.
*/
int posix_fallocate(int __fd, off_t __offset, off_t __length) __RENAME_IF_FILE_OFFSET64(posix_fallocate64) __INTRODUCED_IN(21);
int posix_fallocate(int __fd, off_t __offset, off_t __length) __RENAME_IF_FILE_OFFSET64(posix_fallocate64);
/** See posix_fallocate(). */
int posix_fallocate64(int __fd, off64_t __offset, off64_t __length) __INTRODUCED_IN(21);
int posix_fallocate64(int __fd, off64_t __offset, off64_t __length);

#if defined(__USE_GNU)

Expand Down
15 changes: 5 additions & 10 deletions libc/include/fts.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,11 @@ typedef struct _ftsent {

__BEGIN_DECLS

/*
* Strictly these functions were available before Lollipop/21, but there was an accidental ABI
* breakage in 21 that means you can't write code that runs on current devices and pre-21 devices,
* so we break the tie in favor of current and future devices.
*/
FTSENT* _Nullable fts_children(FTS* _Nonnull __fts, int __options) __INTRODUCED_IN(21);
int fts_close(FTS* _Nonnull __fts) __INTRODUCED_IN(21);
FTS* _Nullable fts_open(char* _Nonnull const* _Nonnull __path, int __options, int (* _Nullable __comparator)(const FTSENT* _Nonnull * _Nonnull __lhs, const FTSENT* _Nonnull * _Nonnull __rhs)) __INTRODUCED_IN(21);
FTSENT* _Nullable fts_read(FTS* _Nonnull __fts) __INTRODUCED_IN(21);
int fts_set(FTS* _Nonnull __fts, FTSENT* _Nonnull __entry, int __options) __INTRODUCED_IN(21);
FTSENT* _Nullable fts_children(FTS* _Nonnull __fts, int __options);
int fts_close(FTS* _Nonnull __fts);
FTS* _Nullable fts_open(char* _Nonnull const* _Nonnull __path, int __options, int (* _Nullable __comparator)(const FTSENT* _Nonnull * _Nonnull __lhs, const FTSENT* _Nonnull * _Nonnull __rhs));
FTSENT* _Nullable fts_read(FTS* _Nonnull __fts);
int fts_set(FTS* _Nonnull __fts, FTSENT* _Nonnull __entry, int __options);

__END_DECLS

Expand Down
8 changes: 4 additions & 4 deletions libc/include/ftw.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ struct FTW {
};

__BEGIN_DECLS
int ftw(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat* _Nonnull, int), int __max_fd_count) __INTRODUCED_IN(17);
int nftw(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat* _Nonnull, int, struct FTW* _Nonnull), int __max_fd_count, int __flags) __INTRODUCED_IN(17);
int ftw64(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat64* _Nonnull, int), int __max_fd_count) __INTRODUCED_IN(21);
int nftw64(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat64* _Nonnull, int, struct FTW* _Nonnull), int __max_fd_count, int __flags) __INTRODUCED_IN(21);
int ftw(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat* _Nonnull, int), int __max_fd_count);
int nftw(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat* _Nonnull, int, struct FTW* _Nonnull), int __max_fd_count, int __flags);
int ftw64(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat64* _Nonnull, int), int __max_fd_count);
int nftw64(const char* _Nonnull __dir_path, int (* _Nonnull __callback)(const char* _Nonnull, const struct stat64* _Nonnull, int, struct FTW* _Nonnull), int __max_fd_count, int __flags);
__END_DECLS

#endif
8 changes: 4 additions & 4 deletions libc/include/inttypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,12 @@ typedef struct {
} imaxdiv_t;

__BEGIN_DECLS
intmax_t imaxabs(intmax_t __i) __attribute_const__ __INTRODUCED_IN(19);
imaxdiv_t imaxdiv(intmax_t __numerator, intmax_t __denominator) __attribute_const__ __INTRODUCED_IN(19);
intmax_t imaxabs(intmax_t __i) __attribute_const__;
imaxdiv_t imaxdiv(intmax_t __numerator, intmax_t __denominator) __attribute_const__;
intmax_t strtoimax(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, int __base);
uintmax_t strtoumax(const char* _Nonnull __s, char* _Nullable * _Nullable __end_ptr, int __base);
intmax_t wcstoimax(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, int __base) __INTRODUCED_IN(21);
uintmax_t wcstoumax(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, int __base) __INTRODUCED_IN(21);
intmax_t wcstoimax(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, int __base);
uintmax_t wcstoumax(const wchar_t* _Nonnull __s, wchar_t* _Nullable * _Nullable __end_ptr, int __base);
__END_DECLS

#endif
6 changes: 1 addition & 5 deletions libc/include/link.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ struct dl_phdr_info {
void* _Nullable dlpi_tls_data;
};

#if defined(__arm__)
int dl_iterate_phdr(int (* _Nonnull __callback)(struct dl_phdr_info* _Nonnull, size_t, void* _Nullable), void* _Nullable __data) __INTRODUCED_IN(21);
#else
int dl_iterate_phdr(int (* _Nonnull __callback)(struct dl_phdr_info* _Nonnull, size_t, void*_Nullable ), void* _Nullable __data);
#endif
int dl_iterate_phdr(int (* _Nonnull __callback)(struct dl_phdr_info* _Nonnull, size_t, void* _Nullable), void* _Nullable __data);

#ifdef __arm__
typedef uintptr_t _Unwind_Ptr;
Expand Down
8 changes: 4 additions & 4 deletions libc/include/locale.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ struct lconv {

struct lconv* _Nonnull localeconv(void) __INTRODUCED_IN_NO_GUARD_FOR_NDK(21);

locale_t _Nullable duplocale(locale_t _Nonnull __l) __INTRODUCED_IN(21);
void freelocale(locale_t _Nonnull __l) __INTRODUCED_IN(21);
locale_t _Nullable newlocale(int __category_mask, const char* _Nonnull __locale_name, locale_t _Nullable __base) __INTRODUCED_IN(21);
locale_t _Nullable duplocale(locale_t _Nonnull __l);
void freelocale(locale_t _Nonnull __l);
locale_t _Nullable newlocale(int __category_mask, const char* _Nonnull __locale_name, locale_t _Nullable __base);
char* _Nullable setlocale(int __category, const char* _Nullable __locale_name);
locale_t _Nullable uselocale(locale_t _Nullable __l) __INTRODUCED_IN(21);
locale_t _Nullable uselocale(locale_t _Nullable __l);

#define LC_GLOBAL_LOCALE __BIONIC_CAST(reinterpret_cast, locale_t, -1L)

Expand Down
4 changes: 1 addition & 3 deletions libc/include/malloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,8 @@ void* _Nullable memalign(size_t __alignment, size_t __byte_count) __mallocfunc _
/**
* [malloc_usable_size(3)](http://man7.org/linux/man-pages/man3/malloc_usable_size.3.html)
* returns the actual size of the given heap block.
*
* Available since API level 17.
*/
size_t malloc_usable_size(const void* _Nullable __ptr) __INTRODUCED_IN(17);
size_t malloc_usable_size(const void* _Nullable __ptr);

#define __MALLINFO_BODY \
/** Total number of non-mmapped bytes currently allocated from OS. */ \
Expand Down
8 changes: 4 additions & 4 deletions libc/include/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ double log1p(double __x);
float log1pf(float __x);
long double log1pl(long double __x);

double log2(double __x) __INTRODUCED_IN(18);
float log2f(float __x) __INTRODUCED_IN(18);
double log2(double __x);
float log2f(float __x);
long double log2l(long double __x);

double logb(double __x);
Expand Down Expand Up @@ -319,7 +319,7 @@ long double fmal(long double __x, long double __y, long double __z);
* to the std namespace, making it impossible to use both <cmath> (which gets
* included by a lot of other standard headers) and ::isnan.
*/
int (isinf)(double __x) __attribute_const__ __INTRODUCED_IN(21);
int (isinf)(double __x) __attribute_const__;
int (isnan)(double __x) __attribute_const__;

/* POSIX extensions. */
Expand Down Expand Up @@ -367,7 +367,7 @@ double gamma_r(double __x, int* _Nonnull __sign);
double lgamma_r(double __x, int* _Nonnull __sign);
double significand(double __x);
long double lgammal_r(long double __x, int* _Nonnull __sign) __INTRODUCED_IN(23);
long double significandl(long double __x) __INTRODUCED_IN(21);
long double significandl(long double __x);
float dremf(float __x, float __y);
int finitef(float __x) __attribute_const__;
float gammaf(float __x);
Expand Down

0 comments on commit fee0b45

Please sign in to comment.