7575 defined(ANDROID ) || defined(__ANDROID__ ) || defined(__OpenBSD__ ) || \
7676 defined(__CYGWIN__ ) || defined(AMIGA ) || defined(__NuttX__ ) || \
7777 (defined(__FreeBSD_version ) && (__FreeBSD_version < 800000 )) || \
78- (defined(__MidnightBSD_version ) && (__MidnightBSD_version < 100000 ))
78+ (defined(__MidnightBSD_version ) && (__MidnightBSD_version < 100000 )) || \
79+ defined(__sun__ )
7980#include <sys/select.h>
8081#endif
8182
@@ -577,7 +578,7 @@ typedef enum {
577578 CURLE_TFTP_UNKNOWNID , /* 72 - Unknown transfer ID */
578579 CURLE_REMOTE_FILE_EXISTS , /* 73 - File already exists */
579580 CURLE_TFTP_NOSUCHUSER , /* 74 - No such user */
580- CURLE_CONV_FAILED , /* 75 - conversion failed */
581+ CURLE_OBSOLETE75 , /* 75 - NOT IN USE since 7.82.0 */
581582 CURLE_OBSOLETE76 , /* 76 - NOT IN USE since 7.82.0 */
582583 CURLE_SSL_CACERT_BADFILE , /* 77 - could not load CACERT file, missing
583584 or wrong format */
@@ -680,6 +681,7 @@ typedef enum {
680681#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME
681682#define CURLE_LDAP_INVALID_URL CURLE_OBSOLETE62
682683#define CURLE_CONV_REQD CURLE_OBSOLETE76
684+ #define CURLE_CONV_FAILED CURLE_OBSOLETE75
683685
684686/* This was the error code 50 in 7.7.3 and a few earlier versions, this
685687 is no longer used by libcurl but is instead #defined here only to not
@@ -1009,7 +1011,8 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
10091011#define CURLHSTS_ENABLE (long)(1<<0)
10101012#define CURLHSTS_READONLYFILE (long)(1<<1)
10111013
1012- /* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */
1014+ /* The CURLPROTO_ defines below are for the **deprecated** CURLOPT_*PROTOCOLS
1015+ options. Do not use. */
10131016#define CURLPROTO_HTTP (1<<0)
10141017#define CURLPROTO_HTTPS (1<<1)
10151018#define CURLPROTO_FTP (1<<2)
@@ -1475,12 +1478,11 @@ typedef enum {
14751478 Note that setting multiple bits may cause extra network round-trips. */
14761479 CURLOPT (CURLOPT_PROXYAUTH , CURLOPTTYPE_VALUES , 111 ),
14771480
1478- /* FTP option that changes the timeout, in seconds, associated with
1479- getting a response. This is different from transfer timeout time and
1480- essentially places a demand on the FTP server to acknowledge commands
1481- in a timely manner. */
1482- CURLOPT (CURLOPT_FTP_RESPONSE_TIMEOUT , CURLOPTTYPE_LONG , 112 ),
1483- #define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT
1481+ /* Option that changes the timeout, in seconds, associated with getting a
1482+ response. This is different from transfer timeout time and essentially
1483+ places a demand on the server to acknowledge commands in a timely
1484+ manner. For FTP, SMTP, IMAP and POP3. */
1485+ CURLOPT (CURLOPT_SERVER_RESPONSE_TIMEOUT , CURLOPTTYPE_LONG , 112 ),
14841486
14851487 /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
14861488 tell libcurl to use those IP versions only. This only has effect on
@@ -2143,6 +2145,15 @@ typedef enum {
21432145 /* set the SSH host key callback custom pointer */
21442146 CURLOPT (CURLOPT_SSH_HOSTKEYDATA , CURLOPTTYPE_CBPOINT , 317 ),
21452147
2148+ /* specify which protocols that are allowed to be used for the transfer,
2149+ which thus helps the app which takes URLs from users or other external
2150+ inputs and want to restrict what protocol(s) to deal with. Defaults to
2151+ all built-in protocols. */
2152+ CURLOPT (CURLOPT_PROTOCOLS_STR , CURLOPTTYPE_STRINGPOINT , 318 ),
2153+
2154+ /* specify which protocols that libcurl is allowed to follow directs to */
2155+ CURLOPT (CURLOPT_REDIR_PROTOCOLS_STR , CURLOPTTYPE_STRINGPOINT , 319 ),
2156+
21462157 CURLOPT_LASTENTRY /* the last unused */
21472158} CURLoption ;
21482159
@@ -2168,6 +2179,9 @@ typedef enum {
21682179#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
21692180#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
21702181
2182+ /* */
2183+ #define CURLOPT_FTP_RESPONSE_TIMEOUT CURLOPT_SERVER_RESPONSE_TIMEOUT
2184+
21712185#else
21722186/* This is set if CURL_NO_OLDIES is defined at compile-time */
21732187#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
@@ -2182,7 +2196,7 @@ typedef enum {
21822196#define CURL_IPRESOLVE_V4 1 /* uses only IPv4 addresses/connections */
21832197#define CURL_IPRESOLVE_V6 2 /* uses only IPv6 addresses/connections */
21842198
2185- /* three convenient "aliases" that follow the name scheme better */
2199+ /* Convenient "aliases" */
21862200#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
21872201
21882202 /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
0 commit comments