Web lists-archives.com

Re: [PATCH 4/4] http: #error on too-old curl




On Wed, Aug 9, 2017 at 5:02 AM, Jeff King <peff@xxxxxxxx> wrote:
> We already fail to build with versions of curl older than
> 7.19.4. But doing an explicit check with an #error has two
> benefits.
>
> One is that it makes it clear to users that the build
> failure is intentional, so they don't waste time trying to
> debug it.
>
> And two is that it documents our current "too old"
> assumption, so that we know whether we need use an #ifdef
> when using newer curl features in future patches.
>
> Signed-off-by: Jeff King <peff@xxxxxxxx>
> ---
>  http.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/http.h b/http.h
> index da4d8589d8..29acfe8c55 100644
> --- a/http.h
> +++ b/http.h
> @@ -10,6 +10,10 @@
>  #include "remote.h"
>  #include "url.h"
>
> +#if LIBCURL_VERSION_NUM < 0x071304

Oh, it's hex. 0x13 == 19. Makes sense.

Thanks,
Stefan