Commit 0f3085c8 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

iphlpapi: Don't rely on the HAVE_XXX macros having a numeric values.

parent 697cea2f
...@@ -664,9 +664,9 @@ DWORD WINAPI GetIpStatistics(PMIB_IPSTATS stats) ...@@ -664,9 +664,9 @@ DWORD WINAPI GetIpStatistics(PMIB_IPSTATS stats)
int mib[] = {CTL_NET, PF_INET, IPPROTO_IP, IPCTL_STATS}; int mib[] = {CTL_NET, PF_INET, IPPROTO_IP, IPCTL_STATS};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0])) #define MIB_LEN (sizeof(mib) / sizeof(mib[0]))
int ip_ttl, ip_forwarding; int ip_ttl, ip_forwarding;
#if HAVE_STRUCT_IPSTAT_IPS_TOTAL #if defined(HAVE_STRUCT_IPSTAT_IPS_TOTAL)
struct ipstat ip_stat; struct ipstat ip_stat;
#elif HAVE_STRUCT_IP_STATS_IPS_TOTAL #elif defined(HAVE_STRUCT_IP_STATS_IPS_TOTAL)
struct ip_stats ip_stat; struct ip_stats ip_stat;
#endif #endif
size_t needed; size_t needed;
...@@ -812,7 +812,7 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats) ...@@ -812,7 +812,7 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats)
} }
if (kc) kstat_close( kc ); 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 */ #ifndef TCPTV_MIN /* got removed in Mac OS X for some reason */
#define TCPTV_MIN 2 #define TCPTV_MIN 2
...@@ -821,9 +821,9 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats) ...@@ -821,9 +821,9 @@ DWORD WINAPI GetTcpStatistics(PMIB_TCPSTATS stats)
int mib[] = {CTL_NET, PF_INET, IPPROTO_TCP, TCPCTL_STATS}; int mib[] = {CTL_NET, PF_INET, IPPROTO_TCP, TCPCTL_STATS};
#define MIB_LEN (sizeof(mib) / sizeof(mib[0])) #define MIB_LEN (sizeof(mib) / sizeof(mib[0]))
#define hz 1000 #define hz 1000
#if HAVE_STRUCT_TCPSTAT_TCPS_CONNATTEMPT #if defined(HAVE_STRUCT_TCPSTAT_TCPS_CONNATTEMPT)
struct tcpstat tcp_stat; struct tcpstat tcp_stat;
#elif HAVE_STRUCT_TCP_STATS_TCPS_CONNATTEMPT #elif defined(HAVE_STRUCT_TCP_STATS_TCPS_CONNATTEMPT)
struct tcp_stats tcp_stat; struct tcp_stats tcp_stat;
#endif #endif
size_t needed = sizeof(tcp_stat); size_t needed = sizeof(tcp_stat);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment