hide implementation specific internal functions from netdb.h.

it is needed to make get{host,net}by*() thread-safe.
This commit is contained in:
ume 2005-04-27 19:12:57 +00:00
parent 1fe881be97
commit 1dcbf1fa6d
7 changed files with 17 additions and 12 deletions

View File

@ -257,18 +257,6 @@ void setservent(int);
/* DO NOT USE THESE, THEY ARE SUBJECT TO CHANGE AND ARE NOT PORTABLE!!! */
int * __h_error(void);
void _sethosthtent(int);
void _endhosthtent(void);
void _sethostdnsent(int);
void _endhostdnsent(void);
void _setnethtent(int);
void _endnethtent(void);
void _setnetdnsent(int);
void _endnetdnsent(void);
struct hostent * _gethostbynisname(const char *, int);
struct hostent * _gethostbynisaddr(const char *, int, int);
void _map_v4v6_address(const char *, char *);
void _map_v4v6_hostent(struct hostent *, char **, char **);
__END_DECLS
#endif /* !_NETDB_H_ */

View File

@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$");
#include <stdarg.h>
#include <nsswitch.h>
#include "netdb_private.h"
#include "res_config.h"
#define SPRINTF(x) ((size_t)sprintf x)

View File

@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$");
#include <nsswitch.h>
#include <arpa/nameser.h> /* XXX */
#include <resolv.h> /* XXX */
#include "netdb_private.h"
#define MAXALIASES 35

View File

@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <arpa/nameser.h> /* XXX hack for _res */
#include <resolv.h> /* XXX hack for _res */
#include "un-namespace.h"
#include "netdb_private.h"
extern int _ht_gethostbyname(void *, void *, va_list);
extern int _dns_gethostbyname(void *, void *, va_list);

View File

@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include <stdarg.h>
#include <nsswitch.h>
#include "un-namespace.h"
#include "netdb_private.h"
extern int _ht_getnetbyname(void *, void *, va_list);
extern int _dns_getnetbyname(void *, void *, va_list);

View File

@ -120,6 +120,7 @@ __FBSDID("$FreeBSD$");
#include <nsswitch.h>
#include <unistd.h>
#include "un-namespace.h"
#include "netdb_private.h"
#ifndef _PATH_HOSTS
#define _PATH_HOSTS "/etc/hosts"

View File

@ -79,6 +79,18 @@ struct servdata {
struct protodata *__protodata_init(void);
struct servdata *__servdata_init(void);
void _endhostdnsent(void);
void _endhosthtent(void);
void _endnetdnsent(void);
void _endnethtent(void);
struct hostent *_gethostbynisaddr(const char *, int, 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);
void _sethosthtent(int);
void _setnetdnsent(int);
void _setnethtent(int);
void endprotoent_r(struct protoent_data *);
void endservent_r(struct servent_data *);
int getprotobyname_r(const char *, struct protoent *, struct protoent_data *);