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

This commit is contained in:
Francois Gouget 2012-06-13 04:53:28 +02:00 committed by Alexandre Julliard
parent 697cea2f93
commit 0f3085c82e
1 changed files with 5 additions and 5 deletions

View File

@ -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);