CURLOPT: bump CURLPROXY_* enums to long, drop casts#18054
CURLOPT: bump CURLPROXY_* enums to long, drop casts#18054vszakats wants to merge 4 commits intocurl:masterfrom
CURLPROXY_* enums to long, drop casts#18054Conversation
Testing 8.16.0 in rc3 in vcpkg sees a single port failing: cmake, regardless of platform, debug build. |
|
FTR the cmake port serves as a pure CI test. The version is 4.0.0. |
|
@dg0yt Thanks for the info. CMake was using the undocumented It was fixed a couple of days ago in CMake: This fixes the wrong type passed previously to |
|
Slightly off-topic comment here (for better of worse): The CMake source above has many other calls passing Ref: https://curl.se/mail/lib-2008-02/0267.html |
curl 8.16.0 bumped the enums to long, see: curl/curl#18054 This fixes the build with curl 8.16+ for the following failure: /builds/alpine/aports/community/kodi/src/xbmc-21.2-Omega/xbmc/filesystem/CurlFile.cpp:48:5: error: cannot initialize an array element of type 'curl_proxytype' with an rvalue of type 'long' 48 | CURLPROXY_HTTP, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A, | ^~~~~~~~~~~~~~ /usr/include/curl/curl.h:791:35: note: expanded from macro 'CURLPROXY_HTTP' 791 | #define CURLPROXY_HTTP 0L /* added in 7.10, new in 7.19.4 default is | ^~ ...
curl 8.16.0 bumped the enums to long, see curl/curl#18054 Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
curl 8.16.0 bumped the enums to long, see: curl/curl#18054 This fixes the build with curl 8.16+ for the following failure: /builds/alpine/aports/community/kodi/src/xbmc-21.2-Omega/xbmc/filesystem/CurlFile.cpp:48:5: error: cannot initialize an array element of type 'curl_proxytype' with an rvalue of type 'long' 48 | CURLPROXY_HTTP, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A, | ^~~~~~~~~~~~~~ /usr/include/curl/curl.h:791:35: note: expanded from macro 'CURLPROXY_HTTP' 791 | #define CURLPROXY_HTTP 0L /* added in 7.10, new in 7.19.4 default is | ^~ ...
|
Just bitten by this: #18611 |
curl 8.16.0 bumped the enums to long, see curl/curl#18054 Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> (cherry picked from commit 3ed6c8e) Signed-off-by: Thomas Perale <thomas.perale@mind.be>
curl 8.16.0 bumped the enums to long, see curl/curl#18054 Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> (cherry picked from commit 3ed6c8e) Signed-off-by: Thomas Perale <thomas.perale@mind.be>
curl 8.16.0 bumped the enums to long, see curl/curl#18054 Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Peter Korsgaard <peter@korsgaard.com> (cherry picked from commit 3ed6c8e) Signed-off-by: Thomas Perale <thomas.perale@mind.be>
|
Same error with VirtualBox: |
…th ftp/curl 8.16.0
kBuild: Compiling VBoxRT - /wrkdirs/usr/ports/emulators/virtualbox-ose-72/work/VirtualBox-7.2.0/src/VBox/Runtime/generic/http-curl.cpp
/wrkdirs/usr/ports/emulators/virtualbox-ose-72/work/VirtualBox-7.2.0/src/VBox/Runtime/generic/http-curl.cpp:702:27: error: assigning to 'curl_proxytype' from incompatible type 'long'
702 | pThis->enmProxyType = CURLPROXY_HTTP;
| ^~~~~~~~~~~~~~
/usr/local/include/curl/curl.h:791:35: note: expanded from macro 'CURLPROXY_HTTP'
791 | #define CURLPROXY_HTTP 0L /* added in 7.10, new in 7.19.4 default is
| ^~
Upstream bug report:
curl/curl#18054 (comment)
PR: 289924
curl 8.16.0 bumped the enums to long, see: curl/curl#18054 This fixes the build with curl 8.16+ for the following failure: /builds/alpine/aports/community/kodi/src/xbmc-21.2-Omega/xbmc/filesystem/CurlFile.cpp:48:5: error: cannot initialize an array element of type 'curl_proxytype' with an rvalue of type 'long' 48 | CURLPROXY_HTTP, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A, | ^~~~~~~~~~~~~~ /usr/include/curl/curl.h:791:35: note: expanded from macro 'CURLPROXY_HTTP' 791 | #define CURLPROXY_HTTP 0L /* added in 7.10, new in 7.19.4 default is | ^~ ...
This patch bumps the size of these macros from
inttolong, whilekeeping their actual values the same. It may cause incompatibilities in
user code, requiring the bump of holder variables and/or adding casts:
Also:
to older curl versions as well.