svn commit: r292719 - head/lib/libc/net

Hajimu UMEMOTO ume at FreeBSD.org
Fri Dec 25 10:49:41 UTC 2015


Author: ume
Date: Fri Dec 25 10:49:40 2015
New Revision: 292719
URL: https://svnweb.freebsd.org/changeset/base/292719

Log:
  Remove _gethostbynisname() and _gethostbynisaddr().  These functions
  used to be called from getipnodebyname().
  
  MFC after:	1 week

Modified:
  head/lib/libc/net/gethostbynis.c
  head/lib/libc/net/netdb_private.h

Modified: head/lib/libc/net/gethostbynis.c
==============================================================================
--- head/lib/libc/net/gethostbynis.c	Fri Dec 25 10:08:42 2015	(r292718)
+++ head/lib/libc/net/gethostbynis.c	Fri Dec 25 10:49:40 2015	(r292719)
@@ -198,61 +198,6 @@ _gethostbynisaddr_r(const void *addr, so
 }
 #endif /* YP */
 
-/* XXX _gethostbynisname/_gethostbynisaddr only used by getipnodeby*() */
-struct hostent *
-_gethostbynisname(const char *name, int af)
-{
-#ifdef YP
-	struct hostent *he;
-	struct hostent_data *hed;
-	u_long oresopt;
-	int error;
-	res_state statp;
-
-	statp = __res_state();
-	if ((he = __hostent_init()) == NULL ||
-	    (hed = __hostent_data_init()) == NULL) {
-		RES_SET_H_ERRNO(statp, NETDB_INTERNAL);
-		return (NULL);
-	}
-
-	oresopt = statp->options;
-	statp->options &= ~RES_USE_INET6;
-	error = _gethostbynisname_r(name, af, he, hed);
-	statp->options = oresopt;
-	return (error == 0) ? he : NULL;
-#else
-	return (NULL);
-#endif
-}
-
-struct hostent *
-_gethostbynisaddr(const void *addr, socklen_t len, int af)
-{
-#ifdef YP
-	struct hostent *he;
-	struct hostent_data *hed;
-	u_long oresopt;
-	int error;
-	res_state statp;
-
-	statp = __res_state();
-	if ((he = __hostent_init()) == NULL ||
-	    (hed = __hostent_data_init()) == NULL) {
-		RES_SET_H_ERRNO(statp, NETDB_INTERNAL);
-		return (NULL);
-	}
-
-	oresopt = statp->options;
-	statp->options &= ~RES_USE_INET6;
-	error = _gethostbynisaddr_r(addr, len, af, he, hed);
-	statp->options = oresopt;
-	return (error == 0) ? he : NULL;
-#else
-	return (NULL);
-#endif
-}
-
 int
 _nis_gethostbyname(void *rval, void *cb_data, va_list ap)
 {

Modified: head/lib/libc/net/netdb_private.h
==============================================================================
--- head/lib/libc/net/netdb_private.h	Fri Dec 25 10:08:42 2015	(r292718)
+++ head/lib/libc/net/netdb_private.h	Fri Dec 25 10:49:40 2015	(r292719)
@@ -133,8 +133,6 @@ void _endhostdnsent(void);
 void _endhosthtent(struct hostent_data *);
 void _endnetdnsent(void);
 void _endnethtent(struct netent_data *);
-struct hostent *_gethostbynisaddr(const void *, socklen_t, int);
-struct hostent *_gethostbynisname(const char *, int);
 void _map_v4v6_address(const char *, char *);
 void _map_v4v6_hostent(struct hostent *, char **, char *);
 void _sethostdnsent(int);


More information about the svn-src-head mailing list