Alexandre Julliard : configure: Fix the netinet header checks for Mac OS and Solaris.
Alexandre Julliard
julliard at winehq.org
Fri Jun 27 07:42:12 CDT 2008
Module: wine
Branch: master
Commit: dfb308a6b108c9f137a53595e7710283838c9ad2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dfb308a6b108c9f137a53595e7710283838c9ad2
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Jun 27 14:06:47 2008 +0200
configure: Fix the netinet header checks for Mac OS and Solaris.
---
configure | 31 ++++++++++++++++++++++++-------
configure.ac | 25 ++++++++++++++++++++-----
dlls/iphlpapi/ipstats.c | 8 +++++++-
include/config.h.in | 3 +++
4 files changed, 54 insertions(+), 13 deletions(-)
diff --git a/configure b/configure
index 2f13aa8..d91102b 100755
--- a/configure
+++ b/configure
@@ -7210,9 +7210,6 @@ done
-
-
-
for ac_header in \
AudioUnit/AudioUnit.h \
Carbon/Carbon.h \
@@ -7261,13 +7258,10 @@ for ac_header in \
mntent.h \
ncurses.h \
netdb.h \
- netinet/if_ether.h \
netinet/in.h \
netinet/in_systm.h \
- netinet/ip_icmp.h \
netinet/tcp.h \
netinet/tcp_fsm.h \
- netinet/udp.h \
openssl/err.h \
openssl/ssl.h \
png.h \
@@ -7615,7 +7609,24 @@ done
-for ac_header in netinet/in_pcb.h netinet/ip_var.h net/if.h net/if_arp.h net/if_dl.h net/if_types.h net/route.h netipx/ipx.h
+
+
+
+
+for ac_header in \
+ netinet/ip.h \
+ net/if.h \
+ net/if_arp.h \
+ net/if_dl.h \
+ net/if_types.h \
+ net/route.h \
+ netinet/if_ether.h \
+ netinet/in_pcb.h \
+ netinet/ip_icmp.h \
+ netinet/ip_var.h \
+ netinet/udp.h \
+ netipx/ipx.h \
+
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -7639,6 +7650,9 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
+ #ifdef HAVE_NETINET_IP_H
+ # include <netinet/ip.h>
+ #endif
#include <$ac_header>
_ACEOF
@@ -7713,6 +7727,9 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
+ #ifdef HAVE_NETINET_IP_H
+ # include <netinet/ip.h>
+ #endif
#ifdef HAVE_NETINET_IP_VAR_H
# include <netinet/ip_var.h>
#endif
diff --git a/configure.ac b/configure.ac
index 8695b89..84ffddd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -274,13 +274,10 @@ AC_CHECK_HEADERS(\
mntent.h \
ncurses.h \
netdb.h \
- netinet/if_ether.h \
netinet/in.h \
netinet/in_systm.h \
- netinet/ip_icmp.h \
netinet/tcp.h \
netinet/tcp_fsm.h \
- netinet/udp.h \
openssl/err.h \
openssl/ssl.h \
png.h \
@@ -352,8 +349,20 @@ AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,,
# include <sys/param.h>
#endif])
-AC_CHECK_HEADERS([netinet/in_pcb.h netinet/ip_var.h net/if.h net/if_arp.h net/if_dl.h net/if_types.h net/route.h netipx/ipx.h],,,
- [#include <sys/types.h>
+AC_CHECK_HEADERS(\
+ netinet/ip.h \
+ net/if.h \
+ net/if_arp.h \
+ net/if_dl.h \
+ net/if_types.h \
+ net/route.h \
+ netinet/if_ether.h \
+ netinet/in_pcb.h \
+ netinet/ip_icmp.h \
+ netinet/ip_var.h \
+ netinet/udp.h \
+ netipx/ipx.h \
+,,,[#include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
@@ -362,6 +371,9 @@ AC_CHECK_HEADERS([netinet/in_pcb.h netinet/ip_var.h net/if.h net/if_arp.h net/if
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
+ #endif
+ #ifdef HAVE_NETINET_IP_H
+ # include <netinet/ip.h>
#endif])
AC_CHECK_HEADERS([netinet/tcp_var.h netinet/udp_var.h netinet/icmp_var.h netinet/tcp_timer.h ],,,
@@ -378,6 +390,9 @@ AC_CHECK_HEADERS([netinet/tcp_var.h netinet/udp_var.h netinet/icmp_var.h netinet
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
+ #ifdef HAVE_NETINET_IP_H
+ # include <netinet/ip.h>
+ #endif
#ifdef HAVE_NETINET_IP_VAR_H
# include <netinet/ip_var.h>
#endif
diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index d6d8ab4..5e40219 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -61,13 +61,15 @@
#ifdef HAVE_NETINET_IF_ETHER_H
#include <netinet/if_ether.h>
#endif
+#ifdef HAVE_NETINET_IP_H
+#include <netinet/ip.h>
+#endif
#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
#ifdef HAVE_NETINET_TCP_FSM_H
#include <netinet/tcp_fsm.h>
#endif
-
#ifdef HAVE_NETINET_IN_PCB_H
#include <netinet/in_pcb.h>
#endif
@@ -628,6 +630,10 @@ DWORD getIPStats(PMIB_IPSTATS stats)
DWORD getTCPStats(MIB_TCPSTATS *stats)
{
#if defined(HAVE_SYS_SYSCTL_H) && defined(UDPCTL_STATS)
+#ifndef TCPTV_MIN /* got removed in Mac OS X for some reason */
+#define TCPTV_MIN 2
+#define TCPTV_REXMTMAX 128
+#endif
int mib[] = {CTL_NET, PF_INET, IPPROTO_TCP, TCPCTL_STATS};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0]))
#define hz 1000
diff --git a/include/config.h.in b/include/config.h.in
index 63e8e89..f57ca1a 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -453,6 +453,9 @@
/* Define to 1 if you have the <netinet/in_systm.h> header file. */
#undef HAVE_NETINET_IN_SYSTM_H
+/* Define to 1 if you have the <netinet/ip.h> header file. */
+#undef HAVE_NETINET_IP_H
+
/* Define to 1 if you have the <netinet/ip_icmp.h> header file. */
#undef HAVE_NETINET_IP_ICMP_H
More information about the wine-cvs
mailing list