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

Francois Gouget fgouget at free.fr
Fri Jun 8 13:51:02 CDT 2012


On Fri, 8 Jun 2012, Dan Kegel wrote:

> -#elif defined(HAVE_SYS_SYSCTL_H) && defined(IPCTL_STATS) &&
> (HAVE_STRUCT_IPSTAT_IPS_TOTAL || HAVE_STRUCT_IP_STATS_IPS_TOTAL)
> +#elif defined(HAVE_SYS_SYSCTL_H) && defined(IPCTL_STATS) &&
> (defined(HAVE_STRUCT_IPSTAT_IPS_TOTAL) ||
> defined(HAVE_STRUCT_IP_STATS_IPS_TOTAL))
> 
> Isn't this a no-op?  I thought that an undefined symbol was
> treated as false by the preprocessor.

Actually you may be right. But then this is the only place in Wine where 
we rely on this and I see not reason to make this assumption. Even more 
so since we don't for the other macros in the same test which makes this 
locally inconsistent.

-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
                  Hiroshima '45 - Czernobyl '86 - Windows '95



More information about the wine-devel mailing list