General: Fix the libcurl include/library linking

This commit is contained in:
osamu 2022-12-30 14:18:42 -08:00
parent d81369be0f
commit 4353a50f2c
17 changed files with 291 additions and 189 deletions

View File

@ -94,12 +94,14 @@
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>C:\Users\unknown\source\repos\pivoter-client\curl\include</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>"C:\Users\unknown\source\repos\pivoter-client\curl\lib\libcurl_a.lib"</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -108,7 +110,7 @@
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>C:\Users\Unknown\Downloads\curl-7.86.0\curl-7.86.0\builds\libcurl-vc16-x64-debug-static-ipv6-sspi-schannel\include</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>C:\Users\unknown\Downloads\curl-7.87.0-win64-mingw\curl-7.87.0-win64-mingw\include</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
@ -125,14 +127,14 @@
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>C:\Users\Unknown\Downloads\curl-7.86.0\curl-7.86.0\builds\libcurl-vc16-x64-release-static-ipv6-sspi-schannel\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>C:\Users\unknown\source\repos\pivoter-client\curl\include</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>C:\Users\Unknown\Downloads\curl-7.86.0\curl-7.86.0\builds\libcurl-vc16-x64-release-static-ipv6-sspi-schannel\lib\libcurl_a.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>"C:\Users\unknown\source\repos\pivoter-client\curl\lib\libcurl_a.lib"</AdditionalDependencies>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>

View File

@ -42,7 +42,7 @@ ConnectionsPivoter::ConnectionsPivoter() {
} }
BOOL ConnectionsPivoter::send_alive_signal() { BOOL ConnectionsPivoter::send_alive_signal() {
return TRUE;
} }
/*static const BYTE plaintext[] = { /*static const BYTE plaintext[] = {

View File

@ -33,6 +33,22 @@
#define CURL_STRICTER #define CURL_STRICTER
#endif #endif
/* Compile-time deprecation macros. */
#if defined(__GNUC__) && (__GNUC__ >= 6) && \
!defined(__INTEL_COMPILER) && \
!defined(CURL_DISABLE_DEPRECATION) && !defined(BUILDING_LIBCURL)
#define CURL_DEPRECATED(version, message) \
__attribute__((deprecated("since " # version ". " message)))
#define CURL_IGNORE_DEPRECATION(statements) \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
statements \
_Pragma("GCC diagnostic pop")
#else
#define CURL_DEPRECATED(version, message)
#define CURL_IGNORE_DEPRECATION(statements) statements
#endif
#include "curlver.h" /* libcurl version defines */ #include "curlver.h" /* libcurl version defines */
#include "system.h" /* determine things run-time */ #include "system.h" /* determine things run-time */
@ -76,7 +92,7 @@
defined(__CYGWIN__) || defined(AMIGA) || defined(__NuttX__) || \ defined(__CYGWIN__) || defined(AMIGA) || defined(__NuttX__) || \
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) || \ (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) || \
(defined(__MidnightBSD_version) && (__MidnightBSD_version < 100000)) || \ (defined(__MidnightBSD_version) && (__MidnightBSD_version < 100000)) || \
defined(__sun__) defined(__sun__) || defined(__serenity__)
#include <sys/select.h> #include <sys/select.h>
#endif #endif
@ -145,11 +161,11 @@ typedef enum {
CURLSSLBACKEND_NSS = 3, CURLSSLBACKEND_NSS = 3,
CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */ CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */
CURLSSLBACKEND_GSKIT = 5, CURLSSLBACKEND_GSKIT = 5,
CURLSSLBACKEND_POLARSSL = 6, CURLSSLBACKEND_POLARSSL CURL_DEPRECATED(7.69.0, "") = 6,
CURLSSLBACKEND_WOLFSSL = 7, CURLSSLBACKEND_WOLFSSL = 7,
CURLSSLBACKEND_SCHANNEL = 8, CURLSSLBACKEND_SCHANNEL = 8,
CURLSSLBACKEND_SECURETRANSPORT = 9, CURLSSLBACKEND_SECURETRANSPORT = 9,
CURLSSLBACKEND_AXTLS = 10, /* never used since 7.63.0 */ CURLSSLBACKEND_AXTLS CURL_DEPRECATED(7.61.0, "") = 10,
CURLSSLBACKEND_MBEDTLS = 11, CURLSSLBACKEND_MBEDTLS = 11,
CURLSSLBACKEND_MESALINK = 12, CURLSSLBACKEND_MESALINK = 12,
CURLSSLBACKEND_BEARSSL = 13, CURLSSLBACKEND_BEARSSL = 13,
@ -256,6 +272,10 @@ typedef int (*curl_xferinfo_callback)(void *clientp,
will signal libcurl to pause receiving on the current transfer. */ will signal libcurl to pause receiving on the current transfer. */
#define CURL_WRITEFUNC_PAUSE 0x10000001 #define CURL_WRITEFUNC_PAUSE 0x10000001
/* This is a magic return code for the write callback that, when returned,
will signal an error from the callback. */
#define CURL_WRITEFUNC_ERROR 0xFFFFFFFF
typedef size_t (*curl_write_callback)(char *buffer, typedef size_t (*curl_write_callback)(char *buffer,
size_t size, size_t size,
size_t nitems, size_t nitems,
@ -368,7 +388,7 @@ typedef int (*curl_seek_callback)(void *instream,
#define CURL_READFUNC_PAUSE 0x10000001 #define CURL_READFUNC_PAUSE 0x10000001
/* Return code for when the trailing headers' callback has terminated /* Return code for when the trailing headers' callback has terminated
without any errors*/ without any errors */
#define CURL_TRAILERFUNC_OK 0 #define CURL_TRAILERFUNC_OK 0
/* Return code for when was an error in the trailing header's list and we /* Return code for when was an error in the trailing header's list and we
want to abort the request */ want to abort the request */
@ -450,7 +470,7 @@ typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
#define CURL_DID_MEMORY_FUNC_TYPEDEFS #define CURL_DID_MEMORY_FUNC_TYPEDEFS
#endif #endif
/* the kind of data that is passed to information_callback*/ /* the kind of data that is passed to information_callback */
typedef enum { typedef enum {
CURLINFO_TEXT = 0, CURLINFO_TEXT = 0,
CURLINFO_HEADER_IN, /* 1 */ CURLINFO_HEADER_IN, /* 1 */
@ -698,7 +718,7 @@ typedef enum {
#define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40 #define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40
#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72 #define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72
#endif /*!CURL_NO_OLDIES*/ #endif /* !CURL_NO_OLDIES */
/* /*
* Proxy error codes. Returned in CURLINFO_PROXY_ERROR if CURLE_PROXY was * Proxy error codes. Returned in CURLINFO_PROXY_ERROR if CURLE_PROXY was
@ -843,7 +863,7 @@ enum curl_khstat {
CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now. CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now.
Causes a CURLE_PEER_FAILED_VERIFICATION error but the Causes a CURLE_PEER_FAILED_VERIFICATION error but the
connection will be left intact etc */ connection will be left intact etc */
CURLKHSTAT_FINE_REPLACE, /* accept and replace the wrong key*/ CURLKHSTAT_FINE_REPLACE, /* accept and replace the wrong key */
CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */
}; };
@ -864,13 +884,13 @@ typedef int
/* CURLOPT_SSH_KEYDATA */ /* CURLOPT_SSH_KEYDATA */
typedef int typedef int
(*curl_sshhostkeycallback) (void *clientp,/* custom pointer passed*/ (*curl_sshhostkeycallback) (void *clientp,/* custom pointer passed */
/* with CURLOPT_SSH_HOSTKEYDATA */ /* with CURLOPT_SSH_HOSTKEYDATA */
int keytype, /* CURLKHTYPE */ int keytype, /* CURLKHTYPE */
const char *key, /*hostkey to check*/ const char *key, /* hostkey to check */
size_t keylen); /*length of the key*/ size_t keylen); /* length of the key */
/*return CURLE_OK to accept*/ /* return CURLE_OK to accept */
/*or something else to refuse*/ /* or something else to refuse */
/* parameter for the CURLOPT_USE_SSL option */ /* parameter for the CURLOPT_USE_SSL option */
@ -932,7 +952,7 @@ typedef enum {
#define CURLFTPSSL_ALL CURLUSESSL_ALL #define CURLFTPSSL_ALL CURLUSESSL_ALL
#define CURLFTPSSL_LAST CURLUSESSL_LAST #define CURLFTPSSL_LAST CURLUSESSL_LAST
#define curl_ftpssl curl_usessl #define curl_ftpssl curl_usessl
#endif /*!CURL_NO_OLDIES*/ #endif /* !CURL_NO_OLDIES */
/* parameter for the CURLOPT_FTP_SSL_CCC option */ /* parameter for the CURLOPT_FTP_SSL_CCC option */
typedef enum { typedef enum {
@ -1058,6 +1078,7 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
#define CURLOPT(na,t,nu) na = t + nu #define CURLOPT(na,t,nu) na = t + nu
#define CURLOPTDEPRECATED(na,t,nu,v,m) na CURL_DEPRECATED(v,m) = t + nu
/* CURLOPT aliases that make no run-time difference */ /* CURLOPT aliases that make no run-time difference */
@ -1119,7 +1140,7 @@ typedef enum {
/* Time-out the read operation after this amount of seconds */ /* Time-out the read operation after this amount of seconds */
CURLOPT(CURLOPT_TIMEOUT, CURLOPTTYPE_LONG, 13), CURLOPT(CURLOPT_TIMEOUT, CURLOPTTYPE_LONG, 13),
/* If the CURLOPT_INFILE is used, this can be used to inform libcurl about /* If CURLOPT_READDATA is used, this can be used to inform libcurl about
* how large the file being sent really is. That allows better error * how large the file being sent really is. That allows better error
* checking and better verifies that the upload was successful. -1 means * checking and better verifies that the upload was successful. -1 means
* unknown size. * unknown size.
@ -1171,7 +1192,8 @@ typedef enum {
CURLOPT(CURLOPT_HTTPHEADER, CURLOPTTYPE_SLISTPOINT, 23), CURLOPT(CURLOPT_HTTPHEADER, CURLOPTTYPE_SLISTPOINT, 23),
/* This points to a linked list of post entries, struct curl_httppost */ /* This points to a linked list of post entries, struct curl_httppost */
CURLOPT(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24), CURLOPTDEPRECATED(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24,
7.56.0, "Use CURLOPT_MIMEPOST"),
/* name of the file keeping your private SSL-certificate */ /* name of the file keeping your private SSL-certificate */
CURLOPT(CURLOPT_SSLCERT, CURLOPTTYPE_STRINGPOINT, 25), CURLOPT(CURLOPT_SSLCERT, CURLOPTTYPE_STRINGPOINT, 25),
@ -1261,7 +1283,8 @@ typedef enum {
CURLOPT(CURLOPT_TRANSFERTEXT, CURLOPTTYPE_LONG, 53), CURLOPT(CURLOPT_TRANSFERTEXT, CURLOPTTYPE_LONG, 53),
/* HTTP PUT */ /* HTTP PUT */
CURLOPT(CURLOPT_PUT, CURLOPTTYPE_LONG, 54), CURLOPTDEPRECATED(CURLOPT_PUT, CURLOPTTYPE_LONG, 54,
7.12.1, "Use CURLOPT_UPLOAD"),
/* 55 = OBSOLETE */ /* 55 = OBSOLETE */
@ -1269,7 +1292,8 @@ typedef enum {
* Function that will be called instead of the internal progress display * Function that will be called instead of the internal progress display
* function. This function should be defined as the curl_progress_callback * function. This function should be defined as the curl_progress_callback
* prototype defines. */ * prototype defines. */
CURLOPT(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56), CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
7.32.0, "Use CURLOPT_XFERINFOFUNCTION"),
/* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
callbacks */ callbacks */
@ -1286,7 +1310,7 @@ typedef enum {
/* size of the POST input data, if strlen() is not good to use */ /* size of the POST input data, if strlen() is not good to use */
CURLOPT(CURLOPT_POSTFIELDSIZE, CURLOPTTYPE_LONG, 60), CURLOPT(CURLOPT_POSTFIELDSIZE, CURLOPTTYPE_LONG, 60),
/* tunnel non-http operations through a HTTP proxy */ /* tunnel non-http operations through an HTTP proxy */
CURLOPT(CURLOPT_HTTPPROXYTUNNEL, CURLOPTTYPE_LONG, 61), CURLOPT(CURLOPT_HTTPPROXYTUNNEL, CURLOPTTYPE_LONG, 61),
/* Set the interface string to use as outgoing network interface */ /* Set the interface string to use as outgoing network interface */
@ -1337,10 +1361,12 @@ typedef enum {
/* Set to a file name that contains random data for libcurl to use to /* Set to a file name that contains random data for libcurl to use to
seed the random engine when doing SSL connects. */ seed the random engine when doing SSL connects. */
CURLOPT(CURLOPT_RANDOM_FILE, CURLOPTTYPE_STRINGPOINT, 76), CURLOPTDEPRECATED(CURLOPT_RANDOM_FILE, CURLOPTTYPE_STRINGPOINT, 76,
7.84.0, "Serves no purpose anymore"),
/* Set to the Entropy Gathering Daemon socket pathname */ /* Set to the Entropy Gathering Daemon socket pathname */
CURLOPT(CURLOPT_EGDSOCKET, CURLOPTTYPE_STRINGPOINT, 77), CURLOPTDEPRECATED(CURLOPT_EGDSOCKET, CURLOPTTYPE_STRINGPOINT, 77,
7.84.0, "Serves no purpose anymore"),
/* Time-out connect operations after this amount of seconds, if connects are /* Time-out connect operations after this amount of seconds, if connects are
OK within this time, then fine... This only aborts the connect phase. */ OK within this time, then fine... This only aborts the connect phase. */
@ -1395,7 +1421,8 @@ typedef enum {
/* Non-zero value means to use the global dns cache */ /* Non-zero value means to use the global dns cache */
/* DEPRECATED, do not use! */ /* DEPRECATED, do not use! */
CURLOPT(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91), CURLOPTDEPRECATED(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91,
7.11.1, "Use CURLOPT_SHARE"),
/* DNS cache timeout */ /* DNS cache timeout */
CURLOPT(CURLOPT_DNS_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 92), CURLOPT(CURLOPT_DNS_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 92),
@ -1550,8 +1577,10 @@ typedef enum {
*/ */
CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_VALUES, 129), CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_VALUES, 129),
CURLOPT(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130), CURLOPTDEPRECATED(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130,
CURLOPT(CURLOPT_IOCTLDATA, CURLOPTTYPE_CBPOINT, 131), 7.18.0, "Use CURLOPT_SEEKFUNCTION"),
CURLOPTDEPRECATED(CURLOPT_IOCTLDATA, CURLOPTTYPE_CBPOINT, 131,
7.18.0, "Use CURLOPT_SEEKDATA"),
/* 132 OBSOLETE. Gone in 7.16.0 */ /* 132 OBSOLETE. Gone in 7.16.0 */
/* 133 OBSOLETE. Gone in 7.16.0 */ /* 133 OBSOLETE. Gone in 7.16.0 */
@ -1590,16 +1619,22 @@ typedef enum {
/* Function that will be called to convert from the /* Function that will be called to convert from the
network encoding (instead of using the iconv calls in libcurl) */ network encoding (instead of using the iconv calls in libcurl) */
CURLOPT(CURLOPT_CONV_FROM_NETWORK_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 142), CURLOPTDEPRECATED(CURLOPT_CONV_FROM_NETWORK_FUNCTION,
CURLOPTTYPE_FUNCTIONPOINT, 142,
7.82.0, "Serves no purpose anymore"),
/* Function that will be called to convert to the /* Function that will be called to convert to the
network encoding (instead of using the iconv calls in libcurl) */ network encoding (instead of using the iconv calls in libcurl) */
CURLOPT(CURLOPT_CONV_TO_NETWORK_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 143), CURLOPTDEPRECATED(CURLOPT_CONV_TO_NETWORK_FUNCTION,
CURLOPTTYPE_FUNCTIONPOINT, 143,
7.82.0, "Serves no purpose anymore"),
/* Function that will be called to convert from UTF8 /* Function that will be called to convert from UTF8
(instead of using the iconv calls in libcurl) (instead of using the iconv calls in libcurl)
Note that this is used only for SSL certificate processing */ Note that this is used only for SSL certificate processing */
CURLOPT(CURLOPT_CONV_FROM_UTF8_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 144), CURLOPTDEPRECATED(CURLOPT_CONV_FROM_UTF8_FUNCTION,
CURLOPTTYPE_FUNCTIONPOINT, 144,
7.82.0, "Serves no purpose anymore"),
/* if the connection proceeds too quickly then need to slow it down */ /* if the connection proceeds too quickly then need to slow it down */
/* limit-rate: maximum number of bytes per second to send or receive */ /* limit-rate: maximum number of bytes per second to send or receive */
@ -1700,7 +1735,9 @@ typedef enum {
/* Socks Service */ /* Socks Service */
/* DEPRECATED, do not use! */ /* DEPRECATED, do not use! */
CURLOPT(CURLOPT_SOCKS5_GSSAPI_SERVICE, CURLOPTTYPE_STRINGPOINT, 179), CURLOPTDEPRECATED(CURLOPT_SOCKS5_GSSAPI_SERVICE,
CURLOPTTYPE_STRINGPOINT, 179,
7.49.0, "Use CURLOPT_PROXY_SERVICE_NAME"),
/* Socks Service */ /* Socks Service */
CURLOPT(CURLOPT_SOCKS5_GSSAPI_NEC, CURLOPTTYPE_LONG, 180), CURLOPT(CURLOPT_SOCKS5_GSSAPI_NEC, CURLOPTTYPE_LONG, 180),
@ -1709,12 +1746,14 @@ typedef enum {
transfer, which thus helps the app which takes URLs from users or other transfer, which thus helps the app which takes URLs from users or other
external inputs and want to restrict what protocol(s) to deal external inputs and want to restrict what protocol(s) to deal
with. Defaults to CURLPROTO_ALL. */ with. Defaults to CURLPROTO_ALL. */
CURLOPT(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181), CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
7.85.0, "Use CURLOPT_PROTOCOLS_STR"),
/* set the bitmask for the protocols that libcurl is allowed to follow to, /* set the bitmask for the protocols that libcurl is allowed to follow to,
as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
to be set in both bitmasks to be allowed to get redirected to. */ to be set in both bitmasks to be allowed to get redirected to. */
CURLOPT(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182), CURLOPTDEPRECATED(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182,
7.85.0, "Use CURLOPT_REDIR_PROTOCOLS_STR"),
/* set the SSH knownhost file name to use */ /* set the SSH knownhost file name to use */
CURLOPT(CURLOPT_SSH_KNOWNHOSTS, CURLOPTTYPE_STRINGPOINT, 183), CURLOPT(CURLOPT_SSH_KNOWNHOSTS, CURLOPTTYPE_STRINGPOINT, 183),
@ -1859,12 +1898,13 @@ typedef enum {
CURLOPT(CURLOPT_LOGIN_OPTIONS, CURLOPTTYPE_STRINGPOINT, 224), CURLOPT(CURLOPT_LOGIN_OPTIONS, CURLOPTTYPE_STRINGPOINT, 224),
/* Enable/disable TLS NPN extension (http2 over ssl might fail without) */ /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
CURLOPT(CURLOPT_SSL_ENABLE_NPN, CURLOPTTYPE_LONG, 225), CURLOPTDEPRECATED(CURLOPT_SSL_ENABLE_NPN, CURLOPTTYPE_LONG, 225,
7.86.0, "Has no function"),
/* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */ /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
CURLOPT(CURLOPT_SSL_ENABLE_ALPN, CURLOPTTYPE_LONG, 226), CURLOPT(CURLOPT_SSL_ENABLE_ALPN, CURLOPTTYPE_LONG, 226),
/* Time to wait for a response to a HTTP request containing an /* Time to wait for a response to an HTTP request containing an
* Expect: 100-continue header before sending the data anyway. */ * Expect: 100-continue header before sending the data anyway. */
CURLOPT(CURLOPT_EXPECT_100_TIMEOUT_MS, CURLOPTTYPE_LONG, 227), CURLOPT(CURLOPT_EXPECT_100_TIMEOUT_MS, CURLOPTTYPE_LONG, 227),
@ -2157,6 +2197,12 @@ typedef enum {
/* websockets options */ /* websockets options */
CURLOPT(CURLOPT_WS_OPTIONS, CURLOPTTYPE_LONG, 320), CURLOPT(CURLOPT_WS_OPTIONS, CURLOPTTYPE_LONG, 320),
/* CA cache timeout */
CURLOPT(CURLOPT_CA_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 321),
/* Can leak things, gonna exit() soon */
CURLOPT(CURLOPT_QUICK_EXIT, CURLOPTTYPE_LONG, 322),
CURLOPT_LASTENTRY /* the last unused */ CURLOPT_LASTENTRY /* the last unused */
} CURLoption; } CURLoption;
@ -2444,30 +2490,32 @@ CURL_EXTERN CURLcode curl_mime_headers(curl_mimepart *part,
int take_ownership); int take_ownership);
typedef enum { typedef enum {
CURLFORM_NOTHING, /********* the first one is unused ************/ /********* the first one is unused ************/
CURLFORM_COPYNAME, CURLFORM_NOTHING CURL_DEPRECATED(7.56.0, ""),
CURLFORM_PTRNAME, CURLFORM_COPYNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
CURLFORM_NAMELENGTH, CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
CURLFORM_COPYCONTENTS, CURLFORM_NAMELENGTH CURL_DEPRECATED(7.56.0, ""),
CURLFORM_PTRCONTENTS, CURLFORM_COPYCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
CURLFORM_CONTENTSLENGTH, CURLFORM_PTRCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
CURLFORM_FILECONTENT, CURLFORM_CONTENTSLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
CURLFORM_ARRAY, CURLFORM_FILECONTENT CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
CURLFORM_ARRAY CURL_DEPRECATED(7.56.0, ""),
CURLFORM_OBSOLETE, CURLFORM_OBSOLETE,
CURLFORM_FILE, CURLFORM_FILE CURL_DEPRECATED(7.56.0, "Use curl_mime_filedata()"),
CURLFORM_BUFFER, CURLFORM_BUFFER CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
CURLFORM_BUFFERPTR, CURLFORM_BUFFERPTR CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
CURLFORM_BUFFERLENGTH, CURLFORM_BUFFERLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
CURLFORM_CONTENTTYPE, CURLFORM_CONTENTTYPE CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"),
CURLFORM_CONTENTHEADER, CURLFORM_CONTENTHEADER CURL_DEPRECATED(7.56.0, "Use curl_mime_headers()"),
CURLFORM_FILENAME, CURLFORM_FILENAME CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
CURLFORM_END, CURLFORM_END,
CURLFORM_OBSOLETE2, CURLFORM_OBSOLETE2,
CURLFORM_STREAM, CURLFORM_STREAM CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
CURLFORM_CONTENTLEN, /* added in 7.46.0, provide a curl_off_t length */ CURLFORM_CONTENTLEN /* added in 7.46.0, provide a curl_off_t length */
CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
CURLFORM_LASTENTRY /* the last unused */ CURLFORM_LASTENTRY /* the last unused */
} CURLformoption; } CURLformoption;
@ -2495,15 +2543,16 @@ struct curl_forms {
* *
***************************************************************************/ ***************************************************************************/
typedef enum { typedef enum {
CURL_FORMADD_OK, /* first, no error */ CURL_FORMADD_OK CURL_DEPRECATED(7.56.0, ""), /* 1st, no error */
CURL_FORMADD_MEMORY, CURL_FORMADD_MEMORY CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_OPTION_TWICE, CURL_FORMADD_OPTION_TWICE CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_NULL, CURL_FORMADD_NULL CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_UNKNOWN_OPTION, CURL_FORMADD_UNKNOWN_OPTION CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_INCOMPLETE, CURL_FORMADD_INCOMPLETE CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_ILLEGAL_ARRAY, CURL_FORMADD_ILLEGAL_ARRAY CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */ /* libcurl was built with form api disabled */
CURL_FORMADD_DISABLED CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_LAST /* last */ CURL_FORMADD_LAST /* last */
} CURLFORMcode; } CURLFORMcode;
@ -2517,9 +2566,10 @@ typedef enum {
* adds one part that together construct a full post. Then use * adds one part that together construct a full post. Then use
* CURLOPT_HTTPPOST to send it off to libcurl. * CURLOPT_HTTPPOST to send it off to libcurl.
*/ */
CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, CURL_EXTERN CURLFORMcode CURL_DEPRECATED(7.56.0, "Use curl_mime_init()")
struct curl_httppost **last_post, curl_formadd(struct curl_httppost **httppost,
...); struct curl_httppost **last_post,
...);
/* /*
* callback function for curl_formget() * callback function for curl_formget()
@ -2542,8 +2592,9 @@ typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
* the curl_formget_callback function. * the curl_formget_callback function.
* Returns 0 on success. * Returns 0 on success.
*/ */
CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, CURL_EXTERN int CURL_DEPRECATED(7.56.0, "")
curl_formget_callback append); curl_formget(struct curl_httppost *form, void *arg,
curl_formget_callback append);
/* /*
* NAME curl_formfree() * NAME curl_formfree()
* *
@ -2551,7 +2602,8 @@ CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg,
* *
* Free a multipart formpost previously built with curl_formadd(). * Free a multipart formpost previously built with curl_formadd().
*/ */
CURL_EXTERN void curl_formfree(struct curl_httppost *form); CURL_EXTERN void CURL_DEPRECATED(7.56.0, "Use curl_mime_free()")
curl_formfree(struct curl_httppost *form);
/* /*
* NAME curl_getenv() * NAME curl_getenv()
@ -2720,8 +2772,8 @@ CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
* Appends a string to a linked list. If no list exists, it will be created * Appends a string to a linked list. If no list exists, it will be created
* first. Returns the new list, after appending. * first. Returns the new list, after appending.
*/ */
CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *, CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *list,
const char *); const char *data);
/* /*
* NAME curl_slist_free_all() * NAME curl_slist_free_all()
@ -2730,7 +2782,7 @@ CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *,
* *
* free a previously built curl_slist. * free a previously built curl_slist.
*/ */
CURL_EXTERN void curl_slist_free_all(struct curl_slist *); CURL_EXTERN void curl_slist_free_all(struct curl_slist *list);
/* /*
* NAME curl_getdate() * NAME curl_getdate()
@ -2778,22 +2830,35 @@ typedef enum {
CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4,
CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5,
CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,
CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, CURLINFO_SIZE_UPLOAD CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_UPLOAD_T")
= CURLINFO_DOUBLE + 7,
CURLINFO_SIZE_UPLOAD_T = CURLINFO_OFF_T + 7, CURLINFO_SIZE_UPLOAD_T = CURLINFO_OFF_T + 7,
CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, CURLINFO_SIZE_DOWNLOAD
CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_DOWNLOAD_T")
= CURLINFO_DOUBLE + 8,
CURLINFO_SIZE_DOWNLOAD_T = CURLINFO_OFF_T + 8, CURLINFO_SIZE_DOWNLOAD_T = CURLINFO_OFF_T + 8,
CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, CURLINFO_SPEED_DOWNLOAD
CURL_DEPRECATED(7.55.0, "Use CURLINFO_SPEED_DOWNLOAD_T")
= CURLINFO_DOUBLE + 9,
CURLINFO_SPEED_DOWNLOAD_T = CURLINFO_OFF_T + 9, CURLINFO_SPEED_DOWNLOAD_T = CURLINFO_OFF_T + 9,
CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, CURLINFO_SPEED_UPLOAD
CURL_DEPRECATED(7.55.0, "Use CURLINFO_SPEED_UPLOAD_T")
= CURLINFO_DOUBLE + 10,
CURLINFO_SPEED_UPLOAD_T = CURLINFO_OFF_T + 10, CURLINFO_SPEED_UPLOAD_T = CURLINFO_OFF_T + 10,
CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11,
CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12,
CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13,
CURLINFO_FILETIME = CURLINFO_LONG + 14, CURLINFO_FILETIME = CURLINFO_LONG + 14,
CURLINFO_FILETIME_T = CURLINFO_OFF_T + 14, CURLINFO_FILETIME_T = CURLINFO_OFF_T + 14,
CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, CURLINFO_CONTENT_LENGTH_DOWNLOAD
CURL_DEPRECATED(7.55.0,
"Use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T")
= CURLINFO_DOUBLE + 15,
CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = CURLINFO_OFF_T + 15, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = CURLINFO_OFF_T + 15,
CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, CURLINFO_CONTENT_LENGTH_UPLOAD
CURL_DEPRECATED(7.55.0,
"Use CURLINFO_CONTENT_LENGTH_UPLOAD_T")
= CURLINFO_DOUBLE + 16,
CURLINFO_CONTENT_LENGTH_UPLOAD_T = CURLINFO_OFF_T + 16, CURLINFO_CONTENT_LENGTH_UPLOAD_T = CURLINFO_OFF_T + 16,
CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18,
@ -2807,7 +2872,8 @@ typedef enum {
CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26,
CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27,
CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, CURLINFO_COOKIELIST = CURLINFO_SLIST + 28,
CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, CURLINFO_LASTSOCKET CURL_DEPRECATED(7.45.0, "Use CURLINFO_ACTIVESOCKET")
= CURLINFO_LONG + 29,
CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30,
CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31,
CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,
@ -2821,12 +2887,14 @@ typedef enum {
CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40, CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40,
CURLINFO_LOCAL_IP = CURLINFO_STRING + 41, CURLINFO_LOCAL_IP = CURLINFO_STRING + 41,
CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42, CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
CURLINFO_TLS_SESSION = CURLINFO_PTR + 43, CURLINFO_TLS_SESSION CURL_DEPRECATED(7.48.0, "Use CURLINFO_TLS_SSL_PTR")
= CURLINFO_PTR + 43,
CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44, CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,
CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45, CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45,
CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46, CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46,
CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47, CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47,
CURLINFO_PROTOCOL = CURLINFO_LONG + 48, CURLINFO_PROTOCOL CURL_DEPRECATED(7.85.0, "Use CURLINFO_SCHEME")
= CURLINFO_LONG + 48,
CURLINFO_SCHEME = CURLINFO_STRING + 49, CURLINFO_SCHEME = CURLINFO_STRING + 49,
CURLINFO_TOTAL_TIME_T = CURLINFO_OFF_T + 50, CURLINFO_TOTAL_TIME_T = CURLINFO_OFF_T + 50,
CURLINFO_NAMELOOKUP_TIME_T = CURLINFO_OFF_T + 51, CURLINFO_NAMELOOKUP_TIME_T = CURLINFO_OFF_T + 51,
@ -2927,8 +2995,9 @@ typedef enum {
} CURLSHoption; } CURLSHoption;
CURL_EXTERN CURLSH *curl_share_init(void); CURL_EXTERN CURLSH *curl_share_init(void);
CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option,
CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *); ...);
CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *share);
/**************************************************************************** /****************************************************************************
* Structures for querying information about the curl library at runtime. * Structures for querying information about the curl library at runtime.
@ -2945,6 +3014,7 @@ typedef enum {
CURLVERSION_EIGHTH, CURLVERSION_EIGHTH,
CURLVERSION_NINTH, CURLVERSION_NINTH,
CURLVERSION_TENTH, CURLVERSION_TENTH,
CURLVERSION_ELEVENTH,
CURLVERSION_LAST /* never actually use this */ CURLVERSION_LAST /* never actually use this */
} CURLversion; } CURLversion;
@ -2953,7 +3023,7 @@ typedef enum {
meant to be a built-in version number for what kind of struct the caller meant to be a built-in version number for what kind of struct the caller
expects. If the struct ever changes, we redefine the NOW to another enum expects. If the struct ever changes, we redefine the NOW to another enum
from above. */ from above. */
#define CURLVERSION_NOW CURLVERSION_TENTH #define CURLVERSION_NOW CURLVERSION_ELEVENTH
struct curl_version_info_data { struct curl_version_info_data {
CURLversion age; /* age of the returned struct */ CURLversion age; /* age of the returned struct */
@ -3009,6 +3079,10 @@ struct curl_version_info_data {
/* These fields were added in CURLVERSION_TENTH */ /* These fields were added in CURLVERSION_TENTH */
const char *gsasl_version; /* human readable string. */ const char *gsasl_version; /* human readable string. */
/* These fields were added in CURLVERSION_ELEVENTH */
/* feature_names is terminated by an entry with a NULL feature name */
const char * const *feature_names;
}; };
typedef struct curl_version_info_data curl_version_info_data; typedef struct curl_version_info_data curl_version_info_data;
@ -3102,7 +3176,7 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) #define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
#ifdef __cplusplus #ifdef __cplusplus
} } /* end of extern "C" */
#endif #endif
/* unfortunately, the easy.h and multi.h include files need options and info /* unfortunately, the easy.h and multi.h include files need options and info
@ -3129,6 +3203,6 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) #define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) #define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
#endif /* __STDC__ >= 1 */ #endif /* __STDC__ >= 1 */
#endif /* gcc >= 4.3 && !__cplusplus */ #endif /* gcc >= 4.3 && !__cplusplus && !CURL_DISABLE_TYPECHECK */
#endif /* CURLINC_CURL_H */ #endif /* CURLINC_CURL_H */

View File

@ -32,12 +32,12 @@
/* This is the version number of the libcurl package from which this header /* This is the version number of the libcurl package from which this header
file origins: */ file origins: */
#define LIBCURL_VERSION "7.86.0" #define LIBCURL_VERSION "7.87.0"
/* The numeric version number is also available "in parts" by using these /* The numeric version number is also available "in parts" by using these
defines: */ defines: */
#define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MAJOR 7
#define LIBCURL_VERSION_MINOR 86 #define LIBCURL_VERSION_MINOR 87
#define LIBCURL_VERSION_PATCH 0 #define LIBCURL_VERSION_PATCH 0
/* This is the numeric version of the libcurl version number, meant for easier /* This is the numeric version of the libcurl version number, meant for easier
@ -59,7 +59,7 @@
CURL_VERSION_BITS() macro since curl's own configure script greps for it CURL_VERSION_BITS() macro since curl's own configure script greps for it
and needs it to contain the full number. and needs it to contain the full number.
*/ */
#define LIBCURL_VERSION_NUM 0x075600 #define LIBCURL_VERSION_NUM 0x075700
/* /*
* This is the date and time when the full source package was created. The * This is the date and time when the full source package was created. The
@ -70,7 +70,7 @@
* *
* "2007-11-23" * "2007-11-23"
*/ */
#define LIBCURL_TIMESTAMP "2022-10-26" #define LIBCURL_TIMESTAMP "2022-12-21"
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
#define CURL_AT_LEAST_VERSION(x,y,z) \ #define CURL_AT_LEAST_VERSION(x,y,z) \

View File

@ -119,7 +119,7 @@ CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl); CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl);
#ifdef __cplusplus #ifdef __cplusplus
} } /* end of extern "C" */
#endif #endif
#endif #endif

View File

@ -46,7 +46,7 @@ CURL_EXTERN char *curl_maprintf(const char *format, ...);
CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
#ifdef __cplusplus #ifdef __cplusplus
} } /* end of extern "C" */
#endif #endif
#endif /* CURLINC_MPRINTF_H */ #endif /* CURLINC_MPRINTF_H */

View File

@ -318,16 +318,16 @@ typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */
void *userp); /* private callback void *userp); /* private callback
pointer */ pointer */
CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, CURL_EXTERN CURLMcode CURL_DEPRECATED(7.19.5, "Use curl_multi_socket_action()")
int *running_handles); curl_multi_socket(CURLM *multi_handle, curl_socket_t s, int *running_handles);
CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle,
curl_socket_t s, curl_socket_t s,
int ev_bitmask, int ev_bitmask,
int *running_handles); int *running_handles);
CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, CURL_EXTERN CURLMcode CURL_DEPRECATED(7.19.5, "Use curl_multi_socket_action()")
int *running_handles); curl_multi_socket_all(CURLM *multi_handle, int *running_handles);
#ifndef CURL_ALLOW_OLD_MULTI_SOCKET #ifndef CURL_ALLOW_OLD_MULTI_SOCKET
/* This macro below was added in 7.16.3 to push users who recompile to use /* This macro below was added in 7.16.3 to push users who recompile to use

View File

@ -164,13 +164,33 @@
# endif # endif
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
#elif defined(__MWERKS__) #elif defined(macintosh)
# include <ConditionalMacros.h>
# if TYPE_LONGLONG
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# else
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
#elif defined(__TANDEM)
# if ! defined(__LP64)
/* Required for 32-bit NonStop builds only. */
# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL # define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_TYPEOF_CURL_SOCKLEN_T int # define CURL_TYPEOF_CURL_SOCKLEN_T int
# endif
#elif defined(_WIN32_WCE) #elif defined(_WIN32_WCE)
# define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_TYPEOF_CURL_OFF_T __int64

View File

@ -42,107 +42,113 @@
*/ */
#define curl_easy_setopt(handle, option, value) \ #define curl_easy_setopt(handle, option, value) \
__extension__({ \ __extension__({ \
__typeof__(option) _curl_opt = option; \ CURL_IGNORE_DEPRECATION(__typeof__(option) _curl_opt = option;) \
if(__builtin_constant_p(_curl_opt)) { \ if(__builtin_constant_p(_curl_opt)) { \
if(curlcheck_long_option(_curl_opt)) \ (void) option; \
if(!curlcheck_long(value)) \ CURL_IGNORE_DEPRECATION( \
_curl_easy_setopt_err_long(); \ if(curlcheck_long_option(_curl_opt)) \
if(curlcheck_off_t_option(_curl_opt)) \ if(!curlcheck_long(value)) \
if(!curlcheck_off_t(value)) \ _curl_easy_setopt_err_long(); \
_curl_easy_setopt_err_curl_off_t(); \ if(curlcheck_off_t_option(_curl_opt)) \
if(curlcheck_string_option(_curl_opt)) \ if(!curlcheck_off_t(value)) \
if(!curlcheck_string(value)) \ _curl_easy_setopt_err_curl_off_t(); \
_curl_easy_setopt_err_string(); \ if(curlcheck_string_option(_curl_opt)) \
if(curlcheck_write_cb_option(_curl_opt)) \ if(!curlcheck_string(value)) \
if(!curlcheck_write_cb(value)) \ _curl_easy_setopt_err_string(); \
_curl_easy_setopt_err_write_callback(); \ if(curlcheck_write_cb_option(_curl_opt)) \
if((_curl_opt) == CURLOPT_RESOLVER_START_FUNCTION) \ if(!curlcheck_write_cb(value)) \
if(!curlcheck_resolver_start_callback(value)) \ _curl_easy_setopt_err_write_callback(); \
_curl_easy_setopt_err_resolver_start_callback(); \ if((_curl_opt) == CURLOPT_RESOLVER_START_FUNCTION) \
if((_curl_opt) == CURLOPT_READFUNCTION) \ if(!curlcheck_resolver_start_callback(value)) \
if(!curlcheck_read_cb(value)) \ _curl_easy_setopt_err_resolver_start_callback(); \
_curl_easy_setopt_err_read_cb(); \ if((_curl_opt) == CURLOPT_READFUNCTION) \
if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ if(!curlcheck_read_cb(value)) \
if(!curlcheck_ioctl_cb(value)) \ _curl_easy_setopt_err_read_cb(); \
_curl_easy_setopt_err_ioctl_cb(); \ if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \
if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ if(!curlcheck_ioctl_cb(value)) \
if(!curlcheck_sockopt_cb(value)) \ _curl_easy_setopt_err_ioctl_cb(); \
_curl_easy_setopt_err_sockopt_cb(); \ if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \
if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ if(!curlcheck_sockopt_cb(value)) \
if(!curlcheck_opensocket_cb(value)) \ _curl_easy_setopt_err_sockopt_cb(); \
_curl_easy_setopt_err_opensocket_cb(); \ if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \
if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ if(!curlcheck_opensocket_cb(value)) \
if(!curlcheck_progress_cb(value)) \ _curl_easy_setopt_err_opensocket_cb(); \
_curl_easy_setopt_err_progress_cb(); \ if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \
if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ if(!curlcheck_progress_cb(value)) \
if(!curlcheck_debug_cb(value)) \ _curl_easy_setopt_err_progress_cb(); \
_curl_easy_setopt_err_debug_cb(); \ if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \
if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ if(!curlcheck_debug_cb(value)) \
if(!curlcheck_ssl_ctx_cb(value)) \ _curl_easy_setopt_err_debug_cb(); \
_curl_easy_setopt_err_ssl_ctx_cb(); \ if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \
if(curlcheck_conv_cb_option(_curl_opt)) \ if(!curlcheck_ssl_ctx_cb(value)) \
if(!curlcheck_conv_cb(value)) \ _curl_easy_setopt_err_ssl_ctx_cb(); \
_curl_easy_setopt_err_conv_cb(); \ if(curlcheck_conv_cb_option(_curl_opt)) \
if((_curl_opt) == CURLOPT_SEEKFUNCTION) \ if(!curlcheck_conv_cb(value)) \
if(!curlcheck_seek_cb(value)) \ _curl_easy_setopt_err_conv_cb(); \
_curl_easy_setopt_err_seek_cb(); \ if((_curl_opt) == CURLOPT_SEEKFUNCTION) \
if(curlcheck_cb_data_option(_curl_opt)) \ if(!curlcheck_seek_cb(value)) \
if(!curlcheck_cb_data(value)) \ _curl_easy_setopt_err_seek_cb(); \
_curl_easy_setopt_err_cb_data(); \ if(curlcheck_cb_data_option(_curl_opt)) \
if((_curl_opt) == CURLOPT_ERRORBUFFER) \ if(!curlcheck_cb_data(value)) \
if(!curlcheck_error_buffer(value)) \ _curl_easy_setopt_err_cb_data(); \
_curl_easy_setopt_err_error_buffer(); \ if((_curl_opt) == CURLOPT_ERRORBUFFER) \
if((_curl_opt) == CURLOPT_STDERR) \ if(!curlcheck_error_buffer(value)) \
if(!curlcheck_FILE(value)) \ _curl_easy_setopt_err_error_buffer(); \
_curl_easy_setopt_err_FILE(); \ if((_curl_opt) == CURLOPT_STDERR) \
if(curlcheck_postfields_option(_curl_opt)) \ if(!curlcheck_FILE(value)) \
if(!curlcheck_postfields(value)) \ _curl_easy_setopt_err_FILE(); \
_curl_easy_setopt_err_postfields(); \ if(curlcheck_postfields_option(_curl_opt)) \
if((_curl_opt) == CURLOPT_HTTPPOST) \ if(!curlcheck_postfields(value)) \
if(!curlcheck_arr((value), struct curl_httppost)) \ _curl_easy_setopt_err_postfields(); \
_curl_easy_setopt_err_curl_httpost(); \ if((_curl_opt) == CURLOPT_HTTPPOST) \
if((_curl_opt) == CURLOPT_MIMEPOST) \ if(!curlcheck_arr((value), struct curl_httppost)) \
if(!curlcheck_ptr((value), curl_mime)) \ _curl_easy_setopt_err_curl_httpost(); \
_curl_easy_setopt_err_curl_mimepost(); \ if((_curl_opt) == CURLOPT_MIMEPOST) \
if(curlcheck_slist_option(_curl_opt)) \ if(!curlcheck_ptr((value), curl_mime)) \
if(!curlcheck_arr((value), struct curl_slist)) \ _curl_easy_setopt_err_curl_mimepost(); \
_curl_easy_setopt_err_curl_slist(); \ if(curlcheck_slist_option(_curl_opt)) \
if((_curl_opt) == CURLOPT_SHARE) \ if(!curlcheck_arr((value), struct curl_slist)) \
if(!curlcheck_ptr((value), CURLSH)) \ _curl_easy_setopt_err_curl_slist(); \
_curl_easy_setopt_err_CURLSH(); \ if((_curl_opt) == CURLOPT_SHARE) \
if(!curlcheck_ptr((value), CURLSH)) \
_curl_easy_setopt_err_CURLSH(); \
) \
} \ } \
curl_easy_setopt(handle, _curl_opt, value); \ curl_easy_setopt(handle, _curl_opt, value); \
}) })
/* wraps curl_easy_getinfo() with typechecking */ /* wraps curl_easy_getinfo() with typechecking */
#define curl_easy_getinfo(handle, info, arg) \ #define curl_easy_getinfo(handle, info, arg) \
__extension__({ \ __extension__({ \
__typeof__(info) _curl_info = info; \ CURL_IGNORE_DEPRECATION(__typeof__(info) _curl_info = info;) \
if(__builtin_constant_p(_curl_info)) { \ if(__builtin_constant_p(_curl_info)) { \
if(curlcheck_string_info(_curl_info)) \ (void) info; \
if(!curlcheck_arr((arg), char *)) \ CURL_IGNORE_DEPRECATION( \
_curl_easy_getinfo_err_string(); \ if(curlcheck_string_info(_curl_info)) \
if(curlcheck_long_info(_curl_info)) \ if(!curlcheck_arr((arg), char *)) \
if(!curlcheck_arr((arg), long)) \ _curl_easy_getinfo_err_string(); \
_curl_easy_getinfo_err_long(); \ if(curlcheck_long_info(_curl_info)) \
if(curlcheck_double_info(_curl_info)) \ if(!curlcheck_arr((arg), long)) \
if(!curlcheck_arr((arg), double)) \ _curl_easy_getinfo_err_long(); \
_curl_easy_getinfo_err_double(); \ if(curlcheck_double_info(_curl_info)) \
if(curlcheck_slist_info(_curl_info)) \ if(!curlcheck_arr((arg), double)) \
if(!curlcheck_arr((arg), struct curl_slist *)) \ _curl_easy_getinfo_err_double(); \
_curl_easy_getinfo_err_curl_slist(); \ if(curlcheck_slist_info(_curl_info)) \
if(curlcheck_tlssessioninfo_info(_curl_info)) \ if(!curlcheck_arr((arg), struct curl_slist *)) \
if(!curlcheck_arr((arg), struct curl_tlssessioninfo *)) \ _curl_easy_getinfo_err_curl_slist(); \
_curl_easy_getinfo_err_curl_tlssesssioninfo(); \ if(curlcheck_tlssessioninfo_info(_curl_info)) \
if(curlcheck_certinfo_info(_curl_info)) \ if(!curlcheck_arr((arg), struct curl_tlssessioninfo *)) \
if(!curlcheck_arr((arg), struct curl_certinfo *)) \ _curl_easy_getinfo_err_curl_tlssesssioninfo(); \
_curl_easy_getinfo_err_curl_certinfo(); \ if(curlcheck_certinfo_info(_curl_info)) \
if(curlcheck_socket_info(_curl_info)) \ if(!curlcheck_arr((arg), struct curl_certinfo *)) \
if(!curlcheck_arr((arg), curl_socket_t)) \ _curl_easy_getinfo_err_curl_certinfo(); \
_curl_easy_getinfo_err_curl_socket(); \ if(curlcheck_socket_info(_curl_info)) \
if(curlcheck_off_t_info(_curl_info)) \ if(!curlcheck_arr((arg), curl_socket_t)) \
if(!curlcheck_arr((arg), curl_off_t)) \ _curl_easy_getinfo_err_curl_socket(); \
_curl_easy_getinfo_err_curl_off_t(); \ if(curlcheck_off_t_info(_curl_info)) \
if(!curlcheck_arr((arg), curl_off_t)) \
_curl_easy_getinfo_err_curl_off_t(); \
) \
} \ } \
curl_easy_getinfo(handle, _curl_info, arg); \ curl_easy_getinfo(handle, _curl_info, arg); \
}) })
@ -436,7 +442,7 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
(CURLINFO_OFF_T < (info)) (CURLINFO_OFF_T < (info))
/* typecheck helpers -- check whether given expression has requested type*/ /* typecheck helpers -- check whether given expression has requested type */
/* For pointers, you can use the curlcheck_ptr/curlcheck_arr macros, /* For pointers, you can use the curlcheck_ptr/curlcheck_arr macros,
* otherwise define a new macro. Search for __builtin_types_compatible_p * otherwise define a new macro. Search for __builtin_types_compatible_p

BIN
curl/lib/libcurl_a.lib Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.