X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Fnetdb.h;h=adde2c5e54f3dad1ae8255e89f43ee07d1d9d1ec;hb=48be5b6313d7b827acf555769e93b389fa9f6307;hp=2dd799b91af6c4c054e0daf0040acc01d3ac197e;hpb=18144af297e7aa3a0f121262dba569446de6191a;p=musl diff --git a/include/netdb.h b/include/netdb.h index 2dd799b9..adde2c5e 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -13,8 +13,7 @@ extern "C" { #include #endif -struct addrinfo -{ +struct addrinfo { int ai_flags; int ai_family; int ai_socktype; @@ -25,8 +24,6 @@ struct addrinfo struct addrinfo *ai_next; }; -#define IPPORT_RESERVED 1024 - #define AI_PASSIVE 0x01 #define AI_CANONNAME 0x02 #define AI_NUMERICHOST 0x04 @@ -41,7 +38,7 @@ struct addrinfo #define NI_NOFQDN 0x04 #define NI_NAMEREQD 0x08 #define NI_DGRAM 0x10 -/*#define NI_NUMERICSCOPE */ +#define NI_NUMERICSCOPE 0x100 #define EAI_BADFLAGS -1 #define EAI_NONAME -2 @@ -62,16 +59,14 @@ const char *gai_strerror(int); /* Legacy functions follow (marked OBsolete in SUS) */ -struct netent -{ +struct netent { char *n_name; char **n_aliases; int n_addrtype; uint32_t n_net; }; -struct hostent -{ +struct hostent { char *h_name; char **h_aliases; int h_addrtype; @@ -80,16 +75,14 @@ struct hostent }; #define h_addr h_addr_list[0] -struct servent -{ +struct servent { char *s_name; char **s_aliases; int s_port; char *s_proto; }; -struct protoent -{ +struct protoent { char *p_name; char **p_aliases; int p_proto; @@ -122,15 +115,13 @@ struct protoent *getprotobynumber (int); || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700) struct hostent *gethostbyname (const char *); struct hostent *gethostbyaddr (const void *, socklen_t, int); -#ifdef __GNUC__ -__attribute__((const)) -#endif int *__h_errno_location(void); #define h_errno (*__h_errno_location()) #define HOST_NOT_FOUND 1 #define TRY_AGAIN 2 #define NO_RECOVERY 3 #define NO_DATA 4 +#define NO_ADDRESS NO_DATA #endif #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)