aboutsummaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-01-16 10:11:18 +0000
committerUlrich Drepper <drepper@redhat.com>2008-01-16 10:11:18 +0000
commita53d3f8295368bd67c9a8e75e88c566043752604 (patch)
tree268a7e9f280cbf8eadd80d15c4c3a3b4b1507a1e /resolv
parentfbe90cd5c7f3ec0d57bfe01cd805db12f53ee946 (diff)
downloadglibc-a53d3f8295368bd67c9a8e75e88c566043752604.zip
glibc-a53d3f8295368bd67c9a8e75e88c566043752604.tar.gz
glibc-a53d3f8295368bd67c9a8e75e88c566043752604.tar.bz2
[BZ #5607]
2008-01-16 Ulrich Drepper <drepper@redhat.com> [BZ #5607] * conform/data/fcntl.h-data: Fix posix_fadvise and posix_fallocate prototypes. * conform/data/limits.h-data: Adjust limits changed in v6 and add additional suffixes. * conform/data/mqueue.h-data: Fix typo in mq_curmsgs entry. Add optional functions mq_timedreceive and mq_timedsend. * conform/data/netdb.h-data: Add more AI_* and EAI_* constants. * conform/data/pthread.h-data: Fix prototype of pthread_condattr_setclock. pthread_sigmask is not required in v6. * conform/data/semaphore.h-data: Allow time.h definitions. * conform/data/signal.h-data: Likewise. * conform/data/stdio.h-data: getw and putw are not required in v6. * conform/data/stdlib.h-data: Change setstate prototype. * conform/data/string.h-data: Fix strerror_r prototype. * conform/data/time.h-data: Fix typo in TIMER_ABSTIME definition. * conform/data/unistd.h-data: pthread_atfork not required in v6. Fix readlink prototype. * conform/data/netinet/in.h-data: Add const to in6addr_any and in6addr_loopback. * inet/netinet/in.h: Cleanup namespace. * posix/regex.h: Likewise. * resolv/netdb.h: Likewise. * sysdeps/unix/sysv/linux/bits/in.h: Likewise. * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise.
Diffstat (limited to 'resolv')
-rw-r--r--resolv/netdb.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/resolv/netdb.h b/resolv/netdb.h
index 7c5c9c9..47669c8 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. */