freeaddrinfo(ai);
}
+/* Note: Implementations written to RFC 2133 use size_t, while RFC
+ 2553 implementations use socklen_t, for the second parameter.
+
+ Mac OS X (10.2) and AIX 4.3.3 appear to be in the RFC 2133 camp,
+ but we don't have an autoconf test for that right now. */
static inline int
system_getnameinfo (const struct sockaddr *sa, socklen_t salen,
char *host, size_t hostlen, char *serv, size_t servlen,
#define getaddrinfo my_fake_getaddrinfo
#undef freeaddrinfo
#define freeaddrinfo my_fake_freeaddrinfo
-#undef getnameinfo
-#define getnameinfo my_fake_getnameinfo
#endif
#endif
-#if !defined (HAVE_GETADDRINFO)
-static
-int getnameinfo (const struct sockaddr *addr, socklen_t len,
- char *host, socklen_t hostlen,
- char *service, socklen_t servicelen,
- int flags);
-#endif
-
#if !defined (HAVE_GETADDRINFO)
#define HAVE_FAKE_GETADDRINFO /* was not originally HAVE_GETADDRINFO */
#undef HAVE_GETNAMEINFO
#define HAVE_GETNAMEINFO 1
+#undef getnameinfo
+#define getnameinfo my_fake_getnameinfo
+
static
char *gai_strerror (int code);
#endif
+#if !defined (HAVE_GETADDRINFO)
+static
+int getnameinfo (const struct sockaddr *addr, socklen_t len,
+ char *host, socklen_t hostlen,
+ char *service, socklen_t servicelen,
+ int flags);
+#endif
+
/* Fudge things on older gai implementations. */
/* AIX 4.3.3 is based on RFC 2133; no AI_NUMERICHOST. */
#ifndef AI_NUMERICHOST