Merge changes from topic 'bionic_unavailable'
* changes: Tag unavailable functions with macro. Delete declarations which don't exist.
This commit is contained in:
commit
0640b911f3
12 changed files with 58 additions and 188 deletions
|
@ -536,6 +536,15 @@ __socketcall int __connect(int, const struct sockaddr*, socklen_t);
|
|||
|
||||
#undef __socketcall
|
||||
|
||||
// Symbols that are supposed to be in resolv.h, but that we aren't exporting.
|
||||
int ns_parserr2(ns_msg*, ns_sect, int, ns_rr2*);
|
||||
int ns_name_pton2(const char*, u_char*, size_t, size_t*);
|
||||
int ns_name_unpack2(const u_char*, const u_char*, const u_char*, u_char*, size_t, size_t*);
|
||||
int ns_name_eq(ns_nname_ct, size_t, ns_nname_ct, size_t);
|
||||
int ns_name_owned(ns_namemap_ct, int, ns_namemap_ct, int);
|
||||
int ns_name_map(ns_nname_ct, size_t, ns_namemap_t, int);
|
||||
int ns_name_labels(ns_nname_ct, size_t);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
|
|
@ -566,70 +566,30 @@ typedef enum __ns_cert_types {
|
|||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
int ns_msg_getflag(ns_msg, int) __LIBC_ABI_PUBLIC__;
|
||||
uint16_t ns_get16(const u_char *) __LIBC_ABI_PUBLIC__;
|
||||
uint32_t ns_get32(const u_char *) __LIBC_ABI_PUBLIC__;
|
||||
void ns_put16(uint16_t, u_char *) __LIBC_ABI_PUBLIC__;
|
||||
void ns_put32(uint32_t, u_char *) __LIBC_ABI_PUBLIC__;
|
||||
int ns_initparse(const u_char *, int, ns_msg *) __LIBC_ABI_PUBLIC__;
|
||||
int ns_skiprr(const u_char *, const u_char *, ns_sect, int) __LIBC_ABI_PUBLIC__;
|
||||
int ns_parserr(ns_msg *, ns_sect, int, ns_rr *) __LIBC_ABI_PUBLIC__;
|
||||
int ns_parserr2(ns_msg *, ns_sect, int, ns_rr2 *) __LIBC_HIDDEN__;
|
||||
int ns_sprintrr(const ns_msg *, const ns_rr *,
|
||||
const char *, const char *, char *, size_t) __LIBC_ABI_PUBLIC__;
|
||||
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) __LIBC_ABI_PUBLIC__;
|
||||
int ns_format_ttl(u_long, char *, size_t) __LIBC_ABI_PUBLIC__;
|
||||
int ns_parse_ttl(const char *, u_long *) __LIBC_ABI_PUBLIC__;
|
||||
uint32_t ns_datetosecs(const char *cp, int *errp) __LIBC_ABI_PUBLIC__;
|
||||
int ns_name_ntol(const u_char *, u_char *, size_t) __LIBC_ABI_PUBLIC__;
|
||||
int ns_name_ntop(const u_char *, char *, size_t) __LIBC_ABI_PUBLIC__;
|
||||
int ns_name_pton(const char *, u_char *, size_t) __LIBC_ABI_PUBLIC__;
|
||||
int ns_name_pton2(const char *, u_char *, size_t, size_t *) __LIBC_HIDDEN__;
|
||||
int ns_name_unpack(const u_char *, const u_char *,
|
||||
const u_char *, u_char *, size_t) __LIBC_ABI_PUBLIC__;
|
||||
int ns_name_unpack2(const u_char *, const u_char *,
|
||||
const u_char *, u_char *, size_t,
|
||||
size_t *) __LIBC_HIDDEN__;
|
||||
int ns_name_pack(const u_char *, u_char *, int,
|
||||
const u_char **, const u_char **) __LIBC_ABI_PUBLIC__;
|
||||
int ns_name_uncompress(const u_char *, const u_char *,
|
||||
const u_char *, char *, size_t) __LIBC_ABI_PUBLIC__;
|
||||
int ns_name_compress(const char *, u_char *, size_t,
|
||||
const u_char **, const u_char **) __LIBC_ABI_PUBLIC__;
|
||||
int ns_name_skip(const u_char **, const u_char *) __LIBC_ABI_PUBLIC__;
|
||||
void ns_name_rollback(const u_char *, const u_char **,
|
||||
const u_char **) __LIBC_ABI_PUBLIC__;
|
||||
int ns_sign(u_char *, int *, int, int, void *,
|
||||
const u_char *, int, u_char *, int *, time_t) __LIBC_ABI_PUBLIC__;
|
||||
int ns_sign2(u_char *, int *, int, int, void *,
|
||||
const u_char *, int, u_char *, int *, time_t,
|
||||
u_char **, u_char **) __LIBC_ABI_PUBLIC__;
|
||||
ssize_t ns_name_length(ns_nname_ct, size_t) __LIBC_HIDDEN__;
|
||||
int ns_name_eq(ns_nname_ct, size_t, ns_nname_ct, size_t) __LIBC_HIDDEN__;
|
||||
int ns_name_owned(ns_namemap_ct, int, ns_namemap_ct, int) __LIBC_HIDDEN__;
|
||||
int ns_name_map(ns_nname_ct, size_t, ns_namemap_t, int) __LIBC_HIDDEN__;
|
||||
int ns_name_labels(ns_nname_ct, size_t) __LIBC_HIDDEN__;
|
||||
int ns_sign_tcp(u_char *, int *, int, int,
|
||||
ns_tcp_tsig_state *, int) __LIBC_ABI_PUBLIC__;
|
||||
int ns_sign_tcp2(u_char *, int *, int, int,
|
||||
ns_tcp_tsig_state *, int,
|
||||
u_char **, u_char **) __LIBC_ABI_PUBLIC__;
|
||||
int ns_sign_tcp_init(void *, const u_char *, int,
|
||||
ns_tcp_tsig_state *) __LIBC_ABI_PUBLIC__;
|
||||
u_char *ns_find_tsig(u_char *, u_char *) __LIBC_ABI_PUBLIC__;
|
||||
int ns_verify(u_char *, int *, void *,
|
||||
const u_char *, int, u_char *, int *,
|
||||
time_t *, int) __LIBC_ABI_PUBLIC__;
|
||||
int ns_verify_tcp(u_char *, int *, ns_tcp_tsig_state *, int);
|
||||
int ns_verify_tcp_init(void *, const u_char *, int,
|
||||
ns_tcp_tsig_state *) __LIBC_ABI_PUBLIC__;
|
||||
int ns_samedomain(const char *, const char *) __LIBC_ABI_PUBLIC__;
|
||||
int ns_subdomain(const char *, const char *) __LIBC_ABI_PUBLIC__;
|
||||
int ns_makecanon(const char *, char *, size_t) __LIBC_ABI_PUBLIC__;
|
||||
int ns_samename(const char *, const char *) __LIBC_ABI_PUBLIC__;
|
||||
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_makecanon(const char*, char*, size_t);
|
||||
int ns_samename(const char*, const char*);
|
||||
__END_DECLS
|
||||
|
||||
#ifdef BIND_4_COMPAT
|
||||
|
|
|
@ -64,8 +64,6 @@ char *telcmds[] = {
|
|||
"SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC",
|
||||
"EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0,
|
||||
};
|
||||
#else
|
||||
extern char *telcmds[];
|
||||
#endif
|
||||
|
||||
#define TELCMD_FIRST xEOF
|
||||
|
@ -206,8 +204,6 @@ const char *telopts[NTELOPTS+1] = {
|
|||
const char *slc_names[] = {
|
||||
SLC_NAMELIST
|
||||
};
|
||||
#else
|
||||
extern char *slc_names[];
|
||||
#define SLC_NAMES SLC_NAMELIST
|
||||
#endif
|
||||
|
||||
|
@ -266,8 +262,6 @@ extern char *slc_names[];
|
|||
const char *authtype_names[] = {
|
||||
"NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0,
|
||||
};
|
||||
#else
|
||||
extern char *authtype_names[];
|
||||
#endif
|
||||
|
||||
#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
|
||||
|
@ -301,9 +295,6 @@ const char *encrypt_names[] = {
|
|||
const char *enctype_names[] = {
|
||||
"ANY", "DES_CFB64", "DES_OFB64", 0,
|
||||
};
|
||||
#else
|
||||
extern const char *encrypt_names[];
|
||||
extern const char *enctype_names[];
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -205,12 +205,8 @@ int ether_nonstatic_aton(u_char *, char *);
|
|||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
char * ether_ntoa __P((const struct ether_addr *));
|
||||
struct ether_addr *
|
||||
ether_aton __P((const char *));
|
||||
int ether_ntohost __P((char *, const struct ether_addr *));
|
||||
int ether_hostton __P((const char *, struct ether_addr *));
|
||||
int ether_line __P((const char *, struct ether_addr *, char *));
|
||||
char* ether_ntoa __P((const struct ether_addr*));
|
||||
struct ether_addr* ether_aton __P((const char*));
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
|
|
|
@ -199,49 +199,29 @@ __BEGIN_DECLS
|
|||
#define h_errno (*__get_h_errno())
|
||||
int* __get_h_errno(void);
|
||||
/* BIONIC-END */
|
||||
void endhostent(void);
|
||||
void endnetent(void);
|
||||
void endnetgrent(void);
|
||||
void endprotoent(void);
|
||||
void endservent(void);
|
||||
void freehostent(struct hostent *);
|
||||
struct hostent *gethostbyaddr(const void *, socklen_t, int);
|
||||
int gethostbyaddr_r(const void *, socklen_t, int, struct hostent *, char *, size_t, struct hostent **, int *);
|
||||
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 *);
|
||||
struct hostent *gethostent(void);
|
||||
int gethostent_r(struct hostent *, char *, size_t, struct hostent **, int *);
|
||||
struct hostent *getipnodebyaddr(const void *, size_t, int, int *);
|
||||
struct hostent *getipnodebyname(const char *, int, int, int *);
|
||||
struct netent *getnetbyaddr(uint32_t, int);
|
||||
int getnetbyaddr_r(uint32_t, int, struct netent *, char *, size_t, struct netent**, int *);
|
||||
struct netent *getnetbyname(const char *);
|
||||
int getnetbyname_r(const char *, struct netent *, char *, size_t, struct netent **, int *);
|
||||
struct netent *getnetent(void);
|
||||
int getnetent_r(struct netent *, char *, size_t, struct netent **, int *);
|
||||
int getnetgrent(char **, char **, char **);
|
||||
struct protoent *getprotobyname(const char *);
|
||||
int getprotobyname_r(const char *, struct protoent *, char *, size_t, struct protoent **);
|
||||
struct protoent *getprotobynumber(int);
|
||||
int getprotobynumber_r(int, struct protoent *, char *, size_t, struct protoent **);
|
||||
struct protoent *getprotoent(void);
|
||||
int getprotoent_r(struct protoent *, char *, size_t, struct protoent **);
|
||||
struct servent *getservbyname(const char *, const char *);
|
||||
struct servent *getservbyport(int, const char *);
|
||||
struct servent *getservent(void);
|
||||
void herror(const char *);
|
||||
const char *hstrerror(int);
|
||||
int innetgr(const char *, const char *, const char *, const char *);
|
||||
void sethostent(int);
|
||||
void setnetent(int);
|
||||
void setprotoent(int);
|
||||
struct hostent* gethostbyaddr(const void*, socklen_t, int);
|
||||
int gethostbyaddr_r(const void*, socklen_t, int, struct hostent*, char*, size_t, struct hostent**,
|
||||
int*);
|
||||
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*);
|
||||
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 servent* getservent(void);
|
||||
void herror(const char*);
|
||||
const char* hstrerror(int);
|
||||
|
||||
int getaddrinfo(const char *, const char *, const struct addrinfo *, struct addrinfo **);
|
||||
int getnameinfo(const struct sockaddr *, socklen_t, char *, size_t, char *, size_t, int);
|
||||
void freeaddrinfo(struct addrinfo *);
|
||||
const char *gai_strerror(int);
|
||||
void setnetgrent(const char *);
|
||||
void setservent(int);
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
|
|
@ -143,19 +143,6 @@ typedef struct {
|
|||
} ns_src;
|
||||
|
||||
|
||||
/*
|
||||
* Default sourcelists (if nsswitch.conf is missing, corrupt,
|
||||
* or the requested database doesn't have an entry)
|
||||
*/
|
||||
extern const ns_src __nsdefaultsrc[];
|
||||
extern const ns_src __nsdefaultcompat[];
|
||||
extern const ns_src __nsdefaultcompat_forceall[];
|
||||
extern const ns_src __nsdefaultfiles[];
|
||||
extern const ns_src __nsdefaultfiles_forceall[];
|
||||
extern const ns_src __nsdefaultnis[];
|
||||
extern const ns_src __nsdefaultnis_forceall[];
|
||||
|
||||
|
||||
/*
|
||||
* ns_mtab - `nsswitch method table'
|
||||
* An nsswitch module provides a mapping from (database name, method name)
|
||||
|
|
|
@ -39,11 +39,6 @@
|
|||
__BEGIN_DECLS
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
struct res_state;
|
||||
|
||||
extern struct __res_state *__res_state(void);
|
||||
#define _res (*__res_state())
|
||||
|
||||
#define b64_ntop __b64_ntop
|
||||
#define b64_pton __b64_pton
|
||||
extern int b64_ntop(u_char const*, size_t, char*, size_t);
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
/* $NetBSD: sgtty.h,v 1.8 2005/02/03 04:39:32 perry Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1985, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)sgtty.h 8.1 (Berkeley) 6/2/93
|
||||
*/
|
||||
|
||||
#ifndef _SGTTY_H_
|
||||
#define _SGTTY_H_
|
||||
|
||||
#ifndef USE_OLD_TTY
|
||||
#define USE_OLD_TTY
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
int gtty(int, struct sgttyb *);
|
||||
int stty(int, struct sgttyb *);
|
||||
__END_DECLS
|
||||
|
||||
#endif /* _SGTTY_H_ */
|
|
@ -39,8 +39,6 @@
|
|||
__BEGIN_DECLS
|
||||
|
||||
size_t __fbufsize(FILE*);
|
||||
int __freading(FILE*);
|
||||
int __fwriting(FILE*);
|
||||
int __freadable(FILE*);
|
||||
int __fwritable(FILE*);
|
||||
int __flbf(FILE*);
|
||||
|
|
|
@ -163,7 +163,7 @@ extern const char* getprogname(void);
|
|||
extern void setprogname(const char*);
|
||||
|
||||
/* make STLPort happy */
|
||||
extern int mblen(const char *, size_t);
|
||||
extern int mblen(const char *, size_t) __UNAVAILABLE;
|
||||
extern size_t mbstowcs(wchar_t *, const char *, size_t);
|
||||
extern int mbtowc(wchar_t *, const char *, size_t);
|
||||
|
||||
|
|
|
@ -454,11 +454,13 @@
|
|||
#define __INTRODUCED_IN(api_level) __AVAILABILITY(introduced=api_level)
|
||||
#define __DEPRECATED_IN(api_level) __AVAILABILITY(deprecated=api_level)
|
||||
#define __REMOVED_IN(api_level) __AVAILABILITY(obsoleted=api_level)
|
||||
#define __UNAVAILABLE __attribute__((unavailable))
|
||||
#else
|
||||
#define __AVAILABILITY(...)
|
||||
#define __INTRODUCED_IN(api_level)
|
||||
#define __DEPRECATED_IN(api_level)
|
||||
#define __REMOVED_IN(api_level)
|
||||
#define __UNAVAILABLE __attribute__((__error__("unavailable")))
|
||||
#endif // __clang__
|
||||
|
||||
#if __has_builtin(__builtin_umul_overflow) || __GNUC__ >= 5
|
||||
|
|
|
@ -169,8 +169,8 @@ extern size_t wcslcat(wchar_t*, const wchar_t*, size_t);
|
|||
extern size_t wcslcpy(wchar_t*, const wchar_t*, size_t);
|
||||
|
||||
typedef void *wctrans_t;
|
||||
extern wint_t towctrans(wint_t, wctrans_t);
|
||||
extern wctrans_t wctrans(const char*);
|
||||
extern wint_t towctrans(wint_t, wctrans_t) __UNAVAILABLE;
|
||||
extern wctrans_t wctrans(const char*) __UNAVAILABLE;
|
||||
|
||||
#if __POSIX_VISIBLE >= 200809
|
||||
FILE* open_wmemstream(wchar_t**, size_t*);
|
||||
|
|
Loading…
Reference in a new issue