On Sun, Aug 20, 2017 at 09:28:20AM -0700, Junio C Hamano wrote: > > Yes, I agree that these are an improvement regardless. If we follow > > through on the cut-off to 7.19.4, then the CURLPROTO ones all go away. > > But I don't mind rebasing any cut-off proposal on top of this work. > > Yeah I came to a similar conclusion and was about asking if you feel > the same way that your series should be made on top of Tom's fixes. > > The aspect of that series I do like the most is to base our > decisions on features, not versions, and I also wonder if we can do > similar in your "abandon too old ones" series, too. Yeah, I don't mind moving to feature flags where we can (though some features do not have a useful flag; e.g., the only way to know whether we must be strdup curl_easy_setopt() arguments is by checking the curl version). One annoying thing about "feature" flags instead of version flags is that it takes a lot of legwork to figure out how old those features are (whereas with the versions I was able to look that up in the curl history pretty easily). Since people adding the feature flag generally do that legwork, it's probably worth having a comment for each mentioning the general vintage (or maybe the commit message is an OK place for that). I actually wonder if it is worth defining our own readable flags in a big table at the beginning of the file, like: /* * introduced in curl 7.19.4, but backported by some distros like * RHEL. We can identify it by the presence of the PROTO flags. */ #ifdef CURLPROTO_HTTP #define CURL_SUPPORTS_PROTOCOL_REDIRECTION #endif That keeps the logic in one place (where it can be changed if we later find that the define we picked for our feature isn't quite accurate). And then the #ifdefs sprinkled through the code itself become self-documenting. -Peff