aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-10-29 00:28:11 +0000
committerGuy Harris <guy@alum.mit.edu>2002-10-29 00:28:11 +0000
commit0b8419fd5b1b6da7be6df44f17ecdb9fbe3c4159 (patch)
treecc0b5e965f15f8b9ab0bee112706a945dcebe206 /epan
parenta7744b697f2243613437c8bd1f2bddaeda363b32 (diff)
Note why we're including <sys/socket.h> and <winsock2.h> in places where
we're including them to get AF_ values. Shuffle the order of those includes in "inet_pton.c" to match the order in "inet_ntop.c". Include <winsock2.h> in "resolv.c" and "to_str.c" so that we get AF_ values from it - including AF_INET6 - if they exist, as we want to have everybody who uses AF_INET6 get the same value. svn path=/trunk/; revision=6517
Diffstat (limited to 'epan')
-rw-r--r--epan/inet_ntop.c6
-rw-r--r--epan/inet_pton.c12
-rw-r--r--epan/resolv.c8
-rw-r--r--epan/to_str.c8
4 files changed, 21 insertions, 13 deletions
diff --git a/epan/inet_ntop.c b/epan/inet_ntop.c
index 6322121acb..a746a480f1 100644
--- a/epan/inet_ntop.c
+++ b/epan/inet_ntop.c
@@ -20,7 +20,7 @@
#endif
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id: inet_ntop.c,v 1.6 2002/08/28 20:40:44 jmayer Exp $";
+static char rcsid[] = "$Id: inet_ntop.c,v 1.7 2002/10/29 00:28:10 guy Exp $";
#endif /* LIBC_SCCS and not lint */
#ifdef HAVE_SYS_PARAM_H
@@ -32,11 +32,11 @@ static char rcsid[] = "$Id: inet_ntop.c,v 1.6 2002/08/28 20:40:44 jmayer Exp $";
#endif
#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
+#include <sys/socket.h> /* needed to define AF_ values on UNIX */
#endif
#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
+#include <winsock2.h> /* needed to define AF_ values on Windows */
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif
diff --git a/epan/inet_pton.c b/epan/inet_pton.c
index 60a4ff5879..99426e5178 100644
--- a/epan/inet_pton.c
+++ b/epan/inet_pton.c
@@ -20,7 +20,7 @@
#endif
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id: inet_pton.c,v 1.4 2002/08/03 19:37:48 guy Exp $";
+static char rcsid[] = "$Id: inet_pton.c,v 1.5 2002/10/29 00:28:10 guy Exp $";
#endif /* LIBC_SCCS and not lint */
#ifdef HAVE_SYS_PARAM_H
@@ -31,13 +31,13 @@ static char rcsid[] = "$Id: inet_pton.c,v 1.4 2002/08/03 19:37:48 guy Exp $";
#include <sys/types.h>
#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#define EAFNOSUPPORT WSAEAFNOSUPPORT
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h> /* needed to define AF_ values on UNIX */
#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h> /* needed to define AF_ values on Windows */
+#define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif
#ifdef HAVE_NETINET_IN_H
diff --git a/epan/resolv.c b/epan/resolv.c
index 50440fe6a9..5aafe89847 100644
--- a/epan/resolv.c
+++ b/epan/resolv.c
@@ -1,7 +1,7 @@
/* resolv.c
* Routines for network object lookup
*
- * $Id: resolv.c,v 1.27 2002/09/10 10:12:34 guy Exp $
+ * $Id: resolv.c,v 1.28 2002/10/29 00:28:10 guy Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
@@ -58,7 +58,11 @@
#include <signal.h>
#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
+#include <sys/socket.h> /* needed to define AF_ values on UNIX */
+#endif
+
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h> /* needed to define AF_ values on Windows */
#endif
#ifdef AVOID_DNS_TIMEOUT
diff --git a/epan/to_str.c b/epan/to_str.c
index 7560573a5e..61b414c259 100644
--- a/epan/to_str.c
+++ b/epan/to_str.c
@@ -1,7 +1,7 @@
/* to_str.c
* Routines for utilities to convert various other types to strings.
*
- * $Id: to_str.c,v 1.17 2002/08/28 20:40:45 jmayer Exp $
+ * $Id: to_str.c,v 1.18 2002/10/29 00:28:11 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -46,7 +46,11 @@
#endif
#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
+#include <sys/socket.h> /* needed to define AF_ values on UNIX */
+#endif
+
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h> /* needed to define AF_ values on Windows */
#endif
#ifdef NEED_INET_V6DEFS_H