Re-submit "Name function arguments in libc headers for Studio."
This reverts commit 9af9120091ceb96641d7c6c645fabad96db4bc0d (a revert
of 079bff4fa52b0c3c76057451cc9cdecf1827fce0), now the versioner bug is
fixed.
Bug: http://b/64613623 # header bug
Bug: http://b/64802958 # versioner bug
Change-Id: I1cb9d7832d4b3aecdc57a9285e2291443e59d02d
diff --git a/libc/include/arpa/inet.h b/libc/include/arpa/inet.h
index d137130..db054c9 100644
--- a/libc/include/arpa/inet.h
+++ b/libc/include/arpa/inet.h
@@ -36,18 +36,18 @@
__BEGIN_DECLS
-in_addr_t inet_addr(const char*);
-int inet_aton(const char*, struct in_addr*);
-in_addr_t inet_lnaof(struct in_addr) __INTRODUCED_IN(21);
-struct in_addr inet_makeaddr(in_addr_t, in_addr_t) __INTRODUCED_IN(21);
-in_addr_t inet_netof(struct in_addr) __INTRODUCED_IN(21);
-in_addr_t inet_network(const char*) __INTRODUCED_IN(21);
-char* inet_ntoa(struct in_addr);
-const char* inet_ntop(int, const void*, char*, socklen_t);
-unsigned int inet_nsap_addr(const char*, unsigned char*, int);
-char* inet_nsap_ntoa(int, const unsigned char*, char*);
-int inet_pton(int, const char*, void*);
+in_addr_t inet_addr(const char* __s);
+int inet_aton(const char* __s, struct in_addr* __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* __s) __INTRODUCED_IN(21);
+char* inet_ntoa(struct in_addr __addr);
+const char* inet_ntop(int __af, const void* __src, char* __dst, socklen_t __size);
+unsigned int inet_nsap_addr(const char* __ascii, unsigned char* __binary, int __n);
+char* inet_nsap_ntoa(int __binary_length, const unsigned char* __binary, char* __ascii);
+int inet_pton(int __af, const char* __src, void* __dst);
__END_DECLS
-#endif /* _ARPA_INET_H_ */
+#endif
diff --git a/libc/include/assert.h b/libc/include/assert.h
index 8c456ef..7a9d84d 100644
--- a/libc/include/assert.h
+++ b/libc/include/assert.h
@@ -60,6 +60,6 @@
#endif
__BEGIN_DECLS
-void __assert(const char*, int, const char*) __noreturn;
-void __assert2(const char*, int, const char*, const char*) __noreturn;
+void __assert(const char* __file, int __line, const char* __msg) __noreturn;
+void __assert2(const char* __file, int __line, const char* __function, const char* __msg) __noreturn;
__END_DECLS
diff --git a/libc/include/ctype.h b/libc/include/ctype.h
index 84dd5aa..df11cb1 100644
--- a/libc/include/ctype.h
+++ b/libc/include/ctype.h
@@ -61,45 +61,45 @@
extern const char* _ctype_;
-int isalnum(int);
-int isalpha(int);
-int isblank(int);
-int iscntrl(int);
-int isdigit(int);
-int isgraph(int);
-int islower(int);
-int isprint(int);
-int ispunct(int);
-int isspace(int);
-int isupper(int);
-int isxdigit(int);
-int tolower(int);
-int toupper(int);
+int isalnum(int __ch);
+int isalpha(int __ch);
+int isblank(int __ch);
+int iscntrl(int __ch);
+int isdigit(int __ch);
+int isgraph(int __ch);
+int islower(int __ch);
+int isprint(int __ch);
+int ispunct(int __ch);
+int isspace(int __ch);
+int isupper(int __ch);
+int isxdigit(int __ch);
+int tolower(int __ch);
+int toupper(int __ch);
#if __ANDROID_API__ >= __ANDROID_API_L__
-int isalnum_l(int, locale_t) __INTRODUCED_IN(21);
-int isalpha_l(int, locale_t) __INTRODUCED_IN(21);
-int isblank_l(int, locale_t) __INTRODUCED_IN(21);
-int iscntrl_l(int, locale_t) __INTRODUCED_IN(21);
-int isdigit_l(int, locale_t) __INTRODUCED_IN(21);
-int isgraph_l(int, locale_t) __INTRODUCED_IN(21);
-int islower_l(int, locale_t) __INTRODUCED_IN(21);
-int isprint_l(int, locale_t) __INTRODUCED_IN(21);
-int ispunct_l(int, locale_t) __INTRODUCED_IN(21);
-int isspace_l(int, locale_t) __INTRODUCED_IN(21);
-int isupper_l(int, locale_t) __INTRODUCED_IN(21);
-int isxdigit_l(int, locale_t) __INTRODUCED_IN(21);
-int tolower_l(int, locale_t) __INTRODUCED_IN(21);
-int toupper_l(int, locale_t) __INTRODUCED_IN(21);
+int isalnum_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isalpha_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isblank_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int iscntrl_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isdigit_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isgraph_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int islower_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isprint_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int ispunct_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isspace_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isupper_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int isxdigit_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int tolower_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
+int toupper_l(int __ch, locale_t __l) __INTRODUCED_IN(21);
#else
// Implemented as static inlines before 21.
#endif
-int isascii(int);
-int toascii(int);
-int _tolower(int) __INTRODUCED_IN(21);
-int _toupper(int) __INTRODUCED_IN(21);
+int isascii(int __ch);
+int toascii(int __ch);
+int _tolower(int __ch) __INTRODUCED_IN(21);
+int _toupper(int __ch) __INTRODUCED_IN(21);
__END_DECLS
-#endif /* !_CTYPE_H_ */
+#endif
diff --git a/libc/include/dirent.h b/libc/include/dirent.h
index ebcf085..7ac4ab7 100644
--- a/libc/include/dirent.h
+++ b/libc/include/dirent.h
@@ -76,30 +76,27 @@
typedef struct DIR DIR;
-DIR* opendir(const char*);
-DIR* fdopendir(int);
-struct dirent* readdir(DIR*);
-struct dirent64* readdir64(DIR*) __INTRODUCED_IN(21);
-int readdir_r(DIR*, struct dirent*, struct dirent**);
-int readdir64_r(DIR*, struct dirent64*, struct dirent64**) __INTRODUCED_IN(21);
-int closedir(DIR*);
-void rewinddir(DIR*);
-void seekdir(DIR*, long) __INTRODUCED_IN(23);
-long telldir(DIR*) __INTRODUCED_IN(23);
-int dirfd(DIR*);
-int alphasort(const struct dirent**, const struct dirent**);
-int alphasort64(const struct dirent64**, const struct dirent64**) __INTRODUCED_IN(21);
-int scandir64(const char*, struct dirent64***, int (*)(const struct dirent64*),
- int (*)(const struct dirent64**, const struct dirent64**)) __INTRODUCED_IN(21);
-int scandir(const char*, struct dirent***, int (*)(const struct dirent*), int (*)(const struct dirent**, const struct dirent**));
+DIR* opendir(const char* __path);
+DIR* fdopendir(int __dir_fd);
+struct dirent* readdir(DIR* __dir);
+struct dirent64* readdir64(DIR* __dir) __INTRODUCED_IN(21);
+int readdir_r(DIR* __dir, struct dirent* __entry, struct dirent** __buffer);
+int readdir64_r(DIR* __dir, struct dirent64* __entry, struct dirent64** __buffer) __INTRODUCED_IN(21);
+int closedir(DIR* __dir);
+void rewinddir(DIR* __dir);
+void seekdir(DIR* __dir, long __location) __INTRODUCED_IN(23);
+long telldir(DIR* __dir) __INTRODUCED_IN(23);
+int dirfd(DIR* __dir);
+int alphasort(const struct dirent** __lhs, const struct dirent** __rhs);
+int alphasort64(const struct dirent64** __lhs, const struct dirent64** __rhs) __INTRODUCED_IN(21);
+int scandir64(const char* __path, struct dirent64*** __name_list, int (*__filter)(const struct dirent64*), int (*__comparator)(const struct dirent64**, const struct dirent64**)) __INTRODUCED_IN(21);
+int scandir(const char* __path, struct dirent*** __name_list, int (*__filter)(const struct dirent*), int (*__comparator)(const struct dirent**, const struct dirent**));
#if defined(__USE_GNU)
-int scandirat64(int, const char*, struct dirent64***, int (*)(const struct dirent64*),
- int (*)(const struct dirent64**, const struct dirent64**)) __INTRODUCED_IN(24);
-int scandirat(int, const char*, struct dirent***, int (*)(const struct dirent*),
- int (*)(const struct dirent**, const struct dirent**)) __INTRODUCED_IN(24);
+int scandirat64(int __dir_fd, const char* __path, struct dirent64*** __name_list, int (*__filter)(const struct dirent64*), int (*__comparator)(const struct dirent64**, const struct dirent64**)) __INTRODUCED_IN(24);
+int scandirat(int __dir_fd, const char* __path, struct dirent*** __name_list, int (*__filter)(const struct dirent*), int (*__comparator)(const struct dirent**, const struct dirent**)) __INTRODUCED_IN(24);
#endif
__END_DECLS
-#endif /* _DIRENT_H_ */
+#endif
diff --git a/libc/include/dlfcn.h b/libc/include/dlfcn.h
index 76bbdb8..68d8bc9 100644
--- a/libc/include/dlfcn.h
+++ b/libc/include/dlfcn.h
@@ -45,12 +45,12 @@
void* dli_saddr;
} Dl_info;
-void* dlopen(const char* filename, int flag);
-int dlclose(void* handle);
+void* dlopen(const char* __filename, int __flag);
+int dlclose(void* __handle);
char* dlerror(void);
-void* dlsym(void* handle, const char* symbol);
-void* dlvsym(void* handle, const char* symbol, const char* version) __INTRODUCED_IN(24);
-int dladdr(const void* addr, Dl_info* info);
+void* dlsym(void* __handle, const char* __symbol);
+void* dlvsym(void* __handle, const char* __symbol, const char* __version) __INTRODUCED_IN(24);
+int dladdr(const void* __addr, Dl_info* __info);
#define RTLD_LOCAL 0
#define RTLD_LAZY 0x00001
@@ -77,4 +77,4 @@
__END_DECLS
-#endif /* __DLFCN_H */
+#endif
diff --git a/libc/include/err.h b/libc/include/err.h
index 7ee3608..a64d01d 100644
--- a/libc/include/err.h
+++ b/libc/include/err.h
@@ -41,18 +41,14 @@
__BEGIN_DECLS
-/* printf's format string isn't nullable; the err family's one is,
- * so we can't use __errlike here. */
-#define __errlike(x, y) __attribute__((__format__(printf, x, y)))
-
-__noreturn void err(int, const char *, ...) __errlike(2, 3);
-__noreturn void verr(int, const char *, va_list) __errlike(2, 0);
-__noreturn void errx(int, const char *, ...) __errlike(2, 3);
-__noreturn void verrx(int, const char *, va_list) __errlike(2, 0);
-void warn(const char *, ...) __errlike(1, 2);
-void vwarn(const char *, va_list) __errlike(1, 0);
-void warnx(const char *, ...) __errlike(1, 2);
-void vwarnx(const char *, va_list) __errlike(1, 0);
+__noreturn void err(int __status, const char* __fmt, ...) __printflike(2, 3);
+__noreturn void verr(int __status, const char* __fmt, va_list __args) __printflike(2, 0);
+__noreturn void errx(int __status, const char* __fmt, ...) __printflike(2, 3);
+__noreturn void verrx(int __status, const char* __fmt, va_list __args) __printflike(2, 0);
+void warn(const char* __fmt, ...) __printflike(1, 2);
+void vwarn(const char* __fmt, va_list __args) __printflike(1, 0);
+void warnx(const char* __fmt, ...) __printflike(1, 2);
+void vwarnx(const char* __fmt, va_list __args) __printflike(1, 0);
__END_DECLS
diff --git a/libc/include/error.h b/libc/include/error.h
index b145afc..d612994 100644
--- a/libc/include/error.h
+++ b/libc/include/error.h
@@ -37,8 +37,8 @@
extern unsigned int error_message_count __INTRODUCED_IN(23);
extern int error_one_per_line __INTRODUCED_IN(23);
-void error(int, int, const char*, ...) __printflike(3, 4) __INTRODUCED_IN(23);
-void error_at_line(int, int, const char*, unsigned int, const char*, ...)
+void error(int __status, int __errno, const char* __fmt, ...) __printflike(3, 4) __INTRODUCED_IN(23);
+void error_at_line(int __status, int __errno, const char* __filename, unsigned int __line_number, const char* __fmt, ...)
__printflike(5, 6) __INTRODUCED_IN(23);
__END_DECLS
diff --git a/libc/include/fcntl.h b/libc/include/fcntl.h
index cd52b45..4852f5f 100644
--- a/libc/include/fcntl.h
+++ b/libc/include/fcntl.h
@@ -69,26 +69,26 @@
#define SYNC_FILE_RANGE_WAIT_AFTER 4
#endif
-int creat(const char*, mode_t);
-int creat64(const char*, mode_t) __INTRODUCED_IN(21);
-int openat(int, const char*, int, ...) __overloadable __RENAME_CLANG(openat);
-int openat64(int, const char*, int, ...) __INTRODUCED_IN(21);
-int open(const char*, int, ...) __overloadable __RENAME_CLANG(open);
-int open64(const char*, int, ...) __INTRODUCED_IN(21);
-ssize_t splice(int, off64_t*, int, off64_t*, size_t, unsigned int) __INTRODUCED_IN(21);
-ssize_t tee(int, int, size_t, unsigned int) __INTRODUCED_IN(21);
-ssize_t vmsplice(int, const struct iovec*, size_t, unsigned int) __INTRODUCED_IN(21);
+int creat(const char* __path, mode_t __mode);
+int creat64(const char* __path, mode_t __mode) __INTRODUCED_IN(21);
+int openat(int __dir_fd, const char* __path, int __flags, ...) __overloadable __RENAME_CLANG(openat);
+int openat64(int __dir_fd, const char* __path, int __flags, ...) __INTRODUCED_IN(21);
+int open(const char* __path, int __flags, ...) __overloadable __RENAME_CLANG(open);
+int open64(const char* __path, int __flags, ...) __INTRODUCED_IN(21);
+ssize_t splice(int __in_fd, off64_t* __in_offset, int __out_fd, off64_t* __out_offset, size_t __length, unsigned int __flags) __INTRODUCED_IN(21);
+ssize_t tee(int __in_fd, int __out_fd, size_t __length, unsigned int __flags) __INTRODUCED_IN(21);
+ssize_t vmsplice(int __fd, const struct iovec* __iov, size_t __count, unsigned int __flags) __INTRODUCED_IN(21);
-int fallocate(int, int, off_t, off_t) __RENAME_IF_FILE_OFFSET64(fallocate64) __INTRODUCED_IN(21);
-int fallocate64(int, int, off64_t, off64_t) __INTRODUCED_IN(21);
-int posix_fadvise(int, off_t, off_t, int) __RENAME_IF_FILE_OFFSET64(posix_fadvise64) __INTRODUCED_IN(21);
-int posix_fadvise64(int, off64_t, off64_t, int) __INTRODUCED_IN(21);
-int posix_fallocate(int, off_t, off_t) __RENAME_IF_FILE_OFFSET64(posix_fallocate64) __INTRODUCED_IN(21);
-int posix_fallocate64(int, off64_t, off64_t) __INTRODUCED_IN(21);
+int fallocate(int __fd, int __mode, off_t __offset, off_t __length) __RENAME_IF_FILE_OFFSET64(fallocate64) __INTRODUCED_IN(21);
+int fallocate64(int __fd, int __mode, off64_t __offset, off64_t __length) __INTRODUCED_IN(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_fadvise64(int __fd, off64_t __offset, off64_t __length, int __advice) __INTRODUCED_IN(21);
+int posix_fallocate(int __fd, off_t __offset, off_t __length) __RENAME_IF_FILE_OFFSET64(posix_fallocate64) __INTRODUCED_IN(21);
+int posix_fallocate64(int __fd, off64_t __offset, off64_t __length) __INTRODUCED_IN(21);
#if defined(__USE_GNU)
-ssize_t readahead(int, off64_t, size_t) __INTRODUCED_IN(16);
-int sync_file_range(int, off64_t, off64_t, unsigned int) __INTRODUCED_IN(26);
+ssize_t readahead(int __fd, off64_t __offset, size_t __length) __INTRODUCED_IN(16);
+int sync_file_range(int __fd, off64_t __offset, off64_t __length, unsigned int __flags) __INTRODUCED_IN(26);
#endif
#if defined(__BIONIC_INCLUDE_FORTIFY_HEADERS)
@@ -97,4 +97,4 @@
__END_DECLS
-#endif /* _FCNTL_H */
+#endif
diff --git a/libc/include/fnmatch.h b/libc/include/fnmatch.h
index 1a5348b..3fcc665 100644
--- a/libc/include/fnmatch.h
+++ b/libc/include/fnmatch.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _FNMATCH_H
#define _FNMATCH_H
@@ -44,8 +45,8 @@
#define FNM_IGNORECASE FNM_CASEFOLD
#define FNM_FILE_NAME FNM_PATHNAME
-int fnmatch(const char* pattern, const char* string, int flags);
+int fnmatch(const char* __pattern, const char* __string, int __flags);
__END_DECLS
-#endif /* _FNMATCH_H */
+#endif
diff --git a/libc/include/ftw.h b/libc/include/ftw.h
index cb8ae7d..300f624 100644
--- a/libc/include/ftw.h
+++ b/libc/include/ftw.h
@@ -55,12 +55,12 @@
};
__BEGIN_DECLS
-int ftw(const char*, int (*)(const char*, const struct stat*, int), int) __INTRODUCED_IN(17);
-int nftw(const char*, int (*)(const char*, const struct stat*, int, struct FTW*), int, int)
+int ftw(const char* __dir_path, int (*__callback)(const char*, const struct stat*, int), int __max_fd_count) __INTRODUCED_IN(17);
+int nftw(const char* __dir_path, int (*__callback)(const char*, const struct stat*, int, struct FTW*), int __max_fd_count, int __flags)
__INTRODUCED_IN(17);
-int ftw64(const char*, int (*)(const char*, const struct stat64*, int), int) __INTRODUCED_IN(21);
-int nftw64(const char*, int (*)(const char*, const struct stat64*, int, struct FTW*), int, int)
+int ftw64(const char* __dir_path, int (*__callback)(const char*, const struct stat64*, int), int __max_fd_count) __INTRODUCED_IN(21);
+int nftw64(const char* __dir_path, int (*__callback)(const char*, const struct stat64*, int, struct FTW*), int __max_fd_count, int __flags)
__INTRODUCED_IN(21);
__END_DECLS
-#endif /* !_FTW_H */
+#endif
diff --git a/libc/include/getopt.h b/libc/include/getopt.h
index 46d2eb7..c5a6106 100644
--- a/libc/include/getopt.h
+++ b/libc/include/getopt.h
@@ -59,10 +59,8 @@
};
__BEGIN_DECLS
-int getopt_long(int, char * const *, const char *,
- const struct option *, int *);
-int getopt_long_only(int, char * const *, const char *,
- const struct option *, int *);
+int getopt_long(int __argc, char* const* __argv, const char* __options, const struct option* __long_options, int* __long_index);
+int getopt_long_only(int __argc, char* const* __argv, const char* __options, const struct option* __long_options, int* __long_index);
#ifndef _OPTRESET_DECLARED
#define _OPTRESET_DECLARED
@@ -70,4 +68,4 @@
#endif
__END_DECLS
-#endif /* !_GETOPT_H_ */
+#endif
diff --git a/libc/include/grp.h b/libc/include/grp.h
index b727562..9d67adf 100644
--- a/libc/include/grp.h
+++ b/libc/include/grp.h
@@ -47,19 +47,19 @@
__BEGIN_DECLS
-struct group* getgrgid(gid_t);
-struct group* getgrnam(const char*);
+struct group* getgrgid(gid_t __gid);
+struct group* getgrnam(const char* __name);
/* Note: Android has thousands and thousands of ids to iterate through. */
struct group* getgrent(void) __INTRODUCED_IN(26);
void setgrent(void) __INTRODUCED_IN(26);
void endgrent(void) __INTRODUCED_IN(26);
-int getgrgid_r(gid_t, struct group*, char*, size_t, struct group**) __INTRODUCED_IN(24);
-int getgrnam_r(const char*, struct group*, char*, size_t, struct group**) __INTRODUCED_IN(24);
-int getgrouplist (const char*, gid_t, gid_t*, int*);
-int initgroups (const char*, gid_t);
+int getgrgid_r(gid_t __gid, struct group* __group, char* __buf, size_t __n, struct group** __result) __INTRODUCED_IN(24);
+int getgrnam_r(const char* __name, struct group* __group, char* __buf, size_t __n, struct group** __result) __INTRODUCED_IN(24);
+int getgrouplist(const char* __user, gid_t __group, gid_t* __groups, int* __group_count);
+int initgroups(const char* __user, gid_t __group);
__END_DECLS
-#endif /* !_GRP_H_ */
+#endif
diff --git a/libc/include/ifaddrs.h b/libc/include/ifaddrs.h
index 083b27a..0e2b0ea 100644
--- a/libc/include/ifaddrs.h
+++ b/libc/include/ifaddrs.h
@@ -51,8 +51,8 @@
#define ifa_broadaddr ifa_ifu.ifu_broadaddr
#define ifa_dstaddr ifa_ifu.ifu_dstaddr
-void freeifaddrs(struct ifaddrs*) __INTRODUCED_IN(24);
-int getifaddrs(struct ifaddrs**) __INTRODUCED_IN(24);
+void freeifaddrs(struct ifaddrs* __ptr) __INTRODUCED_IN(24);
+int getifaddrs(struct ifaddrs** __list_ptr) __INTRODUCED_IN(24);
__END_DECLS
diff --git a/libc/include/inttypes.h b/libc/include/inttypes.h
index 43474df..7a409d8 100644
--- a/libc/include/inttypes.h
+++ b/libc/include/inttypes.h
@@ -255,12 +255,12 @@
} imaxdiv_t;
__BEGIN_DECLS
-intmax_t imaxabs(intmax_t) __attribute_const__ __INTRODUCED_IN(19);
-imaxdiv_t imaxdiv(intmax_t, intmax_t) __attribute_const__ __INTRODUCED_IN(19);
-intmax_t strtoimax(const char*, char**, int);
-uintmax_t strtoumax(const char*, char**, int);
-intmax_t wcstoimax(const wchar_t*, wchar_t**, int) __INTRODUCED_IN(21);
-uintmax_t wcstoumax(const wchar_t*, wchar_t**, int) __INTRODUCED_IN(21);
+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 strtoimax(const char* __s, char** __end_ptr, int __base);
+uintmax_t strtoumax(const char* __s, char** __end_ptr, int __base);
+intmax_t wcstoimax(const wchar_t* __s, wchar_t** __end_ptr, int __base) __INTRODUCED_IN(21);
+uintmax_t wcstoumax(const wchar_t* __s, wchar_t** __end_ptr, int __base) __INTRODUCED_IN(21);
__END_DECLS
-#endif /* _INTTYPES_H_ */
+#endif
diff --git a/libc/include/langinfo.h b/libc/include/langinfo.h
index c330117..d9d8c15 100644
--- a/libc/include/langinfo.h
+++ b/libc/include/langinfo.h
@@ -92,8 +92,8 @@
#define NOEXPR 54
#define CRNCYSTR 55
-char* nl_langinfo(nl_item) __INTRODUCED_IN(26);
-char* nl_langinfo_l(nl_item, locale_t) __INTRODUCED_IN(26);
+char* nl_langinfo(nl_item __item) __INTRODUCED_IN(26);
+char* nl_langinfo_l(nl_item __item, locale_t __l) __INTRODUCED_IN(26);
__END_DECLS
diff --git a/libc/include/libgen.h b/libc/include/libgen.h
index f864ee1..5fa9089 100644
--- a/libc/include/libgen.h
+++ b/libc/include/libgen.h
@@ -32,7 +32,6 @@
#include <sys/cdefs.h>
#include <sys/types.h>
-
__BEGIN_DECLS
/*
@@ -42,19 +41,19 @@
* Note that this has the wrong argument cv-qualifiers, but doesn't modify its
* input and uses thread-local storage for the result if necessary.
*/
-char* __posix_basename(const char*) __RENAME(basename);
+char* __posix_basename(const char* __path) __RENAME(basename);
#define basename __posix_basename
/* This has the wrong argument cv-qualifiers, but doesn't modify its input and uses thread-local storage for the result if necessary. */
-char* dirname(const char*);
+char* dirname(const char* __path);
#if !defined(__LP64__)
/* These non-standard functions are not needed on Android; basename and dirname use thread-local storage. */
-int dirname_r(const char*, char*, size_t);
-int basename_r(const char*, char*, size_t);
+int dirname_r(const char* __path, char* __buf, size_t __n);
+int basename_r(const char* __path, char* __buf, size_t __n);
#endif
__END_DECLS
-#endif /* _LIBGEN_H */
+#endif
diff --git a/libc/include/link.h b/libc/include/link.h
index dd3b99f..072f093 100644
--- a/libc/include/link.h
+++ b/libc/include/link.h
@@ -50,9 +50,9 @@
};
#if defined(__arm__)
-int dl_iterate_phdr(int (*)(struct dl_phdr_info*, size_t, void*), void*) __INTRODUCED_IN(21);
+int dl_iterate_phdr(int (*__callback)(struct dl_phdr_info*, size_t, void*), void* __data) __INTRODUCED_IN(21);
#else
-int dl_iterate_phdr(int (*)(struct dl_phdr_info*, size_t, void*), void*);
+int dl_iterate_phdr(int (*__callback)(struct dl_phdr_info*, size_t, void*), void* __data);
#endif
#ifdef __arm__
@@ -84,4 +84,4 @@
__END_DECLS
-#endif /* _LINK_H_ */
+#endif
diff --git a/libc/include/locale.h b/libc/include/locale.h
index c1b6299..4290992 100644
--- a/libc/include/locale.h
+++ b/libc/include/locale.h
@@ -98,14 +98,14 @@
struct lconv* localeconv(void) __INTRODUCED_IN(21) __VERSIONER_NO_GUARD;
-locale_t duplocale(locale_t) __INTRODUCED_IN(21);
-void freelocale(locale_t) __INTRODUCED_IN(21);
-locale_t newlocale(int, const char*, locale_t) __INTRODUCED_IN(21);
-char* setlocale(int, const char*);
-locale_t uselocale(locale_t) __INTRODUCED_IN(21);
+locale_t duplocale(locale_t __l) __INTRODUCED_IN(21);
+void freelocale(locale_t __l) __INTRODUCED_IN(21);
+locale_t newlocale(int __category_mask, const char* __locale_name, locale_t __base) __INTRODUCED_IN(21);
+char* setlocale(int __category, const char* __locale_name);
+locale_t uselocale(locale_t __l) __INTRODUCED_IN(21);
#define LC_GLOBAL_LOCALE __BIONIC_CAST(reinterpret_cast, locale_t, -1L)
__END_DECLS
-#endif /* _LOCALE_H_ */
+#endif
diff --git a/libc/include/mntent.h b/libc/include/mntent.h
index 551a085..d5987dc 100644
--- a/libc/include/mntent.h
+++ b/libc/include/mntent.h
@@ -57,11 +57,11 @@
__BEGIN_DECLS
-int endmntent(FILE*) __INTRODUCED_IN(21);
-struct mntent* getmntent(FILE*);
-struct mntent* getmntent_r(FILE*, struct mntent*, char*, int) __INTRODUCED_IN(21);
-FILE* setmntent(const char*, const char*) __INTRODUCED_IN(21);
-char* hasmntopt(const struct mntent*, const char*) __INTRODUCED_IN(26);
+int endmntent(FILE* __fp) __INTRODUCED_IN(21);
+struct mntent* getmntent(FILE* __fp);
+struct mntent* getmntent_r(FILE* __fp, struct mntent* __entry, char* __buf, int __size) __INTRODUCED_IN(21);
+FILE* setmntent(const char* __filename, const char* __type) __INTRODUCED_IN(21);
+char* hasmntopt(const struct mntent* __entry, const char* __option) __INTRODUCED_IN(26);
__END_DECLS
diff --git a/libc/include/net/if.h b/libc/include/net/if.h
index eac7699..f261f71 100644
--- a/libc/include/net/if.h
+++ b/libc/include/net/if.h
@@ -44,10 +44,10 @@
char* if_name;
};
-char* if_indextoname(unsigned, char*);
-unsigned if_nametoindex(const char*);
+char* if_indextoname(unsigned __index, char* __buf);
+unsigned if_nametoindex(const char* __name);
struct if_nameindex* if_nameindex(void) __INTRODUCED_IN(24);
-void if_freenameindex(struct if_nameindex*) __INTRODUCED_IN(24);
+void if_freenameindex(struct if_nameindex* __ptr) __INTRODUCED_IN(24);
__END_DECLS
diff --git a/libc/include/netdb.h b/libc/include/netdb.h
index 816acc5..66ec8e3 100644
--- a/libc/include/netdb.h
+++ b/libc/include/netdb.h
@@ -196,37 +196,33 @@
__BEGIN_DECLS
-/* BIONIC-BEGIN */
-#define h_errno (*__get_h_errno())
-int* __get_h_errno(void);
-/* BIONIC-END */
+#define h_errno (*__get_h_errno())
+int* __get_h_errno(void);
void endservent(void);
-struct hostent* gethostbyaddr(const void*, socklen_t, int);
-int gethostbyaddr_r(const void*, socklen_t, int, struct hostent*, char*, size_t, struct hostent**,
- int*) __INTRODUCED_IN(23);
-struct hostent* gethostbyname(const char*);
-int gethostbyname_r(const char*, struct hostent*, char*, size_t, struct hostent**, int*);
-struct hostent* gethostbyname2(const char*, int);
-int gethostbyname2_r(const char*, int, struct hostent*, char*, size_t, struct hostent**, int*)
- __INTRODUCED_IN(23);
+struct hostent* gethostbyaddr(const void* __addr, socklen_t __length, int __type);
+int gethostbyaddr_r(const void* __addr, socklen_t __length, int __type, struct hostent* __ret, char* __buf, size_t __buf_size, struct hostent** __result, int* __h_errno_ptr) __INTRODUCED_IN(23);
+struct hostent* gethostbyname(const char* __name);
+int gethostbyname_r(const char* __name, struct hostent* __ret, char* __buf, size_t __buf_size, struct hostent** __result, int* __h_errno_ptr);
+struct hostent* gethostbyname2(const char* __name, int __af);
+int gethostbyname2_r(const char* __name, int __af, struct hostent* __ret, char* __buf, size_t __buf_size, struct hostent** __result, int* __h_errno_ptr) __INTRODUCED_IN(23);
struct hostent* gethostent(void);
-struct netent* getnetbyaddr(uint32_t, int);
-struct netent* getnetbyname(const char*);
-struct protoent* getprotobyname(const char*);
-struct protoent* getprotobynumber(int);
-struct servent* getservbyname(const char*, const char*);
-struct servent* getservbyport(int, const char*);
+struct netent* getnetbyaddr(uint32_t __net, int __type);
+struct netent* getnetbyname(const char* __name);
+struct protoent* getprotobyname(const char* __name);
+struct protoent* getprotobynumber(int __proto);
+struct servent* getservbyname(const char* __name, const char* __proto);
+struct servent* getservbyport(int __port, const char* __proto);
struct servent* getservent(void);
-void herror(const char*);
-const char* hstrerror(int);
+void herror(const char* __s);
+const char* hstrerror(int __error);
-int getaddrinfo(const char*, const char*, const struct addrinfo*, struct addrinfo**);
+int getaddrinfo(const char* __node, const char* __service, const struct addrinfo* __hints, struct addrinfo** __result);
/* POSIX getnameinfo uses socklen_t, not size_t, but LP64 sizeof(socklen_t) != sizeof(size_t). */
-int getnameinfo(const struct sockaddr*, socklen_t, char*, size_t, char*, size_t, int);
-void freeaddrinfo(struct addrinfo*);
-const char* gai_strerror(int);
-void setservent(int);
+int getnameinfo(const struct sockaddr* __sa, socklen_t __sa_length, char* __host, size_t __host_length, char* __service, size_t __service_length, int __flags);
+void freeaddrinfo(struct addrinfo* __ptr);
+const char* gai_strerror(int __error);
+void setservent(int __stay_open);
__END_DECLS
-#endif /* !_NETDB_H_ */
+#endif
diff --git a/libc/include/nl_types.h b/libc/include/nl_types.h
index d478353..b25b7a3 100644
--- a/libc/include/nl_types.h
+++ b/libc/include/nl_types.h
@@ -39,9 +39,9 @@
typedef void* nl_catd;
typedef int nl_item;
-nl_catd catopen(const char*, int) __INTRODUCED_IN(26);
-char* catgets(nl_catd, int, int, const char*) __INTRODUCED_IN(26);
-int catclose(nl_catd) __INTRODUCED_IN(26);
+nl_catd catopen(const char* __name, int __flag) __INTRODUCED_IN(26);
+char* catgets(nl_catd __catalog, int __set_number, int __msg_number, const char* __msg) __INTRODUCED_IN(26);
+int catclose(nl_catd __catalog) __INTRODUCED_IN(26);
__END_DECLS
diff --git a/libc/include/poll.h b/libc/include/poll.h
index 0f5758d..8517dc6 100644
--- a/libc/include/poll.h
+++ b/libc/include/poll.h
@@ -38,9 +38,8 @@
typedef unsigned int nfds_t;
-int poll(struct pollfd*, nfds_t, int) __overloadable __RENAME_CLANG(poll);
-int ppoll(struct pollfd*, nfds_t, const struct timespec*, const sigset_t*)
- __overloadable __RENAME_CLANG(ppoll) __INTRODUCED_IN(21);
+int poll(struct pollfd* __fds, nfds_t __count, int __timeout_ms) __overloadable __RENAME_CLANG(poll);
+int ppoll(struct pollfd* __fds, nfds_t __count, const struct timespec* __timeout, const sigset_t* __mask) __overloadable __RENAME_CLANG(ppoll) __INTRODUCED_IN(21);
#if defined(__BIONIC_INCLUDE_FORTIFY_HEADERS)
#include <bits/fortify/poll.h>
@@ -48,4 +47,4 @@
__END_DECLS
-#endif /* _POLL_H_ */
+#endif
diff --git a/libc/include/pthread.h b/libc/include/pthread.h
index ccafd78..32315fe 100644
--- a/libc/include/pthread.h
+++ b/libc/include/pthread.h
@@ -39,14 +39,14 @@
__BEGIN_DECLS
enum {
- PTHREAD_MUTEX_NORMAL = 0,
- PTHREAD_MUTEX_RECURSIVE = 1,
- PTHREAD_MUTEX_ERRORCHECK = 2,
+ PTHREAD_MUTEX_NORMAL = 0,
+ PTHREAD_MUTEX_RECURSIVE = 1,
+ PTHREAD_MUTEX_ERRORCHECK = 2,
- PTHREAD_MUTEX_ERRORCHECK_NP = PTHREAD_MUTEX_ERRORCHECK,
- PTHREAD_MUTEX_RECURSIVE_NP = PTHREAD_MUTEX_RECURSIVE,
+ PTHREAD_MUTEX_ERRORCHECK_NP = PTHREAD_MUTEX_ERRORCHECK,
+ PTHREAD_MUTEX_RECURSIVE_NP = PTHREAD_MUTEX_RECURSIVE,
- PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
+ PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
};
#define PTHREAD_MUTEX_INITIALIZER { { ((PTHREAD_MUTEX_NORMAL & 3) << 14) } }
@@ -83,74 +83,74 @@
#define PTHREAD_SCOPE_SYSTEM 0
#define PTHREAD_SCOPE_PROCESS 1
-int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)) __INTRODUCED_IN(12);
+int pthread_atfork(void (*__prepare)(void), void (*__parent)(void), void (*__child)(void)) __INTRODUCED_IN(12);
-int pthread_attr_destroy(pthread_attr_t*);
-int pthread_attr_getdetachstate(const pthread_attr_t*, int*);
-int pthread_attr_getguardsize(const pthread_attr_t*, size_t*);
-int pthread_attr_getschedparam(const pthread_attr_t*, struct sched_param*);
-int pthread_attr_getschedpolicy(const pthread_attr_t*, int*);
-int pthread_attr_getscope(const pthread_attr_t*, int*);
-int pthread_attr_getstack(const pthread_attr_t*, void**, size_t*);
-int pthread_attr_getstacksize(const pthread_attr_t*, size_t*);
-int pthread_attr_init(pthread_attr_t*);
-int pthread_attr_setdetachstate(pthread_attr_t*, int);
-int pthread_attr_setguardsize(pthread_attr_t*, size_t);
-int pthread_attr_setschedparam(pthread_attr_t*, const struct sched_param*);
-int pthread_attr_setschedpolicy(pthread_attr_t*, int);
-int pthread_attr_setscope(pthread_attr_t*, int);
-int pthread_attr_setstack(pthread_attr_t*, void*, size_t);
-int pthread_attr_setstacksize(pthread_attr_t*, size_t);
+int pthread_attr_destroy(pthread_attr_t* __attr);
+int pthread_attr_getdetachstate(const pthread_attr_t* __attr, int* __state);
+int pthread_attr_getguardsize(const pthread_attr_t* __attr, size_t* __size);
+int pthread_attr_getschedparam(const pthread_attr_t* __attr, struct sched_param* __param);
+int pthread_attr_getschedpolicy(const pthread_attr_t* __attr, int* __policy);
+int pthread_attr_getscope(const pthread_attr_t* __attr, int* __scope);
+int pthread_attr_getstack(const pthread_attr_t* __attr, void** __addr, size_t* __size);
+int pthread_attr_getstacksize(const pthread_attr_t* __attr, size_t* __size);
+int pthread_attr_init(pthread_attr_t* __attr);
+int pthread_attr_setdetachstate(pthread_attr_t* __attr, int __state);
+int pthread_attr_setguardsize(pthread_attr_t* __attr, size_t __size);
+int pthread_attr_setschedparam(pthread_attr_t* __attr, const struct sched_param* __param);
+int pthread_attr_setschedpolicy(pthread_attr_t* __attr, int __policy);
+int pthread_attr_setscope(pthread_attr_t* __attr, int __scope);
+int pthread_attr_setstack(pthread_attr_t* __attr, void* __addr, size_t __size);
+int pthread_attr_setstacksize(pthread_attr_t* __addr, size_t __size);
-int pthread_condattr_destroy(pthread_condattr_t*);
-int pthread_condattr_getclock(const pthread_condattr_t*, clockid_t*) __INTRODUCED_IN(21);
-int pthread_condattr_getpshared(const pthread_condattr_t*, int*);
-int pthread_condattr_init(pthread_condattr_t*);
-int pthread_condattr_setclock(pthread_condattr_t*, clockid_t) __INTRODUCED_IN(21);
-int pthread_condattr_setpshared(pthread_condattr_t*, int);
+int pthread_condattr_destroy(pthread_condattr_t* __attr);
+int pthread_condattr_getclock(const pthread_condattr_t* __attr, clockid_t* __clock) __INTRODUCED_IN(21);
+int pthread_condattr_getpshared(const pthread_condattr_t* __attr, int* __shared);
+int pthread_condattr_init(pthread_condattr_t* __attr);
+int pthread_condattr_setclock(pthread_condattr_t* __attr, clockid_t __clock) __INTRODUCED_IN(21);
+int pthread_condattr_setpshared(pthread_condattr_t* __attr, int __shared);
-int pthread_cond_broadcast(pthread_cond_t*);
-int pthread_cond_destroy(pthread_cond_t*);
-int pthread_cond_init(pthread_cond_t*, const pthread_condattr_t*);
-int pthread_cond_signal(pthread_cond_t*);
-int pthread_cond_timedwait(pthread_cond_t*, pthread_mutex_t*, const struct timespec*);
-int pthread_cond_wait(pthread_cond_t*, pthread_mutex_t*);
+int pthread_cond_broadcast(pthread_cond_t* __cond);
+int pthread_cond_destroy(pthread_cond_t* __cond);
+int pthread_cond_init(pthread_cond_t* __cond, const pthread_condattr_t* __attr);
+int pthread_cond_signal(pthread_cond_t* __cond);
+int pthread_cond_timedwait(pthread_cond_t* __cond, pthread_mutex_t* __mutex, const struct timespec* __timeout);
+int pthread_cond_wait(pthread_cond_t* __cond, pthread_mutex_t* __mutex);
-int pthread_create(pthread_t*, pthread_attr_t const*, void* (*start_routine)(void*), void*);
-int pthread_detach(pthread_t);
-void pthread_exit(void*) __noreturn;
+int pthread_create(pthread_t* __pthread_ptr, pthread_attr_t const* __attr, void* (*__start_routine)(void*), void*);
+int pthread_detach(pthread_t __pthread);
+void pthread_exit(void* __return_value) __noreturn;
-int pthread_equal(pthread_t, pthread_t);
+int pthread_equal(pthread_t __lhs, pthread_t __rhs);
-int pthread_getattr_np(pthread_t, pthread_attr_t*);
+int pthread_getattr_np(pthread_t __pthread, pthread_attr_t* __attr);
-int pthread_getcpuclockid(pthread_t, clockid_t*);
+int pthread_getcpuclockid(pthread_t __pthread, clockid_t* __clock);
-int pthread_getschedparam(pthread_t, int*, struct sched_param*);
+int pthread_getschedparam(pthread_t __pthread, int* __policy, struct sched_param* __param);
-void* pthread_getspecific(pthread_key_t);
+void* pthread_getspecific(pthread_key_t __key);
-pid_t pthread_gettid_np(pthread_t) __INTRODUCED_IN(21);
+pid_t pthread_gettid_np(pthread_t __pthread) __INTRODUCED_IN(21);
-int pthread_join(pthread_t, void**);
+int pthread_join(pthread_t __pthread, void** __return_value_ptr);
-int pthread_key_create(pthread_key_t*, void (*)(void*));
-int pthread_key_delete(pthread_key_t);
+int pthread_key_create(pthread_key_t* __key_ptr, void (*__key_destructor)(void*));
+int pthread_key_delete(pthread_key_t __key);
-int pthread_mutexattr_destroy(pthread_mutexattr_t*);
-int pthread_mutexattr_getpshared(const pthread_mutexattr_t*, int*);
-int pthread_mutexattr_gettype(const pthread_mutexattr_t*, int*);
-int pthread_mutexattr_init(pthread_mutexattr_t*);
-int pthread_mutexattr_setpshared(pthread_mutexattr_t*, int);
-int pthread_mutexattr_settype(pthread_mutexattr_t*, int);
+int pthread_mutexattr_destroy(pthread_mutexattr_t* __attr);
+int pthread_mutexattr_getpshared(const pthread_mutexattr_t* __attr, int* __shared);
+int pthread_mutexattr_gettype(const pthread_mutexattr_t* __attr, int* __type);
+int pthread_mutexattr_init(pthread_mutexattr_t* __attr);
+int pthread_mutexattr_setpshared(pthread_mutexattr_t* __attr, int __shared);
+int pthread_mutexattr_settype(pthread_mutexattr_t* __attr, int __type);
-int pthread_mutex_destroy(pthread_mutex_t*);
-int pthread_mutex_init(pthread_mutex_t*, const pthread_mutexattr_t*);
-int pthread_mutex_lock(pthread_mutex_t*);
-int pthread_mutex_timedlock(pthread_mutex_t*, const struct timespec* )
+int pthread_mutex_destroy(pthread_mutex_t* __mutex);
+int pthread_mutex_init(pthread_mutex_t* __mutex, const pthread_mutexattr_t* __attr);
+int pthread_mutex_lock(pthread_mutex_t* __mutex);
+int pthread_mutex_timedlock(pthread_mutex_t* __mutex, const struct timespec* __timeout)
__INTRODUCED_IN(21);
-int pthread_mutex_trylock(pthread_mutex_t*);
-int pthread_mutex_unlock(pthread_mutex_t*);
+int pthread_mutex_trylock(pthread_mutex_t* __mutex);
+int pthread_mutex_unlock(pthread_mutex_t* __mutex);
#if __ANDROID_API__ < 21
/*
@@ -164,68 +164,64 @@
* * https://github.com/android-ndk/ndk/issues/423
* * https://stackoverflow.com/q/44580542/632035
*/
-int pthread_mutex_lock_timeout_np(pthread_mutex_t* mutex, unsigned msecs);
-int pthread_cond_timeout_np(pthread_cond_t* cond, pthread_mutex_t* mutex, unsigned msecs);
-int pthread_cond_timedwait_monotonic_np(pthread_cond_t*, pthread_mutex_t*, const struct timespec*);
-int pthread_cond_timedwait_relative_np(pthread_cond_t* cond, pthread_mutex_t* mutex,
- const struct timespec* reltime);
+int pthread_mutex_lock_timeout_np(pthread_mutex_t* __mutex, unsigned __timeout_ms);
+int pthread_cond_timeout_np(pthread_cond_t* __cond, pthread_mutex_t* __mutex, unsigned __timeout_ms);
+int pthread_cond_timedwait_monotonic_np(pthread_cond_t* __cond, pthread_mutex_t* __mutex, const struct timespec* __timeout);
+int pthread_cond_timedwait_relative_np(pthread_cond_t* __cond, pthread_mutex_t* __mutex, const struct timespec* __relative_timeout);
#endif
-int pthread_once(pthread_once_t*, void (*init_routine)(void));
+int pthread_once(pthread_once_t* __once, void (*__init_routine)(void));
-int pthread_rwlockattr_init(pthread_rwlockattr_t*);
-int pthread_rwlockattr_destroy(pthread_rwlockattr_t*);
-int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t*, int*);
-int pthread_rwlockattr_setpshared(pthread_rwlockattr_t*, int);
-int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t*, int*)
+int pthread_rwlockattr_init(pthread_rwlockattr_t* __attr);
+int pthread_rwlockattr_destroy(pthread_rwlockattr_t* __attr);
+int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t* __attr, int* __shared);
+int pthread_rwlockattr_setpshared(pthread_rwlockattr_t* __attr, int __shared);
+int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t* __attr, int* __kind)
__INTRODUCED_IN(23);
-int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t*, int) __INTRODUCED_IN(23);
+int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t* __attr, int __kind) __INTRODUCED_IN(23);
-int pthread_rwlock_destroy(pthread_rwlock_t*);
-int pthread_rwlock_init(pthread_rwlock_t*, const pthread_rwlockattr_t*);
-int pthread_rwlock_rdlock(pthread_rwlock_t*);
-int pthread_rwlock_timedrdlock(pthread_rwlock_t*, const struct timespec*);
-int pthread_rwlock_timedwrlock(pthread_rwlock_t*, const struct timespec*);
-int pthread_rwlock_tryrdlock(pthread_rwlock_t*);
-int pthread_rwlock_trywrlock(pthread_rwlock_t*);
-int pthread_rwlock_unlock(pthread_rwlock_t*);
-int pthread_rwlock_wrlock(pthread_rwlock_t*);
+int pthread_rwlock_destroy(pthread_rwlock_t* __rwlock);
+int pthread_rwlock_init(pthread_rwlock_t* __rwlock, const pthread_rwlockattr_t* __attr);
+int pthread_rwlock_rdlock(pthread_rwlock_t* __rwlock);
+int pthread_rwlock_timedrdlock(pthread_rwlock_t* __rwlock, const struct timespec* __timeout);
+int pthread_rwlock_timedwrlock(pthread_rwlock_t* __rwlock, const struct timespec* __timeout);
+int pthread_rwlock_tryrdlock(pthread_rwlock_t* __rwlock);
+int pthread_rwlock_trywrlock(pthread_rwlock_t* __rwlock);
+int pthread_rwlock_unlock(pthread_rwlock_t* __rwlock);
+int pthread_rwlock_wrlock(pthread_rwlock_t* __rwlock);
#if __ANDROID_API__ >= __ANDROID_API_N__
-int pthread_barrierattr_init(pthread_barrierattr_t* attr) __INTRODUCED_IN(24);
-int pthread_barrierattr_destroy(pthread_barrierattr_t* attr) __INTRODUCED_IN(24);
-int pthread_barrierattr_getpshared(const pthread_barrierattr_t* attr,
- int* pshared) __INTRODUCED_IN(24);
-int pthread_barrierattr_setpshared(pthread_barrierattr_t* attr, int pshared)
- __INTRODUCED_IN(24);
+int pthread_barrierattr_init(pthread_barrierattr_t* __attr) __INTRODUCED_IN(24);
+int pthread_barrierattr_destroy(pthread_barrierattr_t* __attr) __INTRODUCED_IN(24);
+int pthread_barrierattr_getpshared(const pthread_barrierattr_t* __attr, int* __shared) __INTRODUCED_IN(24);
+int pthread_barrierattr_setpshared(pthread_barrierattr_t* __attr, int __shared) __INTRODUCED_IN(24);
#endif
#if __ANDROID_API__ >= __ANDROID_API_N__
-int pthread_barrier_init(pthread_barrier_t*, const pthread_barrierattr_t*, unsigned)
- __INTRODUCED_IN(24);
-int pthread_barrier_destroy(pthread_barrier_t*) __INTRODUCED_IN(24);
-int pthread_barrier_wait(pthread_barrier_t*) __INTRODUCED_IN(24);
+int pthread_barrier_init(pthread_barrier_t* __barrier, const pthread_barrierattr_t* __attr, unsigned __count) __INTRODUCED_IN(24);
+int pthread_barrier_destroy(pthread_barrier_t* __barrier) __INTRODUCED_IN(24);
+int pthread_barrier_wait(pthread_barrier_t* __barrier) __INTRODUCED_IN(24);
#endif
#if __ANDROID_API__ >= __ANDROID_API_N__
-int pthread_spin_destroy(pthread_spinlock_t*) __INTRODUCED_IN(24);
-int pthread_spin_init(pthread_spinlock_t*, int) __INTRODUCED_IN(24);
-int pthread_spin_lock(pthread_spinlock_t*) __INTRODUCED_IN(24);
-int pthread_spin_trylock(pthread_spinlock_t*) __INTRODUCED_IN(24);
-int pthread_spin_unlock(pthread_spinlock_t*) __INTRODUCED_IN(24);
+int pthread_spin_destroy(pthread_spinlock_t* __spinlock) __INTRODUCED_IN(24);
+int pthread_spin_init(pthread_spinlock_t* __spinlock, int __shared) __INTRODUCED_IN(24);
+int pthread_spin_lock(pthread_spinlock_t* __spinlock) __INTRODUCED_IN(24);
+int pthread_spin_trylock(pthread_spinlock_t* __spinlock) __INTRODUCED_IN(24);
+int pthread_spin_unlock(pthread_spinlock_t* __spinlock) __INTRODUCED_IN(24);
#endif
pthread_t pthread_self(void) __attribute_const__;
#if defined(__USE_GNU)
-int pthread_getname_np(pthread_t, char*, size_t) __INTRODUCED_IN(26);
+int pthread_getname_np(pthread_t __pthread, char* __buf, size_t __n) __INTRODUCED_IN(26);
#endif
/* TODO: this should be __USE_GNU too. */
-int pthread_setname_np(pthread_t, const char*);
+int pthread_setname_np(pthread_t __pthread, const char* __name);
-int pthread_setschedparam(pthread_t, int, const struct sched_param*);
+int pthread_setschedparam(pthread_t __pthread, int __policy, const struct sched_param* __param);
-int pthread_setspecific(pthread_key_t, const void*);
+int pthread_setspecific(pthread_key_t __key, const void* __value);
typedef void (*__pthread_cleanup_func_t)(void*);
@@ -255,4 +251,4 @@
__END_DECLS
-#endif /* _PTHREAD_H_ */
+#endif
diff --git a/libc/include/pty.h b/libc/include/pty.h
index ec257a5..cf9ccb9 100644
--- a/libc/include/pty.h
+++ b/libc/include/pty.h
@@ -36,9 +36,9 @@
__BEGIN_DECLS
-int openpty(int*, int*, char*, const struct termios*, const struct winsize*) __INTRODUCED_IN(23);
-int forkpty(int*, char*, const struct termios*, const struct winsize*) __INTRODUCED_IN(23);
+int openpty(int* __master_fd, int* __slave_fd, char* __slave_name, const struct termios* __termios_ptr, const struct winsize* __winsize_ptr) __INTRODUCED_IN(23);
+int forkpty(int* __master_fd, char* __slave_name, const struct termios* __termios_ptr, const struct winsize* __winsize_ptr) __INTRODUCED_IN(23);
__END_DECLS
-#endif /* _PTY_H */
+#endif
diff --git a/libc/include/pwd.h b/libc/include/pwd.h
index e37c637..5c516d7 100644
--- a/libc/include/pwd.h
+++ b/libc/include/pwd.h
@@ -80,8 +80,8 @@
char* pw_shell;
};
-struct passwd* getpwnam(const char*);
-struct passwd* getpwuid(uid_t);
+struct passwd* getpwnam(const char* __name);
+struct passwd* getpwuid(uid_t __uid);
/* Note: Android has thousands and thousands of ids to iterate through */
struct passwd* getpwent(void) __INTRODUCED_IN(26);
@@ -89,8 +89,8 @@
void setpwent(void) __INTRODUCED_IN(26);
void endpwent(void) __INTRODUCED_IN(26);
-int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**) __INTRODUCED_IN(12);
-int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**) __INTRODUCED_IN(12);
+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);
__END_DECLS
diff --git a/libc/include/regex.h b/libc/include/regex.h
index b06a515..c4cc39c 100644
--- a/libc/include/regex.h
+++ b/libc/include/regex.h
@@ -97,10 +97,10 @@
#define REG_BACKR 02000 /* force use of backref code */
__BEGIN_DECLS
-int regcomp(regex_t *, const char *, int);
-size_t regerror(int, const regex_t *, char *, size_t);
-int regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
-void regfree(regex_t *);
+int regcomp(regex_t* __re, const char* __regex, int __flags);
+size_t regerror(int __error_code, const regex_t* __re, char* __buf, size_t __n);
+int regexec(const regex_t* __re, const char* __s, size_t __match_count, regmatch_t __matches[], int __flags);
+void regfree(regex_t* __re);
__END_DECLS
-#endif /* !_REGEX_H_ */
+#endif
diff --git a/libc/include/search.h b/libc/include/search.h
index 46998d9..0015699 100644
--- a/libc/include/search.h
+++ b/libc/include/search.h
@@ -29,21 +29,20 @@
__BEGIN_DECLS
-void insque(void*, void*) __INTRODUCED_IN(21);
-void remque(void*) __INTRODUCED_IN(21);
+void insque(void* __element, void* __previous) __INTRODUCED_IN(21);
+void remque(void* __element) __INTRODUCED_IN(21);
-void* lfind(const void*, const void*, size_t*, size_t, int (*)(const void*, const void*))
+void* lfind(const void* __key, const void* __base, size_t* __count, size_t __size, int (*__comparator)(const void*, const void*))
__INTRODUCED_IN(21);
-void* lsearch(const void*, void*, size_t*, size_t, int (*)(const void*, const void*))
+void* lsearch(const void* __key, void* __base, size_t* __count, size_t __size, int (*__comparator)(const void*, const void*))
__INTRODUCED_IN(21);
-void* tdelete(const void*, void**, int (*)(const void*, const void*))
- __INTRODUCED_IN(16);
-void tdestroy(void*, void (*)(void*)) __INTRODUCED_IN(16);
-void* tfind(const void*, void* const*, int (*)(const void*, const void*)) __INTRODUCED_IN(16);
-void* tsearch(const void*, void**, int (*)(const void*, const void*)) __INTRODUCED_IN(16);
-void twalk(const void*, void (*)(const void*, VISIT, int)) __INTRODUCED_IN(21);
+void* tdelete(const void* __key, void** __root_ptr, int (*__comparator)(const void*, const void*)) __INTRODUCED_IN(16);
+void tdestroy(void* __root, void (*__free_fn)(void*)) __INTRODUCED_IN(16);
+void* tfind(const void* __key, void* const* __root_ptr, int (*__comparator)(const void*, const void*)) __INTRODUCED_IN(16);
+void* tsearch(const void* __key, void** __root_ptr, int (*__comparator)(const void*, const void*)) __INTRODUCED_IN(16);
+void twalk(const void* __root, void (*__visitor)(const void*, VISIT, int)) __INTRODUCED_IN(21);
__END_DECLS
-#endif /* !_SEARCH_H_ */
+#endif
diff --git a/libc/include/semaphore.h b/libc/include/semaphore.h
index 218f22a..7e3dc1c 100644
--- a/libc/include/semaphore.h
+++ b/libc/include/semaphore.h
@@ -44,19 +44,19 @@
#define SEM_FAILED __BIONIC_CAST(reinterpret_cast, sem_t*, 0)
-int sem_destroy(sem_t*);
-int sem_getvalue(sem_t*, int*);
-int sem_init(sem_t*, int, unsigned int);
-int sem_post(sem_t*);
-int sem_timedwait(sem_t*, const struct timespec*);
-int sem_trywait(sem_t*);
-int sem_wait(sem_t*);
+int sem_destroy(sem_t* __sem);
+int sem_getvalue(sem_t* __sem, int* __value);
+int sem_init(sem_t* __sem, int __shared, unsigned int __value);
+int sem_post(sem_t* __sem);
+int sem_timedwait(sem_t* __sem, const struct timespec* __ts);
+int sem_trywait(sem_t* __sem);
+int sem_wait(sem_t* __sem);
/* These aren't actually implemented. */
-sem_t* sem_open(const char*, int, ...);
-int sem_close(sem_t*);
-int sem_unlink(const char*);
+sem_t* sem_open(const char* __name, int _flags, ...);
+int sem_close(sem_t* __sem);
+int sem_unlink(const char* __name);
__END_DECLS
-#endif /* _SEMAPHORE_H */
+#endif
diff --git a/libc/include/setjmp.h b/libc/include/setjmp.h
index 7adeb35..12a3083 100644
--- a/libc/include/setjmp.h
+++ b/libc/include/setjmp.h
@@ -48,17 +48,17 @@
__BEGIN_DECLS
-int _setjmp(jmp_buf);
-void _longjmp(jmp_buf, int);
+int _setjmp(jmp_buf __env);
+void _longjmp(jmp_buf __env, int __value);
-int setjmp(jmp_buf);
-void longjmp(jmp_buf, int);
+int setjmp(jmp_buf __env);
+void longjmp(jmp_buf __env, int __value);
-int sigsetjmp(sigjmp_buf, int) __INTRODUCED_IN_ARM(9) __INTRODUCED_IN_MIPS(12)
- __INTRODUCED_IN_X86(12);
-void siglongjmp(sigjmp_buf, int) __INTRODUCED_IN_ARM(9) __INTRODUCED_IN_MIPS(12)
- __INTRODUCED_IN_X86(12);
+int sigsetjmp(sigjmp_buf __env, int __save_signal_mask)
+ __INTRODUCED_IN_ARM(9) __INTRODUCED_IN_MIPS(12) __INTRODUCED_IN_X86(12);
+void siglongjmp(sigjmp_buf __env, int __value)
+ __INTRODUCED_IN_ARM(9) __INTRODUCED_IN_MIPS(12) __INTRODUCED_IN_X86(12);
__END_DECLS
-#endif /* !_SETJMP_H_ */
+#endif
diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index 4dff48d..559e52a 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -103,48 +103,42 @@
#define L_tmpnam 4096
#define TMP_MAX 308915776
-/*
- * Functions defined in ANSI C standard.
- */
-void clearerr(FILE *);
-int fclose(FILE *);
-int feof(FILE *);
-int ferror(FILE *);
-int fflush(FILE *);
-int fgetc(FILE *);
-char *fgets(char *, int, FILE *) __overloadable
- __RENAME_CLANG(fgets);
-int fprintf(FILE * , const char *, ...) __printflike(2, 3);
-int fputc(int, FILE *);
-int fputs(const char *, FILE *);
-size_t fread(void *, size_t, size_t, FILE *)
- __overloadable __RENAME_CLANG(fread);
-int fscanf(FILE *, const char *, ...) __scanflike(2, 3);
-size_t fwrite(const void *, size_t, size_t, FILE *)
- __overloadable __RENAME_CLANG(fwrite);
-int getc(FILE *);
-int getchar(void);
-ssize_t getdelim(char**, size_t*, int, FILE*) __INTRODUCED_IN(18);
-ssize_t getline(char**, size_t*, FILE*) __INTRODUCED_IN(18);
+void clearerr(FILE* __fp);
+int fclose(FILE* __fp);
+int feof(FILE* __fp);
+int ferror(FILE* __fp);
+int fflush(FILE* __fp);
+int fgetc(FILE* __fp);
+char* fgets(char* __buf, int __size, FILE* __fp) __overloadable __RENAME_CLANG(fgets);
+int fprintf(FILE* __fp , const char* __fmt, ...) __printflike(2, 3);
+int fputc(int __ch, FILE* __fp);
+int fputs(const char* __s, FILE* __fp);
+size_t fread(void* __buf, size_t __size, size_t __count, FILE* __fp) __overloadable __RENAME_CLANG(fread);
+int fscanf(FILE* __fp, const char* __fmt, ...) __scanflike(2, 3);
+size_t fwrite(const void* __buf, size_t __size, size_t __count, FILE* __fp) __overloadable __RENAME_CLANG(fwrite);
+int getc(FILE* __fp);
+int getchar(void);
+ssize_t getdelim(char** __line_ptr, size_t* __line_length_ptr, int __delimiter, FILE* __fp) __INTRODUCED_IN(18);
+ssize_t getline(char** __line_ptr, size_t* __line_length_ptr, FILE* __fp) __INTRODUCED_IN(18);
-void perror(const char *);
-int printf(const char *, ...) __printflike(1, 2);
-int putc(int, FILE *);
-int putchar(int);
-int puts(const char *);
-int remove(const char *);
-void rewind(FILE *);
-int scanf(const char *, ...) __scanflike(1, 2);
-void setbuf(FILE *, char *);
-int setvbuf(FILE *, char *, int, size_t);
-int sscanf(const char *, const char *, ...) __scanflike(2, 3);
-int ungetc(int, FILE *);
-int vfprintf(FILE *, const char *, va_list) __printflike(2, 0);
-int vprintf(const char *, va_list) __printflike(1, 0);
+void perror(const char* __msg);
+int printf(const char* __fmt, ...) __printflike(1, 2);
+int putc(int __ch, FILE* __fp);
+int putchar(int __ch);
+int puts(const char* __s);
+int remove(const char* __path);
+void rewind(FILE* __fp);
+int scanf(const char* __fmt, ...) __scanflike(1, 2);
+void setbuf(FILE* __fp, char* __buf);
+int setvbuf(FILE* __fp, char* __buf, int __mode, size_t __size);
+int sscanf(const char* __s, const char* __fmt, ...) __scanflike(2, 3);
+int ungetc(int __ch, FILE* __fp);
+int vfprintf(FILE* __fp, const char* __fmt, va_list __args) __printflike(2, 0);
+int vprintf(const char* __fp, va_list __args) __printflike(1, 0);
#if __ANDROID_API__ >= 21
-int dprintf(int, const char*, ...) __printflike(2, 3) __INTRODUCED_IN(21);
-int vdprintf(int, const char*, va_list) __printflike(2, 0) __INTRODUCED_IN(21);
+int dprintf(int __fd, const char* __fmt, ...) __printflike(2, 3) __INTRODUCED_IN(21);
+int vdprintf(int __fd, const char* __fmt, va_list __args) __printflike(2, 0) __INTRODUCED_IN(21);
#else
/*
* Old versions of Android called these fdprintf and vfdprintf out of fears that the glibc names
@@ -153,111 +147,113 @@
* Allow users to just use dprintf and vfdprintf on any version by renaming those calls to their
* legacy equivalents if needed.
*/
-int dprintf(int, const char*, ...) __RENAME(fdprintf) __printflike(2, 3);
-int vdprintf(int, const char*, va_list) __RENAME(vfdprintf) __printflike(2, 0);
+int dprintf(int __fd, const char* __fmt, ...) __RENAME(fdprintf) __printflike(2, 3);
+int vdprintf(int __fd, const char* __fmt, va_list __args) __RENAME(vfdprintf) __printflike(2, 0);
#endif
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ < 201112L) || \
(defined(__cplusplus) && __cplusplus <= 201103L)
-char* gets(char*) __attribute__((deprecated("gets is unsafe, use fgets instead")));
+char* gets(char* __buf) __attribute__((deprecated("gets is unsafe, use fgets instead")));
#endif
-int sprintf(char*, const char*, ...)
+int sprintf(char* __s, const char* __fmt, ...)
__printflike(2, 3) __warnattr_strict("sprintf is often misused; please use snprintf")
__overloadable __RENAME_CLANG(sprintf);
-int vsprintf(char*, const char*, va_list)
+int vsprintf(char* __s, const char* __fmt, va_list __args)
__overloadable __printflike(2, 0) __RENAME_CLANG(vsprintf)
__warnattr_strict("vsprintf is often misused; please use vsnprintf");
-char* tmpnam(char*)
+char* tmpnam(char* __s)
__warnattr("tempnam is unsafe, use mkstemp or tmpfile instead");
#define P_tmpdir "/tmp/" /* deprecated */
-char* tempnam(const char*, const char*)
+char* tempnam(const char* __dir, const char* __prefix)
__warnattr("tempnam is unsafe, use mkstemp or tmpfile instead");
-int rename(const char*, const char*);
-int renameat(int, const char*, int, const char*);
+int rename(const char* __old_path, const char* __new_path);
+int renameat(int __old_dir_fd, const char* __old_path, int __new_dir_fd, const char* __new_path);
-int fseek(FILE*, long, int);
-long ftell(FILE*);
+int fseek(FILE* __fp, long __offset, int __whence);
+long ftell(FILE* __fp);
#if defined(__USE_FILE_OFFSET64)
-int fgetpos(FILE*, fpos_t*) __RENAME(fgetpos64) __INTRODUCED_IN(24);
-int fsetpos(FILE*, const fpos_t*) __RENAME(fsetpos64) __INTRODUCED_IN(24);
-int fseeko(FILE*, off_t, int) __RENAME(fseeko64) __INTRODUCED_IN(24);
-off_t ftello(FILE*) __RENAME(ftello64) __INTRODUCED_IN(24);
+int fgetpos(FILE* __fp, fpos_t* __pos) __RENAME(fgetpos64) __INTRODUCED_IN(24);
+int fsetpos(FILE* __fp, const fpos_t* __pos) __RENAME(fsetpos64) __INTRODUCED_IN(24);
+int fseeko(FILE* __fp, off_t __offset, int __whence) __RENAME(fseeko64) __INTRODUCED_IN(24);
+off_t ftello(FILE* __fp) __RENAME(ftello64) __INTRODUCED_IN(24);
# if defined(__USE_BSD)
-FILE* funopen(const void*,
- int (*)(void*, char*, int),
- int (*)(void*, const char*, int),
- fpos_t (*)(void*, fpos_t, int),
- int (*)(void*)) __RENAME(funopen64) __INTRODUCED_IN(24);
+FILE* funopen(const void* __cookie,
+ int (*__read_fn)(void*, char*, int),
+ int (*__write_fn)(void*, const char*, int),
+ fpos_t (*__seek_fn)(void*, fpos_t, int),
+ int (*__close_fn)(void*)) __RENAME(funopen64) __INTRODUCED_IN(24);
# endif
#else
-int fgetpos(FILE*, fpos_t*);
-int fsetpos(FILE*, const fpos_t*);
-int fseeko(FILE*, off_t, int);
-off_t ftello(FILE*);
+int fgetpos(FILE* __fp, fpos_t* __pos);
+int fsetpos(FILE* __fp, const fpos_t* __pos);
+int fseeko(FILE* __fp, off_t __offset, int __whence);
+off_t ftello(FILE* __fp);
# if defined(__USE_BSD)
-FILE* funopen(const void*,
- int (*)(void*, char*, int),
- int (*)(void*, const char*, int),
- fpos_t (*)(void*, fpos_t, int),
- int (*)(void*));
+FILE* funopen(const void* __cookie,
+ int (*__read_fn)(void*, char*, int),
+ int (*__write_fn)(void*, const char*, int),
+ fpos_t (*__seek_fn)(void*, fpos_t, int),
+ int (*__close_fn)(void*));
# endif
#endif
-int fgetpos64(FILE*, fpos64_t*) __INTRODUCED_IN(24);
-int fsetpos64(FILE*, const fpos64_t*) __INTRODUCED_IN(24);
-int fseeko64(FILE*, off64_t, int) __INTRODUCED_IN(24);
-off64_t ftello64(FILE*) __INTRODUCED_IN(24);
+int fgetpos64(FILE* __fp, fpos64_t* __pos) __INTRODUCED_IN(24);
+int fsetpos64(FILE* __fp, const fpos64_t* __pos) __INTRODUCED_IN(24);
+int fseeko64(FILE* __fp, off64_t __offset, int __whence) __INTRODUCED_IN(24);
+off64_t ftello64(FILE* __fp) __INTRODUCED_IN(24);
#if defined(__USE_BSD)
-FILE* funopen64(const void*, int (*)(void*, char*, int), int (*)(void*, const char*, int),
- fpos64_t (*)(void*, fpos64_t, int), int (*)(void*)) __INTRODUCED_IN(24);
+FILE* funopen64(const void* __cookie,
+ int (*__read_fn)(void*, char*, int),
+ int (*__write_fn)(void*, const char*, int),
+ fpos64_t (*__seek_fn)(void*, fpos64_t, int),
+ int (*__close_fn)(void*)) __INTRODUCED_IN(24);
#endif
-FILE* fopen(const char*, const char*);
-FILE* fopen64(const char*, const char*) __INTRODUCED_IN(24);
-FILE* freopen(const char*, const char*, FILE*);
-FILE* freopen64(const char*, const char*, FILE*)
- __INTRODUCED_IN(24);
+FILE* fopen(const char* __path, const char* __mode);
+FILE* fopen64(const char* __path, const char* __mode) __INTRODUCED_IN(24);
+FILE* freopen(const char* __path, const char* __mode, FILE* __fp);
+FILE* freopen64(const char* __path, const char* __mode, FILE* __fp) __INTRODUCED_IN(24);
FILE* tmpfile(void);
FILE* tmpfile64(void) __INTRODUCED_IN(24);
-int snprintf(char*, size_t, const char*, ...)
+int snprintf(char* __buf, size_t __size, const char* __fmt, ...)
__printflike(3, 4) __overloadable __RENAME_CLANG(snprintf);
-int vfscanf(FILE*, const char*, va_list) __scanflike(2, 0);
-int vscanf(const char* , va_list) __scanflike(1, 0);
-int vsnprintf(char*, size_t, const char*, va_list)
+int vfscanf(FILE* __fp, const char* __fmt, va_list __args) __scanflike(2, 0);
+int vscanf(const char* __fmt , va_list __args) __scanflike(1, 0);
+int vsnprintf(char* __buf, size_t __size, const char* __fmt, va_list __args)
__printflike(3, 0) __overloadable __RENAME_CLANG(vsnprintf);
-int vsscanf(const char*, const char*, va_list) __scanflike(2, 0);
+int vsscanf(const char* __s, const char* __fmt, va_list __args) __scanflike(2, 0);
#define L_ctermid 1024 /* size for ctermid() */
-char* ctermid(char*) __INTRODUCED_IN(26);
+char* ctermid(char* __buf) __INTRODUCED_IN(26);
-FILE* fdopen(int, const char*);
-int fileno(FILE*);
-int pclose(FILE*);
-FILE* popen(const char*, const char*);
-void flockfile(FILE*);
-int ftrylockfile(FILE*);
-void funlockfile(FILE*);
-int getc_unlocked(FILE*);
+FILE* fdopen(int __fd, const char* __mode);
+int fileno(FILE* __fp);
+int pclose(FILE* __fp);
+FILE* popen(const char* __command, const char* __mode);
+void flockfile(FILE* __fp);
+int ftrylockfile(FILE* __fp);
+void funlockfile(FILE* __fp);
+int getc_unlocked(FILE* __fp);
int getchar_unlocked(void);
-int putc_unlocked(int, FILE*);
-int putchar_unlocked(int);
+int putc_unlocked(int __ch, FILE* __fp);
+int putchar_unlocked(int __ch);
-FILE* fmemopen(void*, size_t, const char*) __INTRODUCED_IN(23);
-FILE* open_memstream(char**, size_t*) __INTRODUCED_IN(23);
+FILE* fmemopen(void* __buf, size_t __size, const char* __mode) __INTRODUCED_IN(23);
+FILE* open_memstream(char** __ptr, size_t* __size_ptr) __INTRODUCED_IN(23);
#if defined(__USE_BSD) || defined(__BIONIC__) /* Historically bionic exposed these. */
-int asprintf(char**, const char*, ...) __printflike(2, 3);
-char* fgetln(FILE*, size_t*);
-int fpurge(FILE*);
-void setbuffer(FILE*, char*, int);
-int setlinebuf(FILE*);
-int vasprintf(char**, const char*, va_list) __printflike(2, 0);
-void clearerr_unlocked(FILE*) __INTRODUCED_IN(23);
-int feof_unlocked(FILE*) __INTRODUCED_IN(23);
-int ferror_unlocked(FILE*) __INTRODUCED_IN(23);
-int fileno_unlocked(FILE*) __INTRODUCED_IN(24);
+int asprintf(char** __s_ptr, const char* __fmt, ...) __printflike(2, 3);
+char* fgetln(FILE* __fp, size_t* __length_ptr);
+int fpurge(FILE* __fp);
+void setbuffer(FILE* __fp, char* __buf, int __size);
+int setlinebuf(FILE* __fp);
+int vasprintf(char** __s_ptr, const char* __fmt, va_list __args) __printflike(2, 0);
+void clearerr_unlocked(FILE* __fp) __INTRODUCED_IN(23);
+int feof_unlocked(FILE* __fp) __INTRODUCED_IN(23);
+int ferror_unlocked(FILE* __fp) __INTRODUCED_IN(23);
+int fileno_unlocked(FILE* __fp) __INTRODUCED_IN(24);
#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
#endif /* __USE_BSD */
@@ -268,4 +264,4 @@
__END_DECLS
-#endif /* _STDIO_H_ */
+#endif
diff --git a/libc/include/strings.h b/libc/include/strings.h
index 11f3213..c2e0a5e 100644
--- a/libc/include/strings.h
+++ b/libc/include/strings.h
@@ -55,11 +55,11 @@
#endif
#if !defined(__i386__) || __ANDROID_API__ >= __ANDROID_API_J_MR2__
-int ffs(int) __INTRODUCED_IN_X86(18);
+int ffs(int __i) __INTRODUCED_IN_X86(18);
#endif
__END_DECLS
#include <android/legacy_strings_inlines.h>
-#endif /* !defined(_STRINGS_H_) */
+#endif
diff --git a/libc/include/sys/_system_properties.h b/libc/include/sys/_system_properties.h
index f8dbd33..67beb9a 100644
--- a/libc/include/sys/_system_properties.h
+++ b/libc/include/sys/_system_properties.h
@@ -61,14 +61,14 @@
** Map the property area from the specified filename. This
** method is for testing only.
*/
-int __system_property_set_filename(const char *filename);
+int __system_property_set_filename(const char* __filename);
/*
** Initialize the area to be used to store properties. Can
** only be done by a single process that has write access to
** the property area.
*/
-int __system_property_area_init();
+int __system_property_area_init(void);
/* Read the global serial number of the system properties
**
@@ -92,7 +92,7 @@
**
** Returns the serial number on success, -1 on error.
*/
-uint32_t __system_property_area_serial();
+uint32_t __system_property_area_serial(void);
/* Add a new system property. Can only be done by a single
** process that has write access to the property area, and
@@ -102,7 +102,7 @@
**
** Returns 0 on success, -1 if the property area is full.
*/
-int __system_property_add(const char *name, unsigned int namelen, const char *value, unsigned int valuelen);
+int __system_property_add(const char* __name, unsigned int __name_length, const char* __value, unsigned int __value_length);
/* Update the value of a system property returned by
** __system_property_find. Can only be done by a single process
@@ -112,14 +112,14 @@
**
** Returns 0 on success, -1 if the parameters are incorrect.
*/
-int __system_property_update(prop_info *pi, const char *value, unsigned int len);
+int __system_property_update(prop_info* __pi, const char* __value, unsigned int __value_length);
/* Read the serial number of a system property returned by
** __system_property_find.
**
** Returns the serial number on success, -1 on error.
*/
-uint32_t __system_property_serial(const prop_info* pi);
+uint32_t __system_property_serial(const prop_info* __pi);
/* Initialize the system properties area in read only mode.
* Should be done by all processes that need to read system
@@ -127,10 +127,10 @@
*
* Returns 0 on success, -1 otherwise.
*/
-int __system_properties_init();
+int __system_properties_init(void);
/* Deprecated: use __system_property_wait instead. */
-uint32_t __system_property_wait_any(uint32_t old_serial);
+uint32_t __system_property_wait_any(uint32_t __old_serial);
__END_DECLS
diff --git a/libc/include/sys/auxv.h b/libc/include/sys/auxv.h
index ab5a39d..9251390 100644
--- a/libc/include/sys/auxv.h
+++ b/libc/include/sys/auxv.h
@@ -35,8 +35,8 @@
__BEGIN_DECLS
-unsigned long int getauxval(unsigned long int type) __INTRODUCED_IN(18);
+unsigned long int getauxval(unsigned long int __type) __INTRODUCED_IN(18);
__END_DECLS
-#endif /* _SYS_AUXV_H_ */
+#endif
diff --git a/libc/include/sys/cachectl.h b/libc/include/sys/cachectl.h
index 5b20c19..9235327 100644
--- a/libc/include/sys/cachectl.h
+++ b/libc/include/sys/cachectl.h
@@ -34,4 +34,4 @@
#include <asm/cachectl.h>
#endif
-#endif /* sys/cachectl.h */
+#endif
diff --git a/libc/include/sys/capability.h b/libc/include/sys/capability.h
index b9a40b3..637c844 100644
--- a/libc/include/sys/capability.h
+++ b/libc/include/sys/capability.h
@@ -34,9 +34,9 @@
__BEGIN_DECLS
-int capget(cap_user_header_t hdrp, cap_user_data_t datap);
-int capset(cap_user_header_t hdrp, const cap_user_data_t datap);
+int capget(cap_user_header_t __hdr_ptr, cap_user_data_t __data_ptr);
+int capset(cap_user_header_t __hdr_ptr, const cap_user_data_t __data_ptr);
__END_DECLS
-#endif /* _BIONIC_SYS_CAPABILITY_H */
+#endif
diff --git a/libc/include/sys/endian.h b/libc/include/sys/endian.h
index de172fe..799a6f2 100644
--- a/libc/include/sys/endian.h
+++ b/libc/include/sys/endian.h
@@ -49,10 +49,10 @@
/* glibc compatibility. */
__BEGIN_DECLS
-uint32_t htonl(uint32_t) __attribute_const__ __INTRODUCED_IN(21);
-uint16_t htons(uint16_t) __attribute_const__ __INTRODUCED_IN(21);
-uint32_t ntohl(uint32_t) __attribute_const__ __INTRODUCED_IN(21);
-uint16_t ntohs(uint16_t) __attribute_const__ __INTRODUCED_IN(21);
+uint32_t htonl(uint32_t __x) __attribute_const__ __INTRODUCED_IN(21);
+uint16_t htons(uint16_t __x) __attribute_const__ __INTRODUCED_IN(21);
+uint32_t ntohl(uint32_t __x) __attribute_const__ __INTRODUCED_IN(21);
+uint16_t ntohs(uint16_t __x) __attribute_const__ __INTRODUCED_IN(21);
__END_DECLS
#define htonl(x) __swap32(x)
@@ -103,4 +103,4 @@
#define le64toh(x) htole64(x)
#endif /* __USE_BSD */
-#endif /* _SYS_ENDIAN_H_ */
+#endif
diff --git a/libc/include/sys/epoll.h b/libc/include/sys/epoll.h
index fcdab43..6ecd93f 100644
--- a/libc/include/sys/epoll.h
+++ b/libc/include/sys/epoll.h
@@ -53,8 +53,8 @@
#endif
;
-int epoll_create(int);
-int epoll_create1(int) __INTRODUCED_IN(21);
+int epoll_create(int __size);
+int epoll_create1(int __flags) __INTRODUCED_IN(21);
/*
* Some third-party code uses the existence of EPOLL_CLOEXEC to detect the
@@ -71,10 +71,10 @@
#undef EPOLL_CLOEXEC
#endif
-int epoll_ctl(int, int, int, struct epoll_event*);
-int epoll_wait(int, struct epoll_event*, int, int);
-int epoll_pwait(int, struct epoll_event*, int, int, const sigset_t*) __INTRODUCED_IN(21);
+int epoll_ctl(int __epoll_fd, int __op, int __fd, struct epoll_event* __event);
+int epoll_wait(int __epoll_fd, struct epoll_event* __events, int __event_count, int __timeout_ms);
+int epoll_pwait(int __epoll_fd, struct epoll_event* __events, int __event_count, int __timeout_ms, const sigset_t* __mask) __INTRODUCED_IN(21);
__END_DECLS
-#endif /* _SYS_EPOLL_H_ */
+#endif
diff --git a/libc/include/sys/eventfd.h b/libc/include/sys/eventfd.h
index 6b9749a..3cfb5e7 100644
--- a/libc/include/sys/eventfd.h
+++ b/libc/include/sys/eventfd.h
@@ -37,14 +37,13 @@
#define EFD_CLOEXEC O_CLOEXEC
#define EFD_NONBLOCK O_NONBLOCK
-/* type of event counter */
typedef uint64_t eventfd_t;
-int eventfd(unsigned int initial_value, int flags);
+int eventfd(unsigned int __initial_value, int __flags);
-int eventfd_read(int fd, eventfd_t* value);
-int eventfd_write(int fd, eventfd_t value);
+int eventfd_read(int __fd, eventfd_t* __value);
+int eventfd_write(int __fd, eventfd_t __value);
__END_DECLS
-#endif /* _SYS_EVENTFD_H */
+#endif
diff --git a/libc/include/sys/file.h b/libc/include/sys/file.h
index f414d34..a420021 100644
--- a/libc/include/sys/file.h
+++ b/libc/include/sys/file.h
@@ -36,8 +36,8 @@
__BEGIN_DECLS
-int flock(int, int);
+int flock(int __fd, int __op);
__END_DECLS
-#endif /* _SYS_FILE_H_ */
+#endif
diff --git a/libc/include/sys/fsuid.h b/libc/include/sys/fsuid.h
index e4d9ebc..bb7a58d 100644
--- a/libc/include/sys/fsuid.h
+++ b/libc/include/sys/fsuid.h
@@ -34,9 +34,9 @@
__BEGIN_DECLS
-int setfsuid(uid_t) __INTRODUCED_IN(21);
-int setfsgid(gid_t) __INTRODUCED_IN(21);
+int setfsuid(uid_t __uid) __INTRODUCED_IN(21);
+int setfsgid(gid_t __gid) __INTRODUCED_IN(21);
__END_DECLS
-#endif /* _SYS_FSUID_H_ */
+#endif
diff --git a/libc/include/sys/inotify.h b/libc/include/sys/inotify.h
index 98f7198..32e16d9 100644
--- a/libc/include/sys/inotify.h
+++ b/libc/include/sys/inotify.h
@@ -54,10 +54,10 @@
#endif
int inotify_init(void);
-int inotify_init1(int) __INTRODUCED_IN(21);
-int inotify_add_watch(int, const char*, uint32_t);
-int inotify_rm_watch(int, uint32_t);
+int inotify_init1(int __flags) __INTRODUCED_IN(21);
+int inotify_add_watch(int __fd, const char* __path, uint32_t __mask);
+int inotify_rm_watch(int __fd, uint32_t __watch_descriptor);
__END_DECLS
-#endif /* _SYS_INOTIFY_H_ */
+#endif
diff --git a/libc/include/sys/ioctl.h b/libc/include/sys/ioctl.h
index efbcb0c..76dc1ff 100644
--- a/libc/include/sys/ioctl.h
+++ b/libc/include/sys/ioctl.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _SYS_IOCTL_H_
#define _SYS_IOCTL_H_
@@ -41,4 +42,4 @@
#include <bits/ioctl.h>
-#endif /* _SYS_IOCTL_H_ */
+#endif
diff --git a/libc/include/sys/ipc.h b/libc/include/sys/ipc.h
index 3d6c45f..dee7c8a 100644
--- a/libc/include/sys/ipc.h
+++ b/libc/include/sys/ipc.h
@@ -42,8 +42,8 @@
__BEGIN_DECLS
-key_t ftok(const char* path, int id);
+key_t ftok(const char* __path, int __id);
__END_DECLS
-#endif /* _SYS_IPC_H */
+#endif
diff --git a/libc/include/sys/klog.h b/libc/include/sys/klog.h
index 47eb3a4..ed746fc 100644
--- a/libc/include/sys/klog.h
+++ b/libc/include/sys/klog.h
@@ -46,8 +46,8 @@
#define KLOG_SIZE_UNREAD 9
#define KLOG_SIZE_BUFFER 10
-int klogctl(int, char *, int);
+int klogctl(int __type, char* __buf, int __buf_size);
__END_DECLS
-#endif /* _SYS_KLOG_H_ */
+#endif
diff --git a/libc/include/sys/mman.h b/libc/include/sys/mman.h
index 1440dc6..1e752c4 100644
--- a/libc/include/sys/mman.h
+++ b/libc/include/sys/mman.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _SYS_MMAN_H_
#define _SYS_MMAN_H_
@@ -44,27 +45,27 @@
#define MREMAP_FIXED 2
#if defined(__USE_FILE_OFFSET64)
-void* mmap(void*, size_t, int, int, int, off_t) __RENAME(mmap64) __INTRODUCED_IN(21);
+void* mmap(void* __addr, size_t __size, int __prot, int __flags, int __fd, off_t __offset) __RENAME(mmap64) __INTRODUCED_IN(21);
#else
-void* mmap(void*, size_t, int, int, int, off_t);
+void* mmap(void* __addr, size_t __size, int __prot, int __flags, int __fd, off_t __offset);
#endif
-void* mmap64(void*, size_t, int, int, int, off64_t) __INTRODUCED_IN(21);
+void* mmap64(void* __addr, size_t __size, int __prot, int __flags, int __fd, off64_t __offset) __INTRODUCED_IN(21);
-int munmap(void*, size_t);
-int msync(void*, size_t, int);
-int mprotect(void*, size_t, int);
-void* mremap(void*, size_t, size_t, int, ...);
+int munmap(void* __addr, size_t __size);
+int msync(void* __addr, size_t __size, int __flags);
+int mprotect(void* __addr, size_t __size, int __prot);
+void* mremap(void* __old_addr, size_t __old_size, size_t __new_size, int __flags, ...);
-int mlockall(int) __INTRODUCED_IN(17);
+int mlockall(int __flags) __INTRODUCED_IN(17);
int munlockall(void) __INTRODUCED_IN(17);
-int mlock(const void*, size_t);
-int munlock(const void*, size_t);
+int mlock(const void* __addr, size_t __size);
+int munlock(const void* __addr, size_t __size);
-int mincore(void*, size_t, unsigned char*);
+int mincore(void* __addr, size_t __size, unsigned char* __vector);
-int madvise(void*, size_t, int);
+int madvise(void* __addr, size_t __size, int __advice);
#if __ANDROID_API__ >= __ANDROID_API_M__
/*
@@ -81,8 +82,8 @@
#define POSIX_MADV_WILLNEED MADV_WILLNEED
#define POSIX_MADV_DONTNEED MADV_DONTNEED
#endif
-int posix_madvise(void*, size_t, int) __INTRODUCED_IN(23);
+int posix_madvise(void* __addr, size_t __size, int __advice) __INTRODUCED_IN(23);
__END_DECLS
-#endif /* _SYS_MMAN_H_ */
+#endif
diff --git a/libc/include/sys/mount.h b/libc/include/sys/mount.h
index 26c0e0f..c0c084b 100644
--- a/libc/include/sys/mount.h
+++ b/libc/include/sys/mount.h
@@ -41,10 +41,10 @@
#define MNT_EXPIRE 4
#define UMOUNT_NOFOLLOW 8
-int mount(const char*, const char*, const char*, unsigned long, const void*);
-int umount(const char*);
-int umount2(const char*, int);
+int mount(const char* __source, const char* __target, const char* __fs_type, unsigned long __flags, const void* __data);
+int umount(const char* __target);
+int umount2(const char* __target, int __flags);
__END_DECLS
-#endif /* _SYS_MOUNT_H */
+#endif
diff --git a/libc/include/sys/msg.h b/libc/include/sys/msg.h
index ced5a3e..0273499 100644
--- a/libc/include/sys/msg.h
+++ b/libc/include/sys/msg.h
@@ -41,11 +41,11 @@
typedef __kernel_ulong_t msgqnum_t;
typedef __kernel_ulong_t msglen_t;
-int msgctl(int, int, struct msqid_ds*) __INTRODUCED_IN(26);
-int msgget(key_t, int) __INTRODUCED_IN(26);
-ssize_t msgrcv(int, void*, size_t, long, int) __INTRODUCED_IN(26);
-int msgsnd(int, const void*, size_t, int) __INTRODUCED_IN(26);
+int msgctl(int __msg_id, int __cmd, struct msqid_ds* __buf) __INTRODUCED_IN(26);
+int msgget(key_t __key, int __flags) __INTRODUCED_IN(26);
+ssize_t msgrcv(int __msg_id, void* __msgbuf_ptr, size_t __size, long __type, int __flags) __INTRODUCED_IN(26);
+int msgsnd(int __msg_id, const void* __msgbuf_ptr, size_t __size, int __flags) __INTRODUCED_IN(26);
__END_DECLS
-#endif /* _SYS_MSG_H_ */
+#endif
diff --git a/libc/include/sys/param.h b/libc/include/sys/param.h
index d3686e0..ec50da2 100644
--- a/libc/include/sys/param.h
+++ b/libc/include/sys/param.h
@@ -49,4 +49,4 @@
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
-#endif /* _SYS_PARAM_H_ */
+#endif
diff --git a/libc/include/sys/personality.h b/libc/include/sys/personality.h
index 6f3a3c9..51b5cd7 100644
--- a/libc/include/sys/personality.h
+++ b/libc/include/sys/personality.h
@@ -34,8 +34,8 @@
__BEGIN_DECLS
-int personality(unsigned int persona) __INTRODUCED_IN(15);
+int personality(unsigned int __persona) __INTRODUCED_IN(15);
__END_DECLS
-#endif /* _SYS_PERSONALITY_H_ */
+#endif
diff --git a/libc/include/sys/prctl.h b/libc/include/sys/prctl.h
index 742ed57..64f5954 100644
--- a/libc/include/sys/prctl.h
+++ b/libc/include/sys/prctl.h
@@ -35,8 +35,8 @@
__BEGIN_DECLS
-int prctl(int option, ...);
+int prctl(int __option, ...);
__END_DECLS
-#endif /* _SYS_PRCTL_H */
+#endif
diff --git a/libc/include/sys/procfs.h b/libc/include/sys/procfs.h
index eff39e2..75a1e98 100644
--- a/libc/include/sys/procfs.h
+++ b/libc/include/sys/procfs.h
@@ -59,4 +59,4 @@
__END_DECLS
-#endif /* _SYS_PROCFS_H_ */
+#endif
diff --git a/libc/include/sys/ptrace.h b/libc/include/sys/ptrace.h
index 4b881e7..022fc3a 100644
--- a/libc/include/sys/ptrace.h
+++ b/libc/include/sys/ptrace.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _SYS_PTRACE_H_
#define _SYS_PTRACE_H_
@@ -58,8 +59,8 @@
#define PT_GETSIGINFO PTRACE_GETSIGINFO
#define PT_SETSIGINFO PTRACE_SETSIGINFO
-long ptrace(int, ...);
+long ptrace(int __request, ...);
__END_DECLS
-#endif /* _SYS_PTRACE_H_ */
+#endif
diff --git a/libc/include/sys/quota.h b/libc/include/sys/quota.h
index 51f7675..157c2d9 100644
--- a/libc/include/sys/quota.h
+++ b/libc/include/sys/quota.h
@@ -40,7 +40,7 @@
__BEGIN_DECLS
-int quotactl(int, const char*, int, char*) __INTRODUCED_IN(26);
+int quotactl(int __cmd, const char* __special, int __id, char* __addr) __INTRODUCED_IN(26);
__END_DECLS
diff --git a/libc/include/sys/reboot.h b/libc/include/sys/reboot.h
index df4739e..c0c4860 100644
--- a/libc/include/sys/reboot.h
+++ b/libc/include/sys/reboot.h
@@ -42,8 +42,8 @@
#define RB_DISABLE_CAD LINUX_REBOOT_CMD_CAD_OFF
#define RB_POWER_OFF LINUX_REBOOT_CMD_POWER_OFF
-int reboot(int reboot_type);
+int reboot(int __cmd);
__END_DECLS
-#endif /* _SYS_REBOOT_H_ */
+#endif
diff --git a/libc/include/sys/reg.h b/libc/include/sys/reg.h
index 1066b6d..6c496ba 100644
--- a/libc/include/sys/reg.h
+++ b/libc/include/sys/reg.h
@@ -83,4 +83,4 @@
#endif
-#endif /* _SYS_REG_H_ */
+#endif
diff --git a/libc/include/sys/resource.h b/libc/include/sys/resource.h
index 7c43ca3..9181125 100644
--- a/libc/include/sys/resource.h
+++ b/libc/include/sys/resource.h
@@ -42,21 +42,20 @@
typedef unsigned long rlim_t;
-int getrlimit(int, struct rlimit*);
-int setrlimit(int, const struct rlimit*);
+int getrlimit(int __resource, struct rlimit* __limit);
+int setrlimit(int __resource, const struct rlimit* __limit);
-int getrlimit64(int, struct rlimit64*) __INTRODUCED_IN(21);
-int setrlimit64(int, const struct rlimit64*) __INTRODUCED_IN(21);
+int getrlimit64(int __resource, struct rlimit64* __limit) __INTRODUCED_IN(21);
+int setrlimit64(int __resource, const struct rlimit64* __limit) __INTRODUCED_IN(21);
-int getpriority(int, id_t);
-int setpriority(int, id_t, int);
+int getpriority(int __which, id_t __who);
+int setpriority(int __which, id_t __who, int __priority);
-int getrusage(int, struct rusage*);
+int getrusage(int __who, struct rusage* __usage);
-int prlimit(pid_t, int, const struct rlimit*, struct rlimit*) __INTRODUCED_IN_32(24)
- __INTRODUCED_IN_64(21);
-int prlimit64(pid_t, int, const struct rlimit64*, struct rlimit64*) __INTRODUCED_IN(21);
+int prlimit(pid_t __pid, int __resource, const struct rlimit* __new_limit, struct rlimit* __old_limit) __INTRODUCED_IN_32(24) __INTRODUCED_IN_64(21);
+int prlimit64(pid_t __pid, int __resource, const struct rlimit64* __new_limit, struct rlimit64* __old_limit) __INTRODUCED_IN(21);
__END_DECLS
-#endif /* _SYS_RESOURCE_H_ */
+#endif
diff --git a/libc/include/sys/select.h b/libc/include/sys/select.h
index 40bd32e..e919188 100644
--- a/libc/include/sys/select.h
+++ b/libc/include/sys/select.h
@@ -72,9 +72,9 @@
#define FD_ISSET(fd, set) ((__FDS_BITS(set)[__FDELT(fd)] & __FDMASK(fd)) != 0)
#endif /* defined(__BIONIC_FORTIFY) && __ANDROID_API >= 21 */
-int select(int, fd_set*, fd_set*, fd_set*, struct timeval*);
-int pselect(int, fd_set*, fd_set*, fd_set*, const struct timespec*, const sigset_t*);
+int select(int __fd_count, fd_set* __read_fds, fd_set* __write_fds, fd_set* __exception_fds, struct timeval* __timeout);
+int pselect(int __fd_count, fd_set* __read_fds, fd_set* __write_fds, fd_set* __exception_fds, const struct timespec* __timeout, const sigset_t* __mask);
__END_DECLS
-#endif /* _SYS_SELECT_H_ */
+#endif
diff --git a/libc/include/sys/sem.h b/libc/include/sys/sem.h
index be0e22d..cd62242 100644
--- a/libc/include/sys/sem.h
+++ b/libc/include/sys/sem.h
@@ -51,12 +51,12 @@
void* __pad;
};
-int semctl(int, int, int, ...) __INTRODUCED_IN(26);
-int semget(key_t, int, int) __INTRODUCED_IN(26);
-int semop(int, struct sembuf*, size_t) __INTRODUCED_IN(26);
+int semctl(int __sem_id, int __sem_num, int __cmd, ...) __INTRODUCED_IN(26);
+int semget(key_t __key, int __sem_count, int __flags) __INTRODUCED_IN(26);
+int semop(int __sem_id, struct sembuf* __ops, size_t __op_count) __INTRODUCED_IN(26);
#if defined(__USE_GNU)
-int semtimedop(int, struct sembuf*, size_t, const struct timespec*) __INTRODUCED_IN(26);
+int semtimedop(int __sem_id, struct sembuf* __ops, size_t __op_count, const struct timespec* __timeout) __INTRODUCED_IN(26);
#endif
__END_DECLS
diff --git a/libc/include/sys/sendfile.h b/libc/include/sys/sendfile.h
index 43b334c..ecdb76c 100644
--- a/libc/include/sys/sendfile.h
+++ b/libc/include/sys/sendfile.h
@@ -35,12 +35,12 @@
__BEGIN_DECLS
#if defined(__USE_FILE_OFFSET64)
-ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count) __RENAME(sendfile64) __INTRODUCED_IN(21);
+ssize_t sendfile(int __out_fd, int __in_fd, off_t* __offset, size_t __count) __RENAME(sendfile64) __INTRODUCED_IN(21);
#else
-ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count);
+ssize_t sendfile(int __out_fd, int __in_fd, off_t* __offset, size_t __count);
#endif
-ssize_t sendfile64(int out_fd, int in_fd, off64_t* offset, size_t count) __INTRODUCED_IN(21);
+ssize_t sendfile64(int __out_fd, int __in_fd, off64_t* __offset, size_t __count) __INTRODUCED_IN(21);
__END_DECLS
-#endif /* _SYS_SENDFILE_H_ */
+#endif
diff --git a/libc/include/sys/shm.h b/libc/include/sys/shm.h
index ccd3b36..4723eba 100644
--- a/libc/include/sys/shm.h
+++ b/libc/include/sys/shm.h
@@ -42,10 +42,10 @@
typedef unsigned long shmatt_t;
-void* shmat(int, const void*, int) __INTRODUCED_IN(26);
-int shmctl(int, int, struct shmid_ds*) __INTRODUCED_IN(26);
-int shmdt(const void*) __INTRODUCED_IN(26);
-int shmget(key_t, size_t, int) __INTRODUCED_IN(26);
+void* shmat(int __shm_id, const void* __addr, int __flags) __INTRODUCED_IN(26);
+int shmctl(int __shm_id, int __cmd, struct shmid_ds* __buf) __INTRODUCED_IN(26);
+int shmdt(const void* __addr) __INTRODUCED_IN(26);
+int shmget(key_t __key, size_t __size, int __flags) __INTRODUCED_IN(26);
__END_DECLS
diff --git a/libc/include/sys/signalfd.h b/libc/include/sys/signalfd.h
index 1e4d464..315622c 100644
--- a/libc/include/sys/signalfd.h
+++ b/libc/include/sys/signalfd.h
@@ -36,8 +36,8 @@
__BEGIN_DECLS
-int signalfd(int fd, const sigset_t* mask, int flags) __INTRODUCED_IN(18);
+int signalfd(int __fd, const sigset_t* __mask, int __flags) __INTRODUCED_IN(18);
__END_DECLS
-#endif /* _SYS_SIGNALFD_H */
+#endif
diff --git a/libc/include/sys/socket.h b/libc/include/sys/socket.h
index 6875d7f..ed851a2 100644
--- a/libc/include/sys/socket.h
+++ b/libc/include/sys/socket.h
@@ -115,7 +115,7 @@
#define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && (cmsg)->cmsg_len <= (unsigned long) ((mhdr)->msg_controllen - ((char*)(cmsg) - (char*)(mhdr)->msg_control)))
#if __ANDROID_API__ >= __ANDROID_API_L__
-struct cmsghdr* __cmsg_nxthdr(struct msghdr*, struct cmsghdr*) __INTRODUCED_IN(21);
+struct cmsghdr* __cmsg_nxthdr(struct msghdr* __msg, struct cmsghdr* __cmsg) __INTRODUCED_IN(21);
#else
/* TODO(danalbert): Move this into libandroid_support. */
static inline struct cmsghdr* __cmsg_nxthdr(struct msghdr* msg, struct cmsghdr* cmsg) {
@@ -299,31 +299,30 @@
# define __socketcall extern
#endif
-__socketcall int accept(int, struct sockaddr*, socklen_t*);
-__socketcall int accept4(int, struct sockaddr*, socklen_t*, int) __INTRODUCED_IN(21);
-__socketcall int bind(int, const struct sockaddr*, socklen_t);
-__socketcall int connect(int, const struct sockaddr*, socklen_t);
-__socketcall int getpeername(int, struct sockaddr*, socklen_t*);
-__socketcall int getsockname(int, struct sockaddr*, socklen_t*);
-__socketcall int getsockopt(int, int, int, void*, socklen_t*);
-__socketcall int listen(int, int);
-__socketcall int recvmmsg(int, struct mmsghdr*, unsigned int, int, const struct timespec*)
+__socketcall int accept(int __fd, struct sockaddr* __addr, socklen_t* __addr_length);
+__socketcall int accept4(int __fd, struct sockaddr* __addr, socklen_t* __addr_length, int __flags) __INTRODUCED_IN(21);
+__socketcall int bind(int __fd, const struct sockaddr* __addr, socklen_t __addr_length);
+__socketcall int connect(int __fd, const struct sockaddr* __addr, socklen_t __addr_length);
+__socketcall int getpeername(int __fd, struct sockaddr* __addr, socklen_t* __addr_length);
+__socketcall int getsockname(int __fd, struct sockaddr* __addr, socklen_t* __addr_length);
+__socketcall int getsockopt(int __fd, int __level, int __option, void* __value, socklen_t* __value_length);
+__socketcall int listen(int __fd, int __backlog);
+__socketcall int recvmmsg(int __fd, struct mmsghdr* __msgs, unsigned int __msg_count, int __flags, const struct timespec* __timeout)
__INTRODUCED_IN(21);
-__socketcall ssize_t recvmsg(int, struct msghdr*, int);
-__socketcall int sendmmsg(int, const struct mmsghdr*, unsigned int, int) __INTRODUCED_IN(21);
-__socketcall ssize_t sendmsg(int, const struct msghdr*, int);
-__socketcall int setsockopt(int, int, int, const void*, socklen_t);
-__socketcall int shutdown(int, int);
-__socketcall int socket(int, int, int);
-__socketcall int socketpair(int, int, int, int*);
+__socketcall ssize_t recvmsg(int __fd, struct msghdr* __msg, int __flags);
+__socketcall int sendmmsg(int __fd, const struct mmsghdr* __msgs, unsigned int __msg_count, int __flags) __INTRODUCED_IN(21);
+__socketcall ssize_t sendmsg(int __fd, const struct msghdr* __msg, int __flags);
+__socketcall int setsockopt(int __fd, int __level, int __option, const void* __value, socklen_t __value_length);
+__socketcall int shutdown(int __fd, int __how);
+__socketcall int socket(int __af, int __type, int __protocol);
+__socketcall int socketpair(int __af, int __type, int __protocol, int __fds[2]);
-ssize_t recv(int, void*, size_t, int) __overloadable __RENAME_CLANG(recv);
-ssize_t send(int, const void*, size_t, int) __overloadable __RENAME_CLANG(send);
+ssize_t recv(int __fd, void* __buf, size_t __n, int __flags) __overloadable __RENAME_CLANG(recv);
+ssize_t send(int __fd, const void* __buf, size_t __n, int __flags) __overloadable __RENAME_CLANG(send);
-__socketcall ssize_t sendto(int, const void*, size_t, int, const struct sockaddr*, socklen_t)
+__socketcall ssize_t sendto(int __fd, const void* __buf, size_t __n, int __flags, const struct sockaddr* __dst_addr, socklen_t __dst_addr_length)
__overloadable __RENAME_CLANG(sendto);
-__socketcall ssize_t recvfrom(int, void*, size_t, int, struct sockaddr*,
- socklen_t*) __overloadable __RENAME_CLANG(recvfrom);
+__socketcall ssize_t recvfrom(int __fd, void* __buf, size_t __n, int __flags, struct sockaddr* __src_addr, socklen_t* __src_addr_length) __overloadable __RENAME_CLANG(recvfrom);
#if defined(__BIONIC_INCLUDE_FORTIFY_HEADERS)
#include <bits/fortify/socket.h>
@@ -333,4 +332,4 @@
__END_DECLS
-#endif /* _SYS_SOCKET_H */
+#endif
diff --git a/libc/include/sys/stat.h b/libc/include/sys/stat.h
index b8e3cb1..14b5224 100644
--- a/libc/include/sys/stat.h
+++ b/libc/include/sys/stat.h
@@ -151,46 +151,46 @@
#define S_TYPEISSHM(__sb) 0
#define S_TYPEISTMO(__sb) 0
-int chmod(const char*, mode_t);
-int fchmod(int, mode_t);
-int mkdir(const char*, mode_t);
+int chmod(const char* __path, mode_t __mode);
+int fchmod(int __fd, mode_t __mode);
+int mkdir(const char* __path, mode_t __mode);
-int fstat(int, struct stat*);
-int fstat64(int, struct stat64*) __INTRODUCED_IN(21);
-int fstatat(int, const char*, struct stat*, int);
-int fstatat64(int, const char*, struct stat64*, int) __INTRODUCED_IN(21);
-int lstat(const char*, struct stat*);
-int lstat64(const char*, struct stat64*) __INTRODUCED_IN(21);
-int stat(const char*, struct stat*);
-int stat64(const char*, struct stat64*) __INTRODUCED_IN(21);
+int fstat(int __fd, struct stat* __buf);
+int fstat64(int __fd, struct stat64* __buf) __INTRODUCED_IN(21);
+int fstatat(int __dir_fd, const char* __path, struct stat* __buf, int __flags);
+int fstatat64(int __dir_fd, const char* __path, struct stat64* __buf, int __flags) __INTRODUCED_IN(21);
+int lstat(const char* __path, struct stat* __buf);
+int lstat64(const char* __path, struct stat64* __buf) __INTRODUCED_IN(21);
+int stat(const char* __path, struct stat* __buf);
+int stat64(const char* __path, struct stat64* __buf) __INTRODUCED_IN(21);
-int mknod(const char*, mode_t, dev_t);
-mode_t umask(mode_t) __overloadable __RENAME_CLANG(umask);
+int mknod(const char* __path, mode_t __mode, dev_t __dev);
+mode_t umask(mode_t __mask) __overloadable __RENAME_CLANG(umask);
#if defined(__BIONIC_INCLUDE_FORTIFY_HEADERS)
#include <bits/fortify/stat.h>
#endif
#if __ANDROID_API__ >= __ANDROID_API_L__
-int mkfifo(const char*, mode_t) __INTRODUCED_IN(21);
+int mkfifo(const char* __path, mode_t __mode) __INTRODUCED_IN(21);
#else
// Implemented as a static inline before 21.
#endif
-int mkfifoat(int, const char*, mode_t) __INTRODUCED_IN(23);
+int mkfifoat(int __dir_fd, const char* __path, mode_t __mode) __INTRODUCED_IN(23);
-int fchmodat(int, const char*, mode_t, int);
-int mkdirat(int, const char*, mode_t);
-int mknodat(int, const char*, mode_t, dev_t) __INTRODUCED_IN(21);
+int fchmodat(int __dir_fd, const char* __path, mode_t __mode, int __flags);
+int mkdirat(int __dir_fd, const char* __path, mode_t __mode);
+int mknodat(int __dir_fd, const char* __path, mode_t __mode, dev_t __dev) __INTRODUCED_IN(21);
#define UTIME_NOW ((1L << 30) - 1L)
#define UTIME_OMIT ((1L << 30) - 2L)
-int utimensat(int fd, const char* path, const struct timespec times[2], int flags)
+int utimensat(int __dir_fd, const char* __path, const struct timespec __times[2], int __flags)
__INTRODUCED_IN(12);
-int futimens(int fd, const struct timespec times[2]) __INTRODUCED_IN(19);
+int futimens(int __dir_fd, const struct timespec __times[2]) __INTRODUCED_IN(19);
__END_DECLS
#include <android/legacy_sys_stat_inlines.h>
-#endif /* _SYS_STAT_H_ */
+#endif
diff --git a/libc/include/sys/statvfs.h b/libc/include/sys/statvfs.h
index 0f421a4..e60cadc 100644
--- a/libc/include/sys/statvfs.h
+++ b/libc/include/sys/statvfs.h
@@ -59,11 +59,11 @@
#define ST_NODIRATIME 0x0800
#define ST_RELATIME 0x1000
-int statvfs(const char*, struct statvfs*) __INTRODUCED_IN(19);
-int statvfs64(const char*, struct statvfs64*) __INTRODUCED_IN(21);
-int fstatvfs(int, struct statvfs*) __INTRODUCED_IN(19);
-int fstatvfs64(int, struct statvfs64*) __INTRODUCED_IN(21);
+int statvfs(const char* __path, struct statvfs* __buf) __INTRODUCED_IN(19);
+int statvfs64(const char* __path, struct statvfs64* __buf) __INTRODUCED_IN(21);
+int fstatvfs(int __fd, struct statvfs* __buf) __INTRODUCED_IN(19);
+int fstatvfs64(int __fd, struct statvfs64* __buf) __INTRODUCED_IN(21);
__END_DECLS
-#endif /* _SYS_STATVFS_H_ */
+#endif
diff --git a/libc/include/sys/swap.h b/libc/include/sys/swap.h
index e79af97..8a30cce 100644
--- a/libc/include/sys/swap.h
+++ b/libc/include/sys/swap.h
@@ -38,9 +38,9 @@
#define SWAP_FLAG_PRIO_MASK 0x7fff
#define SWAP_FLAG_PRIO_SHIFT 0
-int swapon(const char*, int) __INTRODUCED_IN(19);
-int swapoff(const char*) __INTRODUCED_IN(19);
+int swapon(const char* __path, int __flags) __INTRODUCED_IN(19);
+int swapoff(const char* __path) __INTRODUCED_IN(19);
__END_DECLS
-#endif /* _SYS_SWAP_H_ */
+#endif
diff --git a/libc/include/sys/sysinfo.h b/libc/include/sys/sysinfo.h
index 9a10d64..6da02ee 100644
--- a/libc/include/sys/sysinfo.h
+++ b/libc/include/sys/sysinfo.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _SYS_SYSINFO_H_
#define _SYS_SYSINFO_H_
@@ -33,16 +34,12 @@
__BEGIN_DECLS
-int sysinfo(struct sysinfo* info);
-
+int sysinfo(struct sysinfo* __info);
int get_nprocs_conf(void) __INTRODUCED_IN(23);
-
int get_nprocs(void) __INTRODUCED_IN(23);
-
long get_phys_pages(void) __INTRODUCED_IN(23);
-
long get_avphys_pages(void) __INTRODUCED_IN(23);
__END_DECLS
-#endif /* _SYS_SYSINFO_H_ */
+#endif
diff --git a/libc/include/sys/system_properties.h b/libc/include/sys/system_properties.h
index d075859..f469599 100644
--- a/libc/include/sys/system_properties.h
+++ b/libc/include/sys/system_properties.h
@@ -41,9 +41,9 @@
#define PROP_VALUE_MAX 92
/*
- * Sets system property `key` to `value`, creating the system property if it doesn't already exist.
+ * Sets system property `name` to `value`, creating the system property if it doesn't already exist.
*/
-int __system_property_set(const char* key, const char* value) __INTRODUCED_IN(12);
+int __system_property_set(const char* __name, const char* __value) __INTRODUCED_IN(12);
/*
* Returns a `prop_info` corresponding system property `name`, or nullptr if it doesn't exist.
@@ -51,14 +51,14 @@
*
* Property lookup is expensive, so it can be useful to cache the result of this function.
*/
-const prop_info* __system_property_find(const char* name);
+const prop_info* __system_property_find(const char* __name);
/*
* Calls `callback` with a consistent trio of name, value, and serial number for property `pi`.
*/
-void __system_property_read_callback(const prop_info *pi,
- void (*callback)(void* cookie, const char *name, const char *value, uint32_t serial),
- void* cookie) __INTRODUCED_IN(26);
+void __system_property_read_callback(const prop_info* __pi,
+ void (*__callback)(void* __cookie, const char* __name, const char* __value, uint32_t __serial),
+ void* __cookie) __INTRODUCED_IN(26);
/*
* Passes a `prop_info` for each system property to the provided
@@ -66,7 +66,7 @@
*
* This method is for inspecting and debugging the property system, and not generally useful.
*/
-int __system_property_foreach(void (*propfn)(const prop_info* pi, void* cookie), void* cookie)
+int __system_property_foreach(void (*__callback)(const prop_info* __pi, void* __cookie), void* __cookie)
__INTRODUCED_IN(19);
/*
@@ -82,20 +82,17 @@
* timed out.
*/
struct timespec;
-bool __system_property_wait(const prop_info* pi,
- uint32_t old_serial,
- uint32_t* new_serial_ptr,
- const struct timespec* relative_timeout)
+bool __system_property_wait(const prop_info* __pi, uint32_t __old_serial, uint32_t* __new_serial_ptr, const struct timespec* __relative_timeout)
__INTRODUCED_IN(26);
/* Deprecated. In Android O and above, there's no limit on property name length. */
#define PROP_NAME_MAX 32
/* Deprecated. Use __system_property_read_callback instead. */
-int __system_property_read(const prop_info* pi, char* name, char* value);
+int __system_property_read(const prop_info* __pi, char* __name, char* __value);
/* Deprecated. Use __system_property_read_callback instead. */
-int __system_property_get(const char* name, char* value);
+int __system_property_get(const char* __name, char* __value);
/* Deprecated. Use __system_property_foreach instead. */
-const prop_info* __system_property_find_nth(unsigned n);
+const prop_info* __system_property_find_nth(unsigned __n);
__END_DECLS
diff --git a/libc/include/sys/time.h b/libc/include/sys/time.h
index 4d477e1..45190c3 100644
--- a/libc/include/sys/time.h
+++ b/libc/include/sys/time.h
@@ -38,21 +38,21 @@
__BEGIN_DECLS
-int gettimeofday(struct timeval*, struct timezone*);
-int settimeofday(const struct timeval*, const struct timezone*);
+int gettimeofday(struct timeval* __tv, struct timezone* __tz);
+int settimeofday(const struct timeval* __tv, const struct timezone* __tz);
-int getitimer(int, struct itimerval*);
-int setitimer(int, const struct itimerval*, struct itimerval*);
+int getitimer(int __which, struct itimerval* __current_value);
+int setitimer(int __which, const struct itimerval* __new_value, struct itimerval* __old_value);
-int utimes(const char*, const struct timeval*);
+int utimes(const char* __path, const struct timeval __times[2]);
#if defined(__USE_BSD)
-int futimes(int, const struct timeval[2]) __INTRODUCED_IN(26);
-int lutimes(const char*, const struct timeval[2]) __INTRODUCED_IN(26);
+int futimes(int __fd, const struct timeval __times[2]) __INTRODUCED_IN(26);
+int lutimes(const char* __path, const struct timeval __times[2]) __INTRODUCED_IN(26);
#endif
#if defined(__USE_GNU)
-int futimesat(int, const char*, const struct timeval[2]) __INTRODUCED_IN(26);
+int futimesat(int __dir_fd, const char* __path, const struct timeval __times[2]) __INTRODUCED_IN(26);
#endif
#define timerclear(a) \
@@ -97,4 +97,4 @@
__END_DECLS
-#endif /* _SYS_TIME_H_ */
+#endif
diff --git a/libc/include/sys/timerfd.h b/libc/include/sys/timerfd.h
index a500060..7bf675b 100644
--- a/libc/include/sys/timerfd.h
+++ b/libc/include/sys/timerfd.h
@@ -42,10 +42,10 @@
#define TFD_CLOEXEC O_CLOEXEC
#define TFD_NONBLOCK O_NONBLOCK
-int timerfd_create(clockid_t, int) __INTRODUCED_IN(19);
-int timerfd_settime(int, int, const struct itimerspec*, struct itimerspec*) __INTRODUCED_IN(19);
-int timerfd_gettime(int, struct itimerspec*) __INTRODUCED_IN(19);
+int timerfd_create(clockid_t __clock, int __flags) __INTRODUCED_IN(19);
+int timerfd_settime(int __fd, int __flags, const struct itimerspec* __new_value, struct itimerspec* __old_value) __INTRODUCED_IN(19);
+int timerfd_gettime(int __fd, struct itimerspec* __current_value) __INTRODUCED_IN(19);
__END_DECLS
-#endif /* _SYS_TIMERFD_H */
+#endif
diff --git a/libc/include/sys/times.h b/libc/include/sys/times.h
index f52db1f..3c8a4ef 100644
--- a/libc/include/sys/times.h
+++ b/libc/include/sys/times.h
@@ -35,8 +35,8 @@
__BEGIN_DECLS
-clock_t times(struct tms*);
+clock_t times(struct tms* __buf);
__END_DECLS
-#endif /* _SYS_TIMES_H_ */
+#endif
diff --git a/libc/include/sys/timex.h b/libc/include/sys/timex.h
index f704ce8..74c8611 100644
--- a/libc/include/sys/timex.h
+++ b/libc/include/sys/timex.h
@@ -35,9 +35,9 @@
__BEGIN_DECLS
-int adjtimex(struct timex*) __INTRODUCED_IN(24);
-int clock_adjtime(clockid_t, struct timex*) __INTRODUCED_IN(24);
+int adjtimex(struct timex* __buf) __INTRODUCED_IN(24);
+int clock_adjtime(clockid_t __clock, struct timex* __tx) __INTRODUCED_IN(24);
__END_DECLS
-#endif /* _SYS_TIMEX_H_ */
+#endif
diff --git a/libc/include/sys/uio.h b/libc/include/sys/uio.h
index b166277..37961e3 100644
--- a/libc/include/sys/uio.h
+++ b/libc/include/sys/uio.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _SYS_UIO_H_
#define _SYS_UIO_H_
@@ -34,23 +35,21 @@
__BEGIN_DECLS
-ssize_t readv(int, const struct iovec*, int);
-ssize_t writev(int, const struct iovec*, int);
+ssize_t readv(int __fd, const struct iovec* __iov, int __count);
+ssize_t writev(int __fd, const struct iovec* __iov, int __count);
#if defined(__USE_GNU)
-ssize_t preadv(int, const struct iovec*, int, off_t) __RENAME_IF_FILE_OFFSET64(preadv64) __INTRODUCED_IN(24);
-ssize_t pwritev(int, const struct iovec*, int, off_t) __RENAME_IF_FILE_OFFSET64(pwritev64) __INTRODUCED_IN(24);
-ssize_t preadv64(int, const struct iovec*, int, off64_t) __INTRODUCED_IN(24);
-ssize_t pwritev64(int, const struct iovec*, int, off64_t) __INTRODUCED_IN(24);
+ssize_t preadv(int __fd, const struct iovec* __iov, int __count, off_t __offset) __RENAME_IF_FILE_OFFSET64(preadv64) __INTRODUCED_IN(24);
+ssize_t pwritev(int __fd, const struct iovec* __iov, int __count, off_t __offset) __RENAME_IF_FILE_OFFSET64(pwritev64) __INTRODUCED_IN(24);
+ssize_t preadv64(int __fd, const struct iovec* __iov, int __count, off64_t __offset) __INTRODUCED_IN(24);
+ssize_t pwritev64(int __fd, const struct iovec* __iov, int __count, off64_t __offset) __INTRODUCED_IN(24);
#endif
#if defined(__USE_GNU)
-ssize_t process_vm_readv(pid_t, const struct iovec*, unsigned long, const struct iovec*,
- unsigned long, unsigned long) __INTRODUCED_IN(23);
-ssize_t process_vm_writev(pid_t, const struct iovec*, unsigned long, const struct iovec*,
- unsigned long, unsigned long) __INTRODUCED_IN(23);
+ssize_t process_vm_readv(pid_t __pid, const struct iovec* __local_iov, unsigned long __local_iov_count, const struct iovec* __remote_iov, unsigned long __remote_iov_count, unsigned long __flags) __INTRODUCED_IN(23);
+ssize_t process_vm_writev(pid_t __pid, const struct iovec* __local_iov, unsigned long __local_iov_count, const struct iovec* __remote_iov, unsigned long __remote_iov_count, unsigned long __flags) __INTRODUCED_IN(23);
#endif
__END_DECLS
-#endif /* _SYS_UIO_H_ */
+#endif
diff --git a/libc/include/sys/utsname.h b/libc/include/sys/utsname.h
index b3856a7..2420fb4 100644
--- a/libc/include/sys/utsname.h
+++ b/libc/include/sys/utsname.h
@@ -36,16 +36,16 @@
#define SYS_NMLN 65
struct utsname {
- char sysname [SYS_NMLN];
- char nodename [SYS_NMLN];
- char release [SYS_NMLN];
- char version [SYS_NMLN];
- char machine [SYS_NMLN];
- char domainname[SYS_NMLN];
+ char sysname[SYS_NMLN];
+ char nodename[SYS_NMLN];
+ char release[SYS_NMLN];
+ char version[SYS_NMLN];
+ char machine[SYS_NMLN];
+ char domainname[SYS_NMLN];
};
-int uname(struct utsname*);
+int uname(struct utsname* __buf);
__END_DECLS
-#endif /* _SYS_UTSNAME_H_ */
+#endif
diff --git a/libc/include/sys/vfs.h b/libc/include/sys/vfs.h
index 3078683..9237ee6 100644
--- a/libc/include/sys/vfs.h
+++ b/libc/include/sys/vfs.h
@@ -137,11 +137,11 @@
#define XENIX_SUPER_MAGIC 0x012FF7B4
#define XFS_SUPER_MAGIC 0x58465342
-int statfs(const char*, struct statfs*);
-int statfs64(const char*, struct statfs64*) __INTRODUCED_IN(21);
-int fstatfs(int, struct statfs*);
-int fstatfs64(int, struct statfs64*) __INTRODUCED_IN(21);
+int statfs(const char* __path, struct statfs* __buf);
+int statfs64(const char* __path, struct statfs64* __buf) __INTRODUCED_IN(21);
+int fstatfs(int __fd, struct statfs* __buf);
+int fstatfs64(int __fd, struct statfs64* __buf) __INTRODUCED_IN(21);
__END_DECLS
-#endif /* _SYS_VFS_H_ */
+#endif
diff --git a/libc/include/sys/wait.h b/libc/include/sys/wait.h
index 0247b2b..e259e31 100644
--- a/libc/include/sys/wait.h
+++ b/libc/include/sys/wait.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _SYS_WAIT_H_
#define _SYS_WAIT_H_
@@ -49,10 +50,10 @@
#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
-pid_t wait(int*);
-pid_t waitpid(pid_t, int*, int);
+pid_t wait(int* __status);
+pid_t waitpid(pid_t __pid, int* __status, int __options);
#if __ANDROID_API__ >= __ANDROID_API_J_MR2__
-pid_t wait4(pid_t, int*, int, struct rusage*) __INTRODUCED_IN(18);
+pid_t wait4(pid_t __pid, int* __status, int __options, struct rusage* __rusage) __INTRODUCED_IN(18);
#else
// Implemented as a static inline before 18.
#endif
@@ -63,10 +64,10 @@
*/
typedef int idtype_t;
-int waitid(idtype_t which, id_t id, siginfo_t* info, int options);
+int waitid(idtype_t __type, id_t __id, siginfo_t* __info, int __options);
__END_DECLS
#include <android/legacy_sys_wait_inlines.h>
-#endif /* _SYS_WAIT_H_ */
+#endif
diff --git a/libc/include/sys/xattr.h b/libc/include/sys/xattr.h
index 37e352d..d15b3fc 100644
--- a/libc/include/sys/xattr.h
+++ b/libc/include/sys/xattr.h
@@ -35,25 +35,25 @@
__BEGIN_DECLS
-int fsetxattr(int fd, const char* name, const void* value, size_t size, int flags)
+int fsetxattr(int __fd, const char* __name, const void* __value, size_t __size, int __flags)
__INTRODUCED_IN(16);
-int setxattr(const char* path, const char* name, const void* value, size_t size, int flags)
+int setxattr(const char* __path, const char* __name, const void* __value, size_t __size, int __flags)
__INTRODUCED_IN(16);
-int lsetxattr(const char* path, const char* name, const void* value, size_t size, int flags)
+int lsetxattr(const char* __path, const char* __name, const void* __value, size_t __size, int __flags)
__INTRODUCED_IN(16);
-ssize_t fgetxattr(int fd, const char* name, void* value, size_t size) __INTRODUCED_IN(16);
-ssize_t getxattr(const char* path, const char* name, void* value, size_t size) __INTRODUCED_IN(16);
-ssize_t lgetxattr(const char* path, const char* name, void* value, size_t size) __INTRODUCED_IN(16);
+ssize_t fgetxattr(int __fd, const char* __name, void* __value, size_t __size) __INTRODUCED_IN(16);
+ssize_t getxattr(const char* __path, const char* __name, void* __value, size_t __size) __INTRODUCED_IN(16);
+ssize_t lgetxattr(const char* __path, const char* __name, void* __value, size_t __size) __INTRODUCED_IN(16);
-ssize_t listxattr(const char* path, char* list, size_t size) __INTRODUCED_IN(16);
-ssize_t llistxattr(const char* path, char* list, size_t size) __INTRODUCED_IN(16);
-ssize_t flistxattr(int fd, char* list, size_t size) __INTRODUCED_IN(16);
+ssize_t listxattr(const char* __path, char* __list, size_t __size) __INTRODUCED_IN(16);
+ssize_t llistxattr(const char* __path, char* __list, size_t __size) __INTRODUCED_IN(16);
+ssize_t flistxattr(int __fd, char* __list, size_t __size) __INTRODUCED_IN(16);
-int removexattr(const char* path, const char* name) __INTRODUCED_IN(16);
-int lremovexattr(const char* path, const char* name) __INTRODUCED_IN(16);
-int fremovexattr(int fd, const char* name) __INTRODUCED_IN(16);
+int removexattr(const char* __path, const char* __name) __INTRODUCED_IN(16);
+int lremovexattr(const char* __path, const char* __name) __INTRODUCED_IN(16);
+int fremovexattr(int __fd, const char* __name) __INTRODUCED_IN(16);
__END_DECLS
-#endif /* _SYS_XATTR_H_ */
+#endif
diff --git a/libc/include/termios.h b/libc/include/termios.h
index 66ae71c..3eaab00 100644
--- a/libc/include/termios.h
+++ b/libc/include/termios.h
@@ -37,23 +37,23 @@
#if __ANDROID_API__ >= __ANDROID_API_L__
// Implemented as static inlines before 21.
-speed_t cfgetispeed(const struct termios*) __INTRODUCED_IN(21);
-speed_t cfgetospeed(const struct termios*) __INTRODUCED_IN(21);
-void cfmakeraw(struct termios*) __INTRODUCED_IN(21);
-int cfsetspeed(struct termios*, speed_t) __INTRODUCED_IN(21);
-int cfsetispeed(struct termios*, speed_t) __INTRODUCED_IN(21);
-int cfsetospeed(struct termios*, speed_t) __INTRODUCED_IN(21);
-int tcdrain(int) __INTRODUCED_IN(21);
-int tcflow(int, int) __INTRODUCED_IN(21);
-int tcflush(int, int) __INTRODUCED_IN(21);
-int tcgetattr(int, struct termios*) __INTRODUCED_IN(21);
-pid_t tcgetsid(int) __INTRODUCED_IN(21);
-int tcsendbreak(int, int) __INTRODUCED_IN(21);
-int tcsetattr(int, int, const struct termios*) __INTRODUCED_IN(21);
+speed_t cfgetispeed(const struct termios* __t) __INTRODUCED_IN(21);
+speed_t cfgetospeed(const struct termios* __t) __INTRODUCED_IN(21);
+void cfmakeraw(struct termios* __t) __INTRODUCED_IN(21);
+int cfsetspeed(struct termios* __t, speed_t __speed) __INTRODUCED_IN(21);
+int cfsetispeed(struct termios* __t, speed_t __speed) __INTRODUCED_IN(21);
+int cfsetospeed(struct termios* __t, speed_t __speed) __INTRODUCED_IN(21);
+int tcdrain(int __fd) __INTRODUCED_IN(21);
+int tcflow(int __fd, int __action) __INTRODUCED_IN(21);
+int tcflush(int __fd, int __queue) __INTRODUCED_IN(21);
+int tcgetattr(int __fd, struct termios* __t) __INTRODUCED_IN(21);
+pid_t tcgetsid(int __fd) __INTRODUCED_IN(21);
+int tcsendbreak(int __fd, int __duration) __INTRODUCED_IN(21);
+int tcsetattr(int __fd, int __optional_actions, const struct termios* __t) __INTRODUCED_IN(21);
#endif
__END_DECLS
#include <android/legacy_termios_inlines.h>
-#endif /* _TERMIOS_H_ */
+#endif
diff --git a/libc/include/time.h b/libc/include/time.h
index 9fde77e..8e78949 100644
--- a/libc/include/time.h
+++ b/libc/include/time.h
@@ -59,54 +59,54 @@
#define TM_ZONE tm_zone
-time_t time(time_t*);
-int nanosleep(const struct timespec*, struct timespec*);
+time_t time(time_t* __t);
+int nanosleep(const struct timespec* __request, struct timespec* __remainder);
-char* asctime(const struct tm*);
-char* asctime_r(const struct tm*, char*);
+char* asctime(const struct tm* __tm);
+char* asctime_r(const struct tm* __tm, char* __buf);
-double difftime(time_t, time_t);
-time_t mktime(struct tm*);
+double difftime(time_t __lhs, time_t __rhs);
+time_t mktime(struct tm* __tm);
-struct tm* localtime(const time_t*);
-struct tm* localtime_r(const time_t*, struct tm*);
+struct tm* localtime(const time_t* __t);
+struct tm* localtime_r(const time_t* __t, struct tm* __tm);
-struct tm* gmtime(const time_t*);
-struct tm* gmtime_r(const time_t*, struct tm*);
+struct tm* gmtime(const time_t* __t);
+struct tm* gmtime_r(const time_t* __t, struct tm* __tm);
-char* strptime(const char*, const char*, struct tm*);
-size_t strftime(char*, size_t, const char*, const struct tm*);
+char* strptime(const char* __s, const char* __fmt, struct tm* __tm);
+size_t strftime(char* __buf, size_t __n, const char* __fmt, const struct tm* __tm);
#if __ANDROID_API__ >= __ANDROID_API_L__
-size_t strftime_l(char*, size_t, const char*, const struct tm*, locale_t) __INTRODUCED_IN(21);
+size_t strftime_l(char* __buf, size_t __n, const char* __fmt, const struct tm* __tm, locale_t __l) __INTRODUCED_IN(21);
#else
// Implemented as static inline before 21.
#endif
-char* ctime(const time_t*);
-char* ctime_r(const time_t*, char*);
+char* ctime(const time_t* __t);
+char* ctime_r(const time_t* __t, char* __buf);
void tzset(void);
clock_t clock(void);
-int clock_getcpuclockid(pid_t, clockid_t*) __INTRODUCED_IN(23);
+int clock_getcpuclockid(pid_t __pid, clockid_t* __clock) __INTRODUCED_IN(23);
-int clock_getres(clockid_t, struct timespec*);
-int clock_gettime(clockid_t, struct timespec*);
-int clock_nanosleep(clockid_t, int, const struct timespec*, struct timespec*);
-int clock_settime(clockid_t, const struct timespec*);
+int clock_getres(clockid_t __clock, struct timespec* __resolution);
+int clock_gettime(clockid_t __clock, struct timespec* __ts);
+int clock_nanosleep(clockid_t __clock, int __flags, const struct timespec* __request, struct timespec* __remainder);
+int clock_settime(clockid_t __clock, const struct timespec* __ts);
-int timer_create(int, struct sigevent*, timer_t*);
-int timer_delete(timer_t);
-int timer_settime(timer_t, int, const struct itimerspec*, struct itimerspec*);
-int timer_gettime(timer_t, struct itimerspec*);
-int timer_getoverrun(timer_t);
+int timer_create(clockid_t __clock, struct sigevent* __event, timer_t* __timer_ptr);
+int timer_delete(timer_t __timer);
+int timer_settime(timer_t __timer, int __flags, const struct itimerspec* __new_value, struct itimerspec* __old_value);
+int timer_gettime(timer_t __timer, struct itimerspec* __ts);
+int timer_getoverrun(timer_t __timer);
/* Non-standard extensions that are in the BSDs and glibc. */
-time_t timelocal(struct tm*) __INTRODUCED_IN(12);
-time_t timegm(struct tm*) __INTRODUCED_IN(12);
+time_t timelocal(struct tm* __tm) __INTRODUCED_IN(12);
+time_t timegm(struct tm* __tm) __INTRODUCED_IN(12);
__END_DECLS
-#endif /* _TIME_H_ */
+#endif
diff --git a/libc/include/uchar.h b/libc/include/uchar.h
index ac0cf1d..e59d6a9 100644
--- a/libc/include/uchar.h
+++ b/libc/include/uchar.h
@@ -43,11 +43,11 @@
#define __STD_UTF_16__ 1
#define __STD_UTF_32__ 1
-size_t c16rtomb(char*, char16_t, mbstate_t*) __INTRODUCED_IN(21);
-size_t c32rtomb(char*, char32_t, mbstate_t*) __INTRODUCED_IN(21);
-size_t mbrtoc16(char16_t*, const char*, size_t, mbstate_t*) __INTRODUCED_IN(21);
-size_t mbrtoc32(char32_t*, const char*, size_t, mbstate_t*) __INTRODUCED_IN(21);
+size_t c16rtomb(char* __buf, char16_t __ch16, mbstate_t* __ps) __INTRODUCED_IN(21);
+size_t c32rtomb(char* __buf, char32_t __ch32, mbstate_t* __ps) __INTRODUCED_IN(21);
+size_t mbrtoc16(char16_t* __ch16, const char* __s, size_t __n, mbstate_t* __ps) __INTRODUCED_IN(21);
+size_t mbrtoc32(char32_t* __ch32, const char* __s, size_t __n, mbstate_t* __ps) __INTRODUCED_IN(21);
__END_DECLS
-#endif /* _UCHAR_H_ */
+#endif
diff --git a/libc/include/utime.h b/libc/include/utime.h
index 9783859..be6b894 100644
--- a/libc/include/utime.h
+++ b/libc/include/utime.h
@@ -35,8 +35,8 @@
__BEGIN_DECLS
-int utime(const char*, const struct utimbuf*);
+int utime(const char* __filename, const struct utimbuf* __times);
__END_DECLS
-#endif /* _UTIME_H_ */
+#endif
diff --git a/libc/include/wchar.h b/libc/include/wchar.h
index 4494cb0..1dda4bd 100644
--- a/libc/include/wchar.h
+++ b/libc/include/wchar.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _WCHAR_H_
#define _WCHAR_H_
@@ -42,98 +43,98 @@
__BEGIN_DECLS
-wint_t btowc(int);
-int fwprintf(FILE *, const wchar_t *, ...);
-int fwscanf(FILE *, const wchar_t *, ...);
-wint_t fgetwc(FILE *);
-wchar_t *fgetws(wchar_t *, int, FILE *);
-wint_t fputwc(wchar_t, FILE *);
-int fputws(const wchar_t *, FILE *);
-int fwide(FILE *, int);
-wint_t getwc(FILE *);
-wint_t getwchar(void);
-int mbsinit(const mbstate_t *);
-size_t mbrlen(const char *, size_t, mbstate_t *);
-size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
-size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*);
-size_t mbsnrtowcs(wchar_t*, const char**, size_t, size_t, mbstate_t*) __INTRODUCED_IN(21);
-wint_t putwc(wchar_t, FILE *);
-wint_t putwchar(wchar_t);
-int swprintf(wchar_t *, size_t, const wchar_t *, ...);
-int swscanf(const wchar_t *, const wchar_t *, ...);
-wint_t ungetwc(wint_t, FILE *);
-int vfwprintf(FILE*, const wchar_t*, va_list);
-int vfwscanf(FILE*, const wchar_t*, va_list) __INTRODUCED_IN(21);
-int vswprintf(wchar_t*, size_t, const wchar_t*, va_list);
-int vswscanf(const wchar_t*, const wchar_t*, va_list) __INTRODUCED_IN(21);
-int vwprintf(const wchar_t*, va_list);
-int vwscanf(const wchar_t*, va_list) __INTRODUCED_IN(21);
-wchar_t* wcpcpy (wchar_t*, const wchar_t *);
-wchar_t* wcpncpy (wchar_t*, const wchar_t *, size_t);
-size_t wcrtomb(char *, wchar_t, mbstate_t *);
-int wcscasecmp(const wchar_t *, const wchar_t *);
-int wcscasecmp_l(const wchar_t*, const wchar_t*, locale_t) __INTRODUCED_IN(23);
-wchar_t *wcscat(wchar_t *, const wchar_t *);
-wchar_t *wcschr(const wchar_t *, wchar_t);
-int wcscmp(const wchar_t *, const wchar_t *);
-int wcscoll(const wchar_t *, const wchar_t *);
-wchar_t *wcscpy(wchar_t *, const wchar_t *);
-size_t wcscspn(const wchar_t *, const wchar_t *);
-size_t wcsftime(wchar_t *, size_t, const wchar_t *, const struct tm *);
-size_t wcslen(const wchar_t *);
-int wcsncasecmp(const wchar_t *, const wchar_t *, size_t);
-int wcsncasecmp_l(const wchar_t*, const wchar_t*, size_t, locale_t) __INTRODUCED_IN(23);
-wchar_t *wcsncat(wchar_t *, const wchar_t *, size_t);
-int wcsncmp(const wchar_t *, const wchar_t *, size_t);
-wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t);
-size_t wcsnrtombs(char*, const wchar_t**, size_t, size_t, mbstate_t*) __INTRODUCED_IN(21);
-wchar_t *wcspbrk(const wchar_t *, const wchar_t *);
-wchar_t *wcsrchr(const wchar_t *, wchar_t);
-size_t wcsrtombs(char*, const wchar_t**, size_t, mbstate_t*);
-size_t wcsspn(const wchar_t *, const wchar_t *);
-wchar_t *wcsstr(const wchar_t *, const wchar_t *);
-double wcstod(const wchar_t*, wchar_t**);
-float wcstof(const wchar_t*, wchar_t**) __INTRODUCED_IN(21);
-wchar_t* wcstok(wchar_t*, const wchar_t*, wchar_t**);
-long wcstol(const wchar_t*, wchar_t**, int);
-long long wcstoll(const wchar_t*, wchar_t**, int) __INTRODUCED_IN(21);
-long double wcstold(const wchar_t*, wchar_t**) __INTRODUCED_IN(21);
-unsigned long wcstoul(const wchar_t*, wchar_t**, int);
-unsigned long long wcstoull(const wchar_t*, wchar_t**, int) __INTRODUCED_IN(21);
-int wcswidth(const wchar_t *, size_t);
-size_t wcsxfrm(wchar_t *, const wchar_t *, size_t);
-int wctob(wint_t);
-int wcwidth(wchar_t);
-wchar_t *wmemchr(const wchar_t *, wchar_t, size_t);
-int wmemcmp(const wchar_t *, const wchar_t *, size_t);
-wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t);
+wint_t btowc(int __ch);
+int fwprintf(FILE* __fp, const wchar_t* __fmt, ...);
+int fwscanf(FILE* __fp, const wchar_t* __fmt, ...);
+wint_t fgetwc(FILE* __fp);
+wchar_t* fgetws(wchar_t* __buf, int __size, FILE* __fp);
+wint_t fputwc(wchar_t __wc, FILE* __fp);
+int fputws(const wchar_t* __s, FILE* __fp);
+int fwide(FILE* __fp, int __mode);
+wint_t getwc(FILE* __fp);
+wint_t getwchar(void);
+int mbsinit(const mbstate_t* __ps);
+size_t mbrlen(const char* __s, size_t __n, mbstate_t* __ps);
+size_t mbrtowc(wchar_t* __buf, const char* __s, size_t __n, mbstate_t* __ps);
+size_t mbsrtowcs(wchar_t* __dst, const char** __src, size_t __dst_n, mbstate_t* __ps);
+size_t mbsnrtowcs(wchar_t* __dst, const char** __src, size_t __src_n, size_t __dst_n, mbstate_t* __ps) __INTRODUCED_IN(21);
+wint_t putwc(wchar_t __wc, FILE* __fp);
+wint_t putwchar(wchar_t __wc);
+int swprintf(wchar_t* __buf, size_t __n, const wchar_t* __fmt, ...);
+int swscanf(const wchar_t* __s, const wchar_t* __fmt, ...);
+wint_t ungetwc(wint_t __wc, FILE* __fp);
+int vfwprintf(FILE* __fp, const wchar_t* __fmt, va_list __args);
+int vfwscanf(FILE* __fp, const wchar_t* __fmt, va_list __args) __INTRODUCED_IN(21);
+int vswprintf(wchar_t* __buf, size_t __n, const wchar_t* __fmt, va_list __args);
+int vswscanf(const wchar_t* __s, const wchar_t* __fmt, va_list __args) __INTRODUCED_IN(21);
+int vwprintf(const wchar_t* __fmt, va_list __args);
+int vwscanf(const wchar_t* __fmt, va_list __args) __INTRODUCED_IN(21);
+wchar_t* wcpcpy(wchar_t* __dst, const wchar_t* __src);
+wchar_t* wcpncpy(wchar_t* __dst, const wchar_t* __src, size_t __n);
+size_t wcrtomb(char* __buf, wchar_t __wc, mbstate_t* __ps);
+int wcscasecmp(const wchar_t* __lhs, const wchar_t* __rhs);
+int wcscasecmp_l(const wchar_t* __lhs, const wchar_t* __rhs, locale_t __l) __INTRODUCED_IN(23);
+wchar_t* wcscat(wchar_t* __dst, const wchar_t* __src);
+wchar_t* wcschr(const wchar_t* __s, wchar_t __wc);
+int wcscmp(const wchar_t* __lhs, const wchar_t* __rhs);
+int wcscoll(const wchar_t* __lhs, const wchar_t* __rhs);
+wchar_t* wcscpy(wchar_t* __dst, const wchar_t* __src);
+size_t wcscspn(const wchar_t* __s, const wchar_t* __accept);
+size_t wcsftime(wchar_t* __buf, size_t __n, const wchar_t* __fmt, const struct tm* __tm);
+size_t wcslen(const wchar_t* __s);
+int wcsncasecmp(const wchar_t* __lhs, const wchar_t* __rhs, size_t __n);
+int wcsncasecmp_l(const wchar_t* __lhs, const wchar_t* __rhs, size_t __n, locale_t __l) __INTRODUCED_IN(23);
+wchar_t* wcsncat(wchar_t* __dst, const wchar_t* __src, size_t __n);
+int wcsncmp(const wchar_t* __lhs, const wchar_t* __rhs, size_t __n);
+wchar_t* wcsncpy(wchar_t* __dst, const wchar_t* __src, size_t __n);
+size_t wcsnrtombs(char* __dst, const wchar_t** __src, size_t __src_n, size_t __dst_n, mbstate_t* __ps) __INTRODUCED_IN(21);
+wchar_t* wcspbrk(const wchar_t* __s, const wchar_t* __accept);
+wchar_t* wcsrchr(const wchar_t* __s, wchar_t __wc);
+size_t wcsrtombs(char* __dst, const wchar_t** __src, size_t __dst_n, mbstate_t* __ps);
+size_t wcsspn(const wchar_t* __s, const wchar_t* __accept);
+wchar_t* wcsstr(const wchar_t* __haystack, const wchar_t* __needle);
+double wcstod(const wchar_t* __s, wchar_t** __end_ptr);
+float wcstof(const wchar_t* __s, wchar_t** __end_ptr) __INTRODUCED_IN(21);
+wchar_t* wcstok(wchar_t* __s, const wchar_t* __delimiter, wchar_t** __ptr);
+long wcstol(const wchar_t* __s, wchar_t** __end_ptr, int __base);
+long long wcstoll(const wchar_t* __s, wchar_t** __end_ptr, int __base) __INTRODUCED_IN(21);
+long double wcstold(const wchar_t* __s, wchar_t** __end_ptr) __INTRODUCED_IN(21);
+unsigned long wcstoul(const wchar_t* __s, wchar_t** __end_ptr, int __base);
+unsigned long long wcstoull(const wchar_t* __s, wchar_t** __end_ptr, int __base) __INTRODUCED_IN(21);
+int wcswidth(const wchar_t* __s, size_t __n);
+size_t wcsxfrm(wchar_t* __dst, const wchar_t* __src, size_t __n);
+int wctob(wint_t __wc);
+int wcwidth(wchar_t __wc);
+wchar_t* wmemchr(const wchar_t* __src, wchar_t __wc, size_t __n);
+int wmemcmp(const wchar_t* __lhs, const wchar_t* __rhs, size_t __n);
+wchar_t* wmemcpy(wchar_t* __dst, const wchar_t* __src, size_t __n);
#if defined(__USE_GNU)
-wchar_t* wmempcpy(wchar_t*, const wchar_t*, size_t) __INTRODUCED_IN(23);
+wchar_t* wmempcpy(wchar_t* __dst, const wchar_t* __src, size_t __n) __INTRODUCED_IN(23);
#endif
-wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t);
-wchar_t *wmemset(wchar_t *, wchar_t, size_t);
-int wprintf(const wchar_t *, ...);
-int wscanf(const wchar_t *, ...);
+wchar_t* wmemmove(wchar_t* __dst, const wchar_t* __src, size_t __n);
+wchar_t* wmemset(wchar_t* __dst, wchar_t __wc, size_t __n);
+int wprintf(const wchar_t* __fmt, ...);
+int wscanf(const wchar_t* __fmt, ...);
#if __ANDROID_API__ >= __ANDROID_API_L__
-long long wcstoll_l(const wchar_t*, wchar_t**, int, locale_t) __INTRODUCED_IN(21);
-unsigned long long wcstoull_l(const wchar_t*, wchar_t**, int, locale_t) __INTRODUCED_IN(21);
-long double wcstold_l(const wchar_t*, wchar_t**, locale_t) __INTRODUCED_IN(21);
+long long wcstoll_l(const wchar_t* __s, wchar_t** __end_ptr, int __base, locale_t __l) __INTRODUCED_IN(21);
+unsigned long long wcstoull_l(const wchar_t* __s, wchar_t** __end_ptr, int __base, locale_t __l) __INTRODUCED_IN(21);
+long double wcstold_l(const wchar_t* __s, wchar_t** __end_ptr, locale_t __l) __INTRODUCED_IN(21);
-int wcscoll_l(const wchar_t*, const wchar_t*, locale_t) __attribute_pure__
+int wcscoll_l(const wchar_t* __lhs, const wchar_t* __rhs, locale_t __l) __attribute_pure__
__INTRODUCED_IN(21);
-size_t wcsxfrm_l(wchar_t*, const wchar_t*, size_t, locale_t) __INTRODUCED_IN(21);
+size_t wcsxfrm_l(wchar_t* __dst, const wchar_t* __src, size_t __n, locale_t __l) __INTRODUCED_IN(21);
#else
// Implemented as static inlines before 21.
#endif
-size_t wcslcat(wchar_t*, const wchar_t*, size_t);
-size_t wcslcpy(wchar_t*, const wchar_t*, size_t);
+size_t wcslcat(wchar_t* __dst, const wchar_t* __src, size_t __n);
+size_t wcslcpy(wchar_t* __dst, const wchar_t* __src, size_t __n);
-FILE* open_wmemstream(wchar_t**, size_t*) __INTRODUCED_IN(23);
-wchar_t* wcsdup(const wchar_t*);
-size_t wcsnlen(const wchar_t*, size_t);
+FILE* open_wmemstream(wchar_t** __ptr, size_t* __size_ptr) __INTRODUCED_IN(23);
+wchar_t* wcsdup(const wchar_t* __s);
+size_t wcsnlen(const wchar_t* __s, size_t __n);
__END_DECLS
-#endif /* _WCHAR_H_ */
+#endif
diff --git a/libc/include/wctype.h b/libc/include/wctype.h
index 39e34f6..18f5c4b 100644
--- a/libc/include/wctype.h
+++ b/libc/include/wctype.h
@@ -36,31 +36,31 @@
__BEGIN_DECLS
#if __ANDROID_API__ >= __ANDROID_API_L__
-int iswalnum_l(wint_t, locale_t) __INTRODUCED_IN(21);
-int iswalpha_l(wint_t, locale_t) __INTRODUCED_IN(21);
-int iswblank_l(wint_t, locale_t) __INTRODUCED_IN(21);
-int iswcntrl_l(wint_t, locale_t) __INTRODUCED_IN(21);
-int iswdigit_l(wint_t, locale_t) __INTRODUCED_IN(21);
-int iswgraph_l(wint_t, locale_t) __INTRODUCED_IN(21);
-int iswlower_l(wint_t, locale_t) __INTRODUCED_IN(21);
-int iswprint_l(wint_t, locale_t) __INTRODUCED_IN(21);
-int iswpunct_l(wint_t, locale_t) __INTRODUCED_IN(21);
-int iswspace_l(wint_t, locale_t) __INTRODUCED_IN(21);
-int iswupper_l(wint_t, locale_t) __INTRODUCED_IN(21);
-int iswxdigit_l(wint_t, locale_t) __INTRODUCED_IN(21);
+int iswalnum_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
+int iswalpha_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
+int iswblank_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
+int iswcntrl_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
+int iswdigit_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
+int iswgraph_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
+int iswlower_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
+int iswprint_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
+int iswpunct_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
+int iswspace_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
+int iswupper_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
+int iswxdigit_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
-wint_t towlower_l(wint_t, locale_t) __INTRODUCED_IN(21);
-wint_t towupper_l(wint_t, locale_t) __INTRODUCED_IN(21);
+wint_t towlower_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
+wint_t towupper_l(wint_t __wc, locale_t __l) __INTRODUCED_IN(21);
#else
// Implemented as static inlines before 21.
#endif
-wint_t towctrans_l(wint_t, wctrans_t, locale_t) __INTRODUCED_IN(26);
-wctrans_t wctrans_l(const char*, locale_t) __INTRODUCED_IN(26);
+wint_t towctrans_l(wint_t __wc, wctrans_t __transform, locale_t __l) __INTRODUCED_IN(26);
+wctrans_t wctrans_l(const char* __name, locale_t __l) __INTRODUCED_IN(26);
-wctype_t wctype_l(const char*, locale_t) __INTRODUCED_IN(21);
-int iswctype_l(wint_t, wctype_t, locale_t) __INTRODUCED_IN(21);
+wctype_t wctype_l(const char* __name, locale_t __l) __INTRODUCED_IN(21);
+int iswctype_l(wint_t __wc, wctype_t __transform, locale_t __l) __INTRODUCED_IN(21);
__END_DECLS
-#endif /* _WCTYPE_H_ */
+#endif