cURL / Mailing Lists / curl-library / Single Mail


Re: USE_ARES in config-win32.h

From: Yang Tse <>
Date: Thu, 10 Jan 2013 19:44:48 +0100

Hi Gisle,

On Thu, Jan 10, Gisle Vanem wrote:

> lib/Makefile.m32 has this:
> ifdef ARES

Yes that's a problem with makefiles which don't write a curl_config.h
file and expect to fully control build behavior even when a
config-platform.h provided file defines default settings, and both try
to define build time macros..

config-platform.h in this case (config-win32.h) should be defining
USE_ARES and verifying that USE_THREADS_WIN32 is not defined when
"WITH_ARES" or "ENABLE_ARES" is defined.

config-win32.h should verify that USE_ARES and USE_THREADS_WIN32 are
none defined when "WITH_SYNC_DNS" or "ENABLE_SYNC_DNS" is defined.

config-win32.h should define USE_THREADS_WIN32 and verify that
USE_ARES is not defined when "WITH_THREADS_WIN32" or
"ENABLE_THREADS_WIN32" is defined. (This should also be the default
behavior when none of "WITH_ARES" or "ENABLE_ARES", "WITH_SYNC_DNS"
or "ENABLE_SYNC_DNS" are defined).

In this way makefiles could define one of "WITH_ARES", "WITH_SYNC_DNS"
"ENABLE_THREADS_WIN32") and merrily expect intended behavior.

Notice that changing this in config-win32.h affects all makefiles
which can be used to build a win32/64 target. Your proposed change
would equally affect same number of makefiles.

Decoupling of "non-configure" make-time macro names from those used to
actually configure the build is something we should be aiming at. And
as this case shows it is even mandatory to allow full option usage.

I'm personally not going to make this changes happen any time soon,
nor I'm ready for another naming-quarrel. So if you or anyone else
wants to take on this, please do so.


List admin:
Received on 2013-01-10