diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2001-05-14 14:19:32 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2001-05-14 14:19:32 +0000 |
commit | 167217bec15c9c7aa70ba2a3dc9c689b3cd91872 (patch) | |
tree | 7c0c62debf8f9f145643102fb52b81afce743594 /mdk-stage1/dietlibc/include/netdb.h | |
parent | 9097327dc1c667fc51b8e05cc7c0626fac96665d (diff) | |
download | drakx-backup-do-not-use-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar drakx-backup-do-not-use-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar.gz drakx-backup-do-not-use-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar.bz2 drakx-backup-do-not-use-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.tar.xz drakx-backup-do-not-use-167217bec15c9c7aa70ba2a3dc9c689b3cd91872.zip |
import new version of dietlibc
Diffstat (limited to 'mdk-stage1/dietlibc/include/netdb.h')
-rw-r--r-- | mdk-stage1/dietlibc/include/netdb.h | 33 |
1 files changed, 30 insertions, 3 deletions
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 |