diff options
Diffstat (limited to 'resolv')
-rw-r--r-- | resolv/netdb.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/resolv/netdb.h b/resolv/netdb.h index 7c5c9c9883..47669c8002 100644 --- a/resolv/netdb.h +++ b/resolv/netdb.h @@ -62,8 +62,6 @@ extern int *__h_errno_location (void) __THROW __attribute__ ((__const__)); /* Possible values left in `h_errno'. */ -#define NETDB_INTERNAL -1 /* See errno. */ -#define NETDB_SUCCESS 0 /* No problem. */ #define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found. */ #define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL. */ @@ -71,7 +69,11 @@ extern int *__h_errno_location (void) __THROW __attribute__ ((__const__)); NOTIMP. */ #define NO_DATA 4 /* Valid name, no data record of requested type. */ -#define NO_ADDRESS NO_DATA /* No address, look for MX record. */ +#if defined __USE_MISC || defined __USE_GNU +# define NETDB_INTERNAL -1 /* See errno. */ +# define NETDB_SUCCESS 0 /* No problem. */ +# define NO_ADDRESS NO_DATA /* No address, look for MX record. */ +#endif #ifdef __USE_XOPEN2K /* Highest reserved Internet port number. */ @@ -83,13 +85,14 @@ extern int *__h_errno_location (void) __THROW __attribute__ ((__const__)); # define SCOPE_DELIMITER '%' #endif +#if defined __USE_MISC || defined __USE_GNU /* Print error indicated by `h_errno' variable on standard error. STR if non-null is printed before the error string. */ extern void herror (__const char *__str) __THROW; /* Return string associated with error ERR_NUM. */ extern __const char *hstrerror (int __err_num) __THROW; - +#endif /* Description of data base entry for a single host. */ @@ -100,7 +103,9 @@ struct hostent int h_addrtype; /* Host address type. */ int h_length; /* Length of address. */ char **h_addr_list; /* List of addresses from name server. */ -#define h_addr h_addr_list[0] /* Address, for backward compatibility. */ +#if defined __USE_MISC || defined __USE_GNU +# define h_addr h_addr_list[0] /* Address, for backward compatibility.*/ +#endif }; /* Open host data base files and mark them as staying open even after @@ -590,15 +595,15 @@ struct gaicb # define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ # define EAI_AGAIN -3 /* Temporary failure in name resolution. */ # define EAI_FAIL -4 /* Non-recoverable failure in name res. */ -# define EAI_NODATA -5 /* No address associated with NAME. */ # define EAI_FAMILY -6 /* `ai_family' not supported. */ # define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */ # define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */ -# define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */ # define EAI_MEMORY -10 /* Memory allocation failure. */ # define EAI_SYSTEM -11 /* System error returned in `errno'. */ # define EAI_OVERFLOW -12 /* Argument buffer overflow. */ # ifdef __USE_GNU +# define EAI_NODATA -5 /* No address associated with NAME. */ +# define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */ # define EAI_INPROGRESS -100 /* Processing request in progress. */ # define EAI_CANCELED -101 /* Request canceled. */ # define EAI_NOTCANCELED -102 /* Request not canceled. */ @@ -607,8 +612,10 @@ struct gaicb # define EAI_IDN_ENCODE -105 /* IDN encoding failed. */ # endif -# define NI_MAXHOST 1025 -# define NI_MAXSERV 32 +# ifdef __USE_GNU +# define NI_MAXHOST 1025 +# define NI_MAXSERV 32 +# endif # define NI_NUMERICHOST 1 /* Don't try to look up hostname. */ # define NI_NUMERICSERV 2 /* Don't convert port number to name. */ |