Re: [PATCH 4/5] http: centralize the accounting of libcurl dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

>> +/**
>> + * CURLOPT_TCP_KEEPALIVE was added in 7.25.0, released in March 2012.
>> + */
>> +#ifdef CURLOPT_TCP_KEEPALIVE
>> +#define GITCURL_HAVE_CURLOPT_TCP_KEEPALIVE 1
>> +#endif
>>
>> [...]
>>
>> -#if LIBCURL_VERSION_NUM >= 0x071900
>> +#ifdef GITCURL_HAVE_CURLOPT_TCP_KEEPALIVE
>>  static void set_curl_keepalive(CURL *c)
>>  {
>>  	curl_easy_setopt(c, CURLOPT_TCP_KEEPALIVE, 1);
>
> Part of me is a little sad at the duplication this creates. We could
> just be checking
>
>   #ifdef CURLOPT_TCP_KEEPALIVE
>
> in the second hunk, without the first one at all.

I recall having exactly the same reaction when the above pattern
first was floated.  

I still do not see how the GITCURL_* duplication is worth it.  What
do we want to gain from having a "central registry"?

If it is to see which ones we care about, would it be sufficient to
use the hits from "git grep -e CURL" with postprocessing?

Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux