X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Fnetdb.h;h=47940684e6db1d8419fdd538a6b3bbdb71c28888;hb=6d70c08a2c37745df637b231711f6dec79dbc6e1;hp=3cda7114e8c24724efbe919505fbf0c839d55644;hpb=b367ab15fa68a59c8532f8d06f5d1b01aa5a5c7a;p=musl diff --git a/include/netdb.h b/include/netdb.h index 3cda7114..47940684 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -6,15 +6,12 @@ extern "C" { #endif #include +#include #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) #define __NEED_size_t -#endif - -#define __NEED_socklen_t -#define __NEED_uint32_t - #include +#endif struct addrinfo { @@ -44,7 +41,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 @@ -125,18 +122,17 @@ 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) +void herror(const char *); const char *hstrerror(int); int gethostbyname_r(const char *, struct hostent *, char *, size_t, struct hostent **, int *); int gethostbyname2_r(const char *, int, struct hostent *, char *, size_t, struct hostent **, int *);