Subject: Re: [PATCH 1/2] curl: streamline conditional compilation

From: Junio C Hamano <[email-masked]>
Date: Wed, 16 Mar 2022 11:04:18 -0700

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

> The way it was being done before was intentional & discused on list.
>
> See my original
> https://lore.kernel.org/git/[email-masked]/
> which did it pretty much like that, and Junio's subsequent
> follow-up. I.e. this breadcrumb trail:
> https://lore.kernel.org/git/?q=CURL_SOCKOPT_OK
>
>> -#if LIBCURL_VERSION_NUM < 0x071505
>> -#define CURL_SOCKOPT_OK 0
>> +#if LIBCURL_VERSION_NUM >= 0x071505
>> +#define GIT_CURL_HAVE_CURL_SOCKOPT_OK 1
>>  #endif
>
> IOW we should drop this.

I think that depends on the worldview.

In a world in which [PATCH 2/2] is a good idea, i.e. "we have a
comprehensive catalog of available cURL features, but it expresses
its knowledge in one particular way, i.e. HAVE_X", the above,
together with the change at the only use site in http.c, are very
sensible changes.

Given that we do not want to have too many conditionally compiled
codepath, I certainly understand that the current approach to keep
an ad-hoc list of features we care about may be your preference.

I am not sure if that is viable longer term, though.  I still am not
decided.

Thanks.