cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [Patch] Disable multi API support

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 6 Oct 2008 09:47:25 -0700

On Mon, Oct 06, 2008 at 04:56:08PM +0200, Daniel Egger wrote:
> Please find attached the updated patch against the CVS version which
> (apart from the already known --disable-multi switch) also does the
> following:
>
> - Addition of CURL_VERSION_MULTI to check for support of the multi API
> - Output of "multi" as an additional feature for curl --version
> - Check in runtest.pl for the multi feature to skip tests where multi
> is needed

This patch is a different from all the other configure --disable options
in that it changes the libcurl ABI. That has several implications, the
largest of which is that it can't be used to make a generic library. It's
only applicable to application users who will be linking statically or
working in embedded devices, and those users must be fully aware of
the implications.

The nature of the patch also means that having a special CURL_VERSION_MULTI
check for the multi API is completely superfluous. Any application that
requires the multi interface and therefore may want to check that flag will
get a link error well before it can even be run. Any application that is
able to link to a multi-api-free-libcurl won't need the multi interface
and therefore couldn't care less about the CURL_VERSION_MULTI flag.

Given that, and the historic precedent shown with other special-case
and seldom-used configure options, I don't think it's worth bloating the
test harness with automatic checks for a multi-free libcurl.

> - ifndef guards for the test library helper functions to compile
> correctly

Something like this is going to be necessary (unless the ABI is preserved--
see below).

> - addition of multi keyword and/or multi feature to testcases that need
> 'em

These are good to have regardless.

There is a reference to CURL_DISABLE_MULTI in multi.h, which is forms part
of the libcurl API. Since this symbol is only valid while building curl,
it won't be valid for any other application that uses libcurl. It should
instead be added to curlbuild.h so it's available to all apps.

On second thought, a better approach to this whole thing may be to replace
all the multi functions with stubs that simply return an error code. That
preserves the ABI and sidesteps many of the problems addressed here.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-10-06