* getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
authorEric Blake <ebb9@byu.net>
Wed, 5 Jul 2006 17:53:09 +0000 (17:53 +0000)
committerEric Blake <ebb9@byu.net>
Wed, 5 Jul 2006 17:53:09 +0000 (17:53 +0000)
missing from netdb.h.
* getaddrinfo.c (includes): Include inet_ntop and snprintf.

lib/ChangeLog
lib/getaddrinfo.c
lib/getaddrinfo.h

index c0fdd3a..36ee58b 100644 (file)
@@ -1,3 +1,9 @@
+2006-07-05  Eric Blake  <ebb9@byu.net>
+
+       * getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
+       missing from netdb.h.
+       * getaddrinfo.c (includes): Include inet_ntop and snprintf.
+
 2006-06-27  Bruno Haible  <bruno@clisp.org>
 
        Assume ANSI C header files and <ctype.h> functions.
index 2cba443..c54d407 100644 (file)
@@ -38,6 +38,8 @@
 #define _(String) gettext (String)
 #define N_(String) String
 
+#include "inet_ntop.h"
+#include "snprintf.h"
 #include "strdup.h"
 
 #if defined _WIN32 || defined __WIN32__
index bbf71f2..d87485e 100644 (file)
@@ -142,4 +142,12 @@ extern int getnameinfo(const struct sockaddr *restrict sa, socklen_t salen,
 
 # endif
 
+/* Possible flags for getnameinfo.  */
+# ifndef NI_NUMERICHOST
+#  define NI_NUMERICHOST 1
+# endif
+# ifndef NI_NUMERICSERV
+#  define NI_NUMERICSERV 2
+# endif
+
 #endif /* GETADDRINFO_H */