From 167217bec15c9c7aa70ba2a3dc9c689b3cd91872 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Mon, 14 May 2001 14:19:32 +0000 Subject: import new version of dietlibc --- mdk-stage1/dietlibc/include/netdb.h | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'mdk-stage1/dietlibc/include/netdb.h') diff --git a/mdk-stage1/dietlibc/include/netdb.h b/mdk-stage1/dietlibc/include/netdb.h index 29f452ee9..887faa999 100644 --- a/mdk-stage1/dietlibc/include/netdb.h +++ b/mdk-stage1/dietlibc/include/netdb.h @@ -23,9 +23,9 @@ struct servent extern void endservent (void) __THROW; extern struct servent *getservent (void) __THROW; -extern struct servent *getservbyname (__const char *__name, - __const char *__proto) __THROW; -extern struct servent *getservbyport (int __port, __const char *__proto) +extern struct servent *getservbyname (const char *__name, + const char *__proto) __THROW; +extern struct servent *getservbyport (int __port, const char *__proto) __THROW; struct hostent @@ -45,4 +45,31 @@ extern struct hostent *gethostbyaddr (const void *__addr, socklen_t __len, extern struct hostent *gethostbyname (const char *__name) __THROW; extern struct hostent *gethostbyname2 (const char *__name, int __af) __THROW; +/* this glibc "invention" is so ugly, I'm going to throw up any minute + * now */ +extern int gethostbyname_r(const char* NAME, struct hostent* RESULT_BUF,char* BUF, + size_t BUFLEN, struct hostent** RESULT, + int* H_ERRNOP) __THROW; + +#define HOST_NOT_FOUND 1 +#define TRY_AGAIN 2 +#define NO_RECOVERY 3 +#define NO_ADDRESS 4 + +extern int gethostbyaddr_r(const char* addr, size_t length, int format, + struct hostent* result, char *buf, size_t buflen, + struct hostent **RESULT, int *h_errnop) __THROW; + +struct protoent { + char *p_name; /* official protocol name */ + char **p_aliases; /* alias list */ + int p_proto; /* protocol number */ +}; + +struct protoent *getprotoent(void) __THROW; +struct protoent *getprotobyname(const char *name) __THROW; +struct protoent *getprotobynumber(int proto) __THROW; +void setprotoent(int stayopen) __THROW; +void endprotoent(void) __THROW; + #endif -- cgit v1.2.1