Francois Gouget : iphlpapi: Don' t rely on the HAVE_XXX macros having a numeric values.
Alexandre Julliard
julliard at winehq.org
Wed Jun 13 16:08:33 CDT 2012
Module: wine
Branch: master
Commit: 0f3085c82e2d1c4a5d90d1f4c5253256ad2f4871
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0f3085c82e2d1c4a5d90d1f4c5253256ad2f4871
Author: Francois Gouget <fgouget at free.fr>
Date: Wed Jun 13 04:53:28 2012 +0200
iphlpapi: Don't rely on the HAVE_XXX macros having a numeric values.
---
dlls/iphlpapi/ipstats.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index 009dd99..2f8ec90 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -664,9 +664,9 @@ DWORD WINAPI GetIpStatistics(PMIB_IPSTATS stats)
int mib[] = {CTL_NET, PF_INET, IPPROTO_IP, IPCTL_STATS};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0]))
int ip_ttl, ip_forwarding;
-#if HAVE_STRUCT_IPSTAT_IPS_TOTAL
+#if defined(HAVE_STRUCT_IPSTAT_IPS_TOTAL)
struct ipstat ip_stat;
-#elif HAVE_STRUCT_IP_STATS_IPS_TOTAL
+#elif defined(HAVE_STRUCT_IP_STATS_IPS_TOTAL)
struct ip_stats ip_stat;
#endif
size_t needed;
@@ -812,7 +812,7 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats)
}
if (kc) kstat_close( kc );
}
-#elif defined(HAVE_SYS_SYSCTL_H) && defined(TCPCTL_STATS) && (HAVE_STRUCT_TCPSTAT_TCPS_CONNATTEMPT || HAVE_STRUCT_TCP_STATS_TCPS_CONNATTEMPT)
+#elif defined(HAVE_SYS_SYSCTL_H) && defined(TCPCTL_STATS) && (defined(HAVE_STRUCT_TCPSTAT_TCPS_CONNATTEMPT) || defined(HAVE_STRUCT_TCP_STATS_TCPS_CONNATTEMPT))
{
#ifndef TCPTV_MIN /* got removed in Mac OS X for some reason */
#define TCPTV_MIN 2
@@ -821,9 +821,9 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats)
int mib[] = {CTL_NET, PF_INET, IPPROTO_TCP, TCPCTL_STATS};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0]))
#define hz 1000
-#if HAVE_STRUCT_TCPSTAT_TCPS_CONNATTEMPT
+#if defined(HAVE_STRUCT_TCPSTAT_TCPS_CONNATTEMPT)
struct tcpstat tcp_stat;
-#elif HAVE_STRUCT_TCP_STATS_TCPS_CONNATTEMPT
+#elif defined(HAVE_STRUCT_TCP_STATS_TCPS_CONNATTEMPT)
struct tcp_stats tcp_stat;
#endif
size_t needed = sizeof(tcp_stat);
More information about the wine-cvs
mailing list