Delete declarations which don't exist.

Bug: http://b/28178111
Change-Id: I72d5d015d7927a8df24b3973bf8a052053a067fb
diff --git a/libc/dns/include/resolv_private.h b/libc/dns/include/resolv_private.h
index 3ab8ea6..8dad926 100644
--- a/libc/dns/include/resolv_private.h
+++ b/libc/dns/include/resolv_private.h
@@ -536,6 +536,15 @@
 
 #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
diff --git a/libc/include/arpa/nameser.h b/libc/include/arpa/nameser.h
index 91561ce..3690f9c 100644
--- a/libc/include/arpa/nameser.h
+++ b/libc/include/arpa/nameser.h
@@ -566,70 +566,30 @@
 #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
diff --git a/libc/include/arpa/telnet.h b/libc/include/arpa/telnet.h
index d318e08..b8212f8 100644
--- a/libc/include/arpa/telnet.h
+++ b/libc/include/arpa/telnet.h
@@ -64,8 +64,6 @@
 	"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 *slc_names[] = {
 	SLC_NAMELIST
 };
-#else
-extern char *slc_names[];
 #define	SLC_NAMES SLC_NAMELIST
 #endif
 
@@ -266,8 +262,6 @@
 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 *enctype_names[] = {
 	"ANY", "DES_CFB64",  "DES_OFB64",  0,
 };
-#else
-extern const char *encrypt_names[];
-extern const char *enctype_names[];
 #endif
 
 
diff --git a/libc/include/net/if_ether.h b/libc/include/net/if_ether.h
index 8daa16b..6da96e4 100644
--- a/libc/include/net/if_ether.h
+++ b/libc/include/net/if_ether.h
@@ -205,12 +205,8 @@
  */
 #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
 
diff --git a/libc/include/netdb.h b/libc/include/netdb.h
index 3bb973c..339bac2 100644
--- a/libc/include/netdb.h
+++ b/libc/include/netdb.h
@@ -199,49 +199,29 @@
 #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
diff --git a/libc/include/nsswitch.h b/libc/include/nsswitch.h
index af88433..addbfc8 100644
--- a/libc/include/nsswitch.h
+++ b/libc/include/nsswitch.h
@@ -144,19 +144,6 @@
 
 
 /*
- * 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)
  * tuples to the nss_method and associated callback data.  Effectively,
diff --git a/libc/include/resolv.h b/libc/include/resolv.h
index c8899ed..b10aaf4 100644
--- a/libc/include/resolv.h
+++ b/libc/include/resolv.h
@@ -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);
diff --git a/libc/include/sgtty.h b/libc/include/sgtty.h
deleted file mode 100644
index 1ac3100..0000000
--- a/libc/include/sgtty.h
+++ /dev/null
@@ -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_ */
diff --git a/libc/include/stdio_ext.h b/libc/include/stdio_ext.h
index f299e54..de5d715 100644
--- a/libc/include/stdio_ext.h
+++ b/libc/include/stdio_ext.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*);