mirror of
https://github.com/curl/curl.git
synced 2026-08-24 16:33:33 +03:00
CURLOPT: bump CURLPROTO_* macros to long
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: - CURLPROTO_HTTP - CURLPROTO_HTTPS - CURLPROTO_FTP - CURLPROTO_FTPS - CURLPROTO_SCP - CURLPROTO_SFTP - CURLPROTO_TELNET - CURLPROTO_LDAP - CURLPROTO_LDAPS - CURLPROTO_DICT - CURLPROTO_FILE - CURLPROTO_TFTP - CURLPROTO_IMAP - CURLPROTO_IMAPS - CURLPROTO_POP3 - CURLPROTO_POP3S - CURLPROTO_SMTP - CURLPROTO_SMTPS - CURLPROTO_RTSP - CURLPROTO_RTMP - CURLPROTO_RTMPT - CURLPROTO_RTMPE - CURLPROTO_RTMPTE - CURLPROTO_RTMPS - CURLPROTO_RTMPTS - CURLPROTO_GOPHER - CURLPROTO_SMB - CURLPROTO_SMBS - CURLPROTO_MQTT - CURLPROTO_GOPHERS - CURLPROTO_ALL Also: - keep existing cast within the documentation to make sure it applies to older curl versions as well. Closes #18136
This commit is contained in:
parent
ebbb8e3da7
commit
b131db5410
4 changed files with 37 additions and 37 deletions
|
|
@ -348,10 +348,10 @@ static CURLcode doh_probe_run(struct Curl_easy *data,
|
|||
#endif
|
||||
#ifndef DEBUGBUILD
|
||||
/* enforce HTTPS if not debug */
|
||||
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, (long)CURLPROTO_HTTPS);
|
||||
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
|
||||
#else
|
||||
/* in debug mode, also allow http */
|
||||
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, (long)CURLPROTO_HTTP|CURLPROTO_HTTPS);
|
||||
ERROR_CHECK_SETOPT(CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
|
||||
#endif
|
||||
ERROR_CHECK_SETOPT(CURLOPT_TIMEOUT_MS, (long)timeout_ms);
|
||||
ERROR_CHECK_SETOPT(CURLOPT_SHARE, (CURLSH *)data->share);
|
||||
|
|
|
|||
|
|
@ -70,11 +70,11 @@ struct curl_trc_featt;
|
|||
* platforms that have a >= 64-bit type and then we use such a type for the
|
||||
* protocol fields in the protocol handler.
|
||||
*/
|
||||
#define CURLPROTO_WS (1<<30)
|
||||
#define CURLPROTO_WS (1L<<30)
|
||||
#define CURLPROTO_WSS ((curl_prot_t)1<<31)
|
||||
#else
|
||||
#define CURLPROTO_WS 0
|
||||
#define CURLPROTO_WSS 0
|
||||
#define CURLPROTO_WS 0L
|
||||
#define CURLPROTO_WSS 0L
|
||||
#endif
|
||||
|
||||
/* the default protocols accepting a redirect to */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue