* port-sockets.h: Define _XOPEN_SOURCE_EXTENDED around inclusion of netdb.h if
it's not defined and not Windows, as fake-addrinfo.h used to do; otherwise just
include it normally.
ticket: 2379
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16608
dc483132-0cff-0310-8789-
dd5450dbe970
2004-07-16 Ken Raeburn <raeburn@mit.edu>
+ * fake-addrinfo.h: Don't include netdb.h, since port-sockets.h
+ already does.
+ * port-sockets.h: Define _XOPEN_SOURCE_EXTENDED around inclusion
+ of netdb.h if it's not defined and not Windows, as fake-addrinfo.h
+ used to do; otherwise just include it normally.
+
* port-sockets.h (inet_ntop): Cast NULL to desired return pointer
type.
# define AI_NUMERICHOST 0
#endif
-#if !defined(_XOPEN_SOURCE_EXTENDED) && !defined(HAVE_MACSOCK_H) && !defined(_WIN32)
-/* Hack for HPUX, to get h_errno. */
-# define _XOPEN_SOURCE_EXTENDED 1
-# include <netdb.h>
-# undef _XOPEN_SOURCE_EXTENDED
-#endif
-
#if defined(HAVE_FAKE_GETADDRINFO) || defined(FAI_CACHE)
#define NEED_FAKE_GETADDRINFO
#endif
#include <sys/types.h>
#include <netinet/in.h> /* For struct sockaddr_in and in_addr */
#include <arpa/inet.h> /* For inet_ntoa */
-#include <netdb.h> /* For struct hostent, gethostbyname, etc */
+
+#if !defined(_XOPEN_SOURCE_EXTENDED) && !defined(HAVE_MACSOCK_H) && !defined(_WIN32)
+/* Hack for HPUX, to get h_errno. */
+# define _XOPEN_SOURCE_EXTENDED 1
+# include <netdb.h>
+# undef _XOPEN_SOURCE_EXTENDED
+#else
+# include <netdb.h>
+#endif
+
#include <sys/param.h> /* For MAXHOSTNAMELEN */
#include <sys/socket.h> /* For SOCK_*, AF_*, etc */
#include <sys/time.h> /* For struct timeval */