CURLOPT: bump CURLPROXY_* enums to long, drop casts

This patch bumps the size of these macros from `int` to `long`, while
keeping their actual values the same. It may cause incompatibilities in
user code, requiring the bump of holder variables and/or adding casts:

- CURLPROXY_HTTP
- CURLPROXY_HTTP_1_0
- CURLPROXY_HTTPS
- CURLPROXY_HTTPS2
- CURLPROXY_SOCKS4
- CURLPROXY_SOCKS4A
- CURLPROXY_SOCKS5
- CURLPROXY_SOCKS5_HOSTNAME

Also:
- keep existing cast within the documentation to make sure it applies
  to older curl versions as well.

Closes #18054
This commit is contained in:
Viktor Szakats 2025-07-28 10:59:48 +02:00
parent d45b85d791
commit 1a12663d06
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
10 changed files with 28 additions and 25 deletions

View file

@ -78,7 +78,7 @@ static CURLcode test_lib1525(char *URL)
test_setopt(curl, CURLOPT_POST, 0L);
test_setopt(curl, CURLOPT_UPLOAD, 1L);
test_setopt(curl, CURLOPT_VERBOSE, 1L);
test_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_HEADER, 1L);
test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
test_setopt(curl, CURLOPT_READFUNCTION, t1525_read_cb);

View file

@ -82,7 +82,7 @@ static CURLcode test_lib1526(char *URL)
test_setopt(curl, CURLOPT_POST, 0L);
test_setopt(curl, CURLOPT_UPLOAD, 1L);
test_setopt(curl, CURLOPT_VERBOSE, 1L);
test_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_HEADER, 1L);
test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
test_setopt(curl, CURLOPT_READFUNCTION, t1526_read_cb);

View file

@ -79,7 +79,7 @@ static CURLcode test_lib1527(char *URL)
test_setopt(curl, CURLOPT_POST, 0L);
test_setopt(curl, CURLOPT_UPLOAD, 1L);
test_setopt(curl, CURLOPT_VERBOSE, 1L);
test_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_HEADER, 1L);
test_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
test_setopt(curl, CURLOPT_READFUNCTION, t1527_read_cb);

View file

@ -58,7 +58,7 @@ static CURLcode test_lib1528(char *URL)
test_setopt(curl, CURLOPT_PROXYHEADER, phl);
test_setopt(curl, CURLOPT_HEADEROPT, (long)CURLHEADER_SEPARATE);
test_setopt(curl, CURLOPT_VERBOSE, 1L);
test_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_HEADER, 1L);
res = curl_easy_perform(curl);

View file

@ -48,7 +48,7 @@ static CURLcode test_lib1529(char *URL)
test_setopt(curl, CURLOPT_URL, bURL);
test_setopt(curl, CURLOPT_PROXY, libtest_arg2);
test_setopt(curl, CURLOPT_VERBOSE, 1L);
test_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
test_setopt(curl, CURLOPT_HEADER, 1L);
res = curl_easy_perform(curl);

View file

@ -41,7 +41,7 @@ static CURLcode test_lib564(char *URL)
easy_setopt(curl, CURLOPT_URL, URL);
easy_setopt(curl, CURLOPT_VERBOSE, 1L);
easy_setopt(curl, CURLOPT_PROXY, libtest_arg2);
easy_setopt(curl, CURLOPT_PROXYTYPE, (long)CURLPROXY_SOCKS4);
easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
multi_init(m);