]> git.ipfire.org Git - thirdparty/git.git/commit
curl: fix symbolic constant typechecks with curl_easy_setopt()
authorJeff King <peff@peff.net>
Wed, 4 Jun 2025 20:56:22 +0000 (16:56 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 4 Jun 2025 21:17:53 +0000 (14:17 -0700)
commit4558c8f84b2f8d3ba1483727bcb49935ae8ff595
tree0a5b106fac9cea0ad047863223a2c3dc8739f639
parent30325e23ba0d40567cc4ef78e4ba0c3776ef0c06
curl: fix symbolic constant typechecks with curl_easy_setopt()

As with the previous two commits, we should be passing long integers,
not regular ones, to curl_easy_setopt(), and compiling against curl 8.14
loudly complains if we don't.

This patch catches the remaining cases, which are ones where we pass
curl's own symbolic constants. We'll cast them to long manually in each
call.

It seems kind of weird to me that curl doesn't define these constants as
longs, since the point of them is to pass to curl_easy_setopt(). But in
the curl documentation and examples, they clearly show casting them as
part of the setopt calls. It may be that there is some reason not to
push the type into the macro, like backwards compatibility. I didn't
dig, as it doesn't really matter: we have to follow what existing curl
versions ask for anyway.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c