From ffde533ed9fb7ecc023cae1dd123a493d2cba859 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 21 Aug 2017 14:51:59 -0700 Subject: [PATCH] Name function arguments in libc headers for Studio. Final batch of headers... Bug: http://b/64613623 Test: builds Change-Id: I86578c7c2df446b210fa1bdda3391b21f340e947 --- libc/include/arpa/nameser.h | 90 ++++++++++++++++++------------------- libc/include/resolv.h | 20 ++++----- 2 files changed, 54 insertions(+), 56 deletions(-) diff --git a/libc/include/arpa/nameser.h b/libc/include/arpa/nameser.h index 9507f49be..ffb5250ee 100644 --- a/libc/include/arpa/nameser.h +++ b/libc/include/arpa/nameser.h @@ -562,63 +562,61 @@ __BEGIN_DECLS #define ns_makecanon __ns_makecanon #define ns_samename __ns_samename -int ns_msg_getflag(ns_msg, int); -uint16_t ns_get16(const u_char*); -uint32_t ns_get32(const u_char*); -void ns_put16(uint16_t, u_char*); -void ns_put32(uint32_t, u_char*); -int ns_initparse(const u_char*, int, ns_msg*); -int ns_skiprr(const u_char*, const u_char*, ns_sect, int); -int ns_parserr(ns_msg*, ns_sect, int, ns_rr*); -int ns_sprintrr(const ns_msg*, const ns_rr*, const char*, const char*, char*, size_t); -int ns_sprintrrf(const u_char*, size_t, const char*, ns_class, ns_type, u_long, const u_char*, - size_t, const char*, const char*, char*, size_t); -int ns_format_ttl(u_long, char*, size_t); -int ns_name_ntol(const u_char*, u_char*, size_t); -int ns_name_ntop(const u_char*, char*, size_t); -int ns_name_pton(const char*, u_char*, size_t); -int ns_name_unpack(const u_char*, const u_char*, const u_char*, u_char*, size_t); -int ns_name_pack(const u_char*, u_char*, int, const u_char**, const u_char**); -int ns_name_uncompress(const u_char*, const u_char*, const u_char*, char*, size_t); -int ns_name_compress(const char*, u_char*, size_t, const u_char**, const u_char**); -int ns_name_skip(const u_char**, const u_char*); -void ns_name_rollback(const u_char*, const u_char**, const u_char**); +int ns_msg_getflag(ns_msg __handle, int __flag); +uint16_t ns_get16(const u_char* __src); +uint32_t ns_get32(const u_char* __src); +void ns_put16(uint16_t __src, u_char* __dst); +void ns_put32(uint32_t __src, u_char* __dst); +int ns_initparse(const u_char* __msg, int __msg_size, ns_msg* __handle); +int ns_skiprr(const u_char* __ptr, const u_char* __eom, ns_sect __section, int __count); +int ns_parserr(ns_msg* __handle, ns_sect __section, int __rr_number, ns_rr* __rr); +int ns_sprintrr(const ns_msg* __handle, const ns_rr* __rr, const char* __name_ctx, const char* __origin, char* __buf, size_t __buf_size); +int ns_sprintrrf(const u_char* __msg, size_t __msg_size, const char* __name, ns_class __class, ns_type __type, u_long __ttl, const u_char* __rdata, size_t __rdata_size, const char* __name_ctx, const char* __origin, char* __buf, size_t __buf_size); +int ns_format_ttl(u_long __ttl, char* __dst, size_t __dst_size); +int ns_name_ntol(const u_char* __src, u_char* __dst, size_t __dst_size); +int ns_name_ntop(const u_char* __src, char* __dst, size_t __dst_size); +int ns_name_pton(const char* __src, u_char* __dst, size_t __dst_size); +int ns_name_unpack(const u_char* __msg, const u_char* __eom, const u_char* __src, u_char* __dst, size_t __dst_size); +int ns_name_pack(const u_char* __src, u_char* __dst, int __dst_size, const u_char** __dn_ptrs, const u_char** __last_dn_ptr); +int ns_name_uncompress(const u_char* __msg, const u_char* __eom, const u_char* __src, char* __dst, size_t __dst_size); +int ns_name_compress(const char* __src, u_char* __dst, size_t __dst_size, const u_char** __dn_ptrs, const u_char** __last_dn_ptr); +int ns_name_skip(const u_char** __ptr_ptr, const u_char* __eom); +void ns_name_rollback(const u_char* __src, const u_char** __dn_ptrs, const u_char** __last_dn_ptr); -int ns_makecanon(const char*, char*, size_t); -int ns_samename(const char*, const char*); +int ns_makecanon(const char* __src, char* __dst, size_t __dst_size); +int ns_samename(const char* __lhs, const char* __rhs); #else /* The names of these symbols were accidentally prefixed with __ in L. */ /* The duplication here is intentional to avoid declaring different symbols with the same * declaration. */ -int ns_msg_getflag(ns_msg, int) __INTRODUCED_IN_64(23); -uint16_t ns_get16(const u_char*) __INTRODUCED_IN_64(23); -uint32_t ns_get32(const u_char*) __INTRODUCED_IN_64(23); -void ns_put16(uint16_t, u_char*) __INTRODUCED_IN_64(23); -void ns_put32(uint32_t, u_char*) __INTRODUCED_IN_64(23); -int ns_initparse(const u_char*, int, ns_msg*) __INTRODUCED_IN_64(23); -int ns_skiprr(const u_char*, const u_char*, ns_sect, int) __INTRODUCED_IN_64(23); -int ns_parserr(ns_msg*, ns_sect, int, ns_rr*) __INTRODUCED_IN_64(23); -int ns_sprintrr(const ns_msg*, const ns_rr*, const char*, const char*, char*, size_t) +int ns_msg_getflag(ns_msg __handle, int __flag) __INTRODUCED_IN_64(23); +uint16_t ns_get16(const u_char* __src) __INTRODUCED_IN_64(23); +uint32_t ns_get32(const u_char* __src) __INTRODUCED_IN_64(23); +void ns_put16(uint16_t __src, u_char* __dst) __INTRODUCED_IN_64(23); +void ns_put32(uint32_t __src, u_char* __dst) __INTRODUCED_IN_64(23); +int ns_initparse(const u_char* __msg, int __msg_size, ns_msg* __handle) __INTRODUCED_IN_64(23); +int ns_skiprr(const u_char* __ptr, const u_char* __eom, ns_sect __section, int __count) __INTRODUCED_IN_64(23); +int ns_parserr(ns_msg* __handle, ns_sect __section, int __rr_number, ns_rr* __rr) __INTRODUCED_IN_64(23); +int ns_sprintrr(const ns_msg* __handle, const ns_rr* __rr, const char* __name_ctx, const char* __origin, char* __buf, size_t __buf_size) __INTRODUCED_IN_64(23); -int ns_sprintrrf(const u_char*, size_t, const char*, ns_class, ns_type, u_long, const u_char*, - size_t, const char*, const char*, char*, size_t) __INTRODUCED_IN_64(23); -int ns_format_ttl(u_long, char*, size_t) __INTRODUCED_IN_64(23); -int ns_name_ntol(const u_char*, u_char*, size_t) __INTRODUCED_IN_64(23); -int ns_name_ntop(const u_char*, char*, size_t) __INTRODUCED_IN_64(23); -int ns_name_pton(const char*, u_char*, size_t) __INTRODUCED_IN_64(23); -int ns_name_unpack(const u_char*, const u_char*, const u_char*, u_char*, size_t) +int ns_sprintrrf(const u_char* __msg, size_t __msg_size, const char* __name, ns_class __class, ns_type __type, u_long __ttl, const u_char* __rdata, size_t __rdata_size, const char* __name_ctx, const char* __origin, char* __buf, size_t __buf_size) __INTRODUCED_IN_64(23); +int ns_format_ttl(u_long __ttl, char* __dst, size_t __dst_size) __INTRODUCED_IN_64(23); +int ns_name_ntol(const u_char* __src, u_char* __dst, size_t __dst_size) __INTRODUCED_IN_64(23); +int ns_name_ntop(const u_char* __src, char* __dst, size_t __dst_size) __INTRODUCED_IN_64(23); +int ns_name_pton(const char* __src, u_char* __dst, size_t __dst_size) __INTRODUCED_IN_64(23); +int ns_name_unpack(const u_char* __msg, const u_char* __eom, const u_char* __src, u_char* __dst, size_t __dst_size) __INTRODUCED_IN_64(23); -int ns_name_pack(const u_char*, u_char*, int, const u_char**, const u_char**) __INTRODUCED_IN_64(23); -int ns_name_uncompress(const u_char*, const u_char*, const u_char*, char*, size_t) +int ns_name_pack(const u_char* __src, u_char* __dst, int __dst_size, const u_char** __dn_ptrs, const u_char** __last_dn_ptr) __INTRODUCED_IN_64(23); +int ns_name_uncompress(const u_char* __msg, const u_char* __eom, const u_char* __src, char* __dst, size_t __dst_size) __INTRODUCED_IN_64(23); -int ns_name_compress(const char*, u_char*, size_t, const u_char**, const u_char**) +int ns_name_compress(const char* __src, u_char* __dst, size_t __dst_size, const u_char** __dn_ptrs, const u_char** __last_dn_ptr) __INTRODUCED_IN_64(23); -int ns_name_skip(const u_char**, const u_char*) __INTRODUCED_IN_64(23); -void ns_name_rollback(const u_char*, const u_char**, const u_char**) __INTRODUCED_IN_64(23); +int ns_name_skip(const u_char** __ptr_ptr, const u_char* __eom) __INTRODUCED_IN_64(23); +void ns_name_rollback(const u_char* __src, const u_char** __dn_ptrs, const u_char** __last_dn_ptr) __INTRODUCED_IN_64(23); -int ns_makecanon(const char*, char*, size_t) __INTRODUCED_IN_64(23); -int ns_samename(const char*, const char*) __INTRODUCED_IN_64(23); +int ns_makecanon(const char* __src, char* __dst, size_t __dst_size) __INTRODUCED_IN_64(23); +int ns_samename(const char* __lhs, const char* __rhs) __INTRODUCED_IN_64(23); #endif /* !defined(__LP64__) */ __END_DECLS diff --git a/libc/include/resolv.h b/libc/include/resolv.h index 2c1281949..d6db4cff7 100644 --- a/libc/include/resolv.h +++ b/libc/include/resolv.h @@ -40,25 +40,25 @@ __BEGIN_DECLS #define b64_ntop __b64_ntop -int b64_ntop(u_char const*, size_t, char*, size_t); +int b64_ntop(u_char const* __src, size_t __src_size, char* __dst, size_t __dst_size); #define b64_pton __b64_pton -int b64_pton(char const*, u_char*, size_t); +int b64_pton(char const* __src, u_char* __dst, size_t __dst_size); #define dn_comp __dn_comp -int dn_comp(const char*, u_char*, int, u_char**, u_char**); +int dn_comp(const char* __src, u_char* __dst, int __dst_size, u_char** __dn_ptrs , u_char** __last_dn_ptr); -int dn_expand(const u_char*, const u_char*, const u_char*, char*, int); +int dn_expand(const u_char* __msg, const u_char* __eom, const u_char* __src, char* __dst, int __dst_size); #define p_class __p_class -const char* p_class(int); +const char* p_class(int __class); #define p_type __p_type -const char* p_type(int); +const char* p_type(int __type); int res_init(void); -int res_mkquery(int, const char*, int, int, const u_char*, int, const u_char*, u_char*, int); -int res_query(const char*, int, int, u_char*, int); -int res_search(const char*, int, int, u_char*, int); +int res_mkquery(int __opcode, const char* __domain_name, int __class, int __type, const u_char* __data, int __data_size, const u_char* __new_rr_in, u_char* __buf, int __buf_size); +int res_query(const char* __name, int __class, int __type, u_char* __answer, int __answer_size); +int res_search(const char* __name, int __class, int __type, u_char* __answer, int __answer_size); __END_DECLS -#endif /* _RESOLV_H_ */ +#endif