issue #1312:update libcurl for android and strip all libs

This commit is contained in:
minggo 2012-10-25 14:32:28 +08:00
parent 1829d57aa7
commit 84e48ed7e7
20 changed files with 260 additions and 150 deletions

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -55,34 +55,32 @@
#include <sys/types.h> #include <sys/types.h>
#include <time.h> #include <time.h>
#if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) && \ #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__CYGWIN__)
!defined(__CYGWIN__) || defined(__MINGW32__) #if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H) || defined(__LWIP_OPT_H__))
#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H))
/* The check above prevents the winsock2 inclusion if winsock.h already was /* The check above prevents the winsock2 inclusion if winsock.h already was
included, since they can't co-exist without problems */ included, since they can't co-exist without problems */
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
#endif #endif
#else #endif
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
libc5-based Linux systems. Only include it on system that are known to libc5-based Linux systems. Only include it on systems that are known to
require it! */ require it! */
#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \ #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \ defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
defined(ANDROID) || \ defined(ANDROID) || defined(__ANDROID__) || \
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) (defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
#include <sys/select.h> #include <sys/select.h>
#endif #endif
#ifndef _WIN32_WCE #if !defined(WIN32) && !defined(_WIN32_WCE)
#include <sys/socket.h> #include <sys/socket.h>
#endif #endif
#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__) #if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#include <sys/types.h>
#endif
#ifdef __BEOS__ #ifdef __BEOS__
#include <support/SupportDefs.h> #include <support/SupportDefs.h>
@ -122,7 +120,7 @@ typedef void CURL;
#ifndef curl_socket_typedef #ifndef curl_socket_typedef
/* socket typedef */ /* socket typedef */
#ifdef WIN32 #if defined(WIN32) && !defined(__LWIP_OPT_H__)
typedef SOCKET curl_socket_t; typedef SOCKET curl_socket_t;
#define CURL_SOCKET_BAD INVALID_SOCKET #define CURL_SOCKET_BAD INVALID_SOCKET
#else #else
@ -189,10 +187,10 @@ typedef int (*curl_progress_callback)(void *clientp,
#define CURL_MAX_HTTP_HEADER (100*1024) #define CURL_MAX_HTTP_HEADER (100*1024)
#endif #endif
/* This is a magic return code for the write callback that, when returned, /* This is a magic return code for the write callback that, when returned,
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
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,
@ -315,6 +313,13 @@ typedef enum {
CURLSOCKTYPE_LAST /* never use */ CURLSOCKTYPE_LAST /* never use */
} curlsocktype; } curlsocktype;
/* The return code from the sockopt_callback can signal information back
to libcurl: */
#define CURL_SOCKOPT_OK 0
#define CURL_SOCKOPT_ERROR 1 /* causes libcurl to abort and return
CURLE_ABORTED_BY_CALLBACK */
#define CURL_SOCKOPT_ALREADY_CONNECTED 2
typedef int (*curl_sockopt_callback)(void *clientp, typedef int (*curl_sockopt_callback)(void *clientp,
curl_socket_t curlfd, curl_socket_t curlfd,
curlsocktype purpose); curlsocktype purpose);
@ -334,6 +339,9 @@ typedef curl_socket_t
curlsocktype purpose, curlsocktype purpose,
struct curl_sockaddr *address); struct curl_sockaddr *address);
typedef int
(*curl_closesocket_callback)(void *clientp, curl_socket_t item);
typedef enum { typedef enum {
CURLIOE_OK, /* I/O operation successful */ CURLIOE_OK, /* I/O operation successful */
CURLIOE_UNKNOWNCMD, /* command was unknown to callback */ CURLIOE_UNKNOWNCMD, /* command was unknown to callback */
@ -394,7 +402,8 @@ typedef enum {
CURLE_UNSUPPORTED_PROTOCOL, /* 1 */ CURLE_UNSUPPORTED_PROTOCOL, /* 1 */
CURLE_FAILED_INIT, /* 2 */ CURLE_FAILED_INIT, /* 2 */
CURLE_URL_MALFORMAT, /* 3 */ CURLE_URL_MALFORMAT, /* 3 */
CURLE_OBSOLETE4, /* 4 - NOT USED */ CURLE_NOT_BUILT_IN, /* 4 - [was obsoleted in August 2007 for
7.17.0, reused in April 2011 for 7.21.5] */
CURLE_COULDNT_RESOLVE_PROXY, /* 5 */ CURLE_COULDNT_RESOLVE_PROXY, /* 5 */
CURLE_COULDNT_RESOLVE_HOST, /* 6 */ CURLE_COULDNT_RESOLVE_HOST, /* 6 */
CURLE_COULDNT_CONNECT, /* 7 */ CURLE_COULDNT_CONNECT, /* 7 */
@ -402,9 +411,12 @@ typedef enum {
CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server
due to lack of access - when login fails due to lack of access - when login fails
this is not returned. */ this is not returned. */
CURLE_OBSOLETE10, /* 10 - NOT USED */ CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for
7.15.4, reused in Dec 2011 for 7.24.0]*/
CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */
CURLE_OBSOLETE12, /* 12 - NOT USED */ CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server
[was obsoleted in August 2007 for 7.17.0,
reused in Dec 2011 for 7.24.0]*/
CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */
CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ CURLE_FTP_WEIRD_227_FORMAT, /* 14 */
CURLE_FTP_CANT_GET_HOST, /* 15 */ CURLE_FTP_CANT_GET_HOST, /* 15 */
@ -444,7 +456,7 @@ typedef enum {
CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */ CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */
CURLE_OBSOLETE46, /* 46 - NOT USED */ CURLE_OBSOLETE46, /* 46 - NOT USED */
CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */ CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */
CURLE_UNKNOWN_TELNET_OPTION, /* 48 - User specified an unknown option */ CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */
CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */ CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */
CURLE_OBSOLETE50, /* 50 - NOT USED */ CURLE_OBSOLETE50, /* 50 - NOT USED */
CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint
@ -459,7 +471,7 @@ typedef enum {
CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */ CURLE_SSL_CERTPROBLEM, /* 58 - problem with the local certificate */
CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */ CURLE_SSL_CIPHER, /* 59 - couldn't use specified cipher */
CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */ CURLE_SSL_CACERT, /* 60 - problem with the CA cert (path?) */
CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized transfer encoding */ CURLE_BAD_CONTENT_ENCODING, /* 61 - Unrecognized/bad encoding */
CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */ CURLE_LDAP_INVALID_URL, /* 62 - Invalid LDAP URL */
CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */ CURLE_FILESIZE_EXCEEDED, /* 63 - Maximum file size exceeded */
CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */ CURLE_USE_SSL_FAILED, /* 64 - Requested FTP SSL level failed */
@ -499,17 +511,24 @@ typedef enum {
7.19.0) */ 7.19.0) */
CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */ CURLE_FTP_PRET_FAILED, /* 84 - a PRET command failed */
CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */ CURLE_RTSP_CSEQ_ERROR, /* 85 - mismatch of RTSP CSeq numbers */
CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Identifiers */ CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */
CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */
CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */
CURL_LAST /* never use! */ CURL_LAST /* never use! */
} CURLcode; } CURLcode;
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
the obsolete stuff removed! */ the obsolete stuff removed! */
/* Backwards compatibility with older names */ /* Previously obsoletes error codes re-used in 7.24.0 */
#define CURLE_OBSOLETE10 CURLE_FTP_ACCEPT_FAILED
#define CURLE_OBSOLETE12 CURLE_FTP_ACCEPT_TIMEOUT
/* compatibility with older names */
#define CURLOPT_ENCODING CURLOPT_ACCEPT_ENCODING
/* The following were added in 7.21.5, April 2011 */
#define CURLE_UNKNOWN_TELNET_OPTION CURLE_UNKNOWN_OPTION
/* The following were added in 7.17.1 */ /* The following were added in 7.17.1 */
/* These are scheduled to disappear by 2009 */ /* These are scheduled to disappear by 2009 */
@ -517,7 +536,7 @@ typedef enum {
/* The following were added in 7.17.0 */ /* The following were added in 7.17.0 */
/* These are scheduled to disappear by 2009 */ /* These are scheduled to disappear by 2009 */
#define CURLE_OBSOLETE CURLE_OBSOLETE50 /* noone should be using this! */ #define CURLE_OBSOLETE CURLE_OBSOLETE50 /* no one should be using this! */
#define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46 #define CURLE_BAD_PASSWORD_ENTERED CURLE_OBSOLETE46
#define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44 #define CURLE_BAD_CALLING_ORDER CURLE_OBSOLETE44
#define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10 #define CURLE_FTP_USER_PASSWORD_INCORRECT CURLE_OBSOLETE10
@ -529,7 +548,7 @@ typedef enum {
#define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40 #define CURLE_LIBRARY_NOT_FOUND CURLE_OBSOLETE40
#define CURLE_MALFORMAT_USER CURLE_OBSOLETE24 #define CURLE_MALFORMAT_USER CURLE_OBSOLETE24
#define CURLE_SHARE_IN_USE CURLE_OBSOLETE57 #define CURLE_SHARE_IN_USE CURLE_OBSOLETE57
#define CURLE_URL_MALFORMAT_USER CURLE_OBSOLETE4 #define CURLE_URL_MALFORMAT_USER CURLE_NOT_BUILT_IN
#define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED #define CURLE_FTP_ACCESS_DENIED CURLE_REMOTE_ACCESS_DENIED
#define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE #define CURLE_FTP_COULDNT_SET_BINARY CURLE_FTP_COULDNT_SET_TYPE
@ -579,17 +598,32 @@ typedef enum {
in 7.18.0 */ in 7.18.0 */
} curl_proxytype; /* this enum was added in 7.10 */ } curl_proxytype; /* this enum was added in 7.10 */
#define CURLAUTH_NONE 0 /* nothing */ /*
#define CURLAUTH_BASIC (1<<0) /* Basic (default) */ * Bitmasks for CURLOPT_HTTPAUTH and CURLOPT_PROXYAUTH options:
#define CURLAUTH_DIGEST (1<<1) /* Digest */ *
#define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */ * CURLAUTH_NONE - No HTTP authentication
#define CURLAUTH_NTLM (1<<3) /* NTLM */ * CURLAUTH_BASIC - HTTP Basic authentication (default)
#define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */ * CURLAUTH_DIGEST - HTTP Digest authentication
#define CURLAUTH_ONLY (1<<31) /* used together with a single other * CURLAUTH_GSSNEGOTIATE - HTTP GSS-Negotiate authentication
type to force no auth or just that * CURLAUTH_NTLM - HTTP NTLM authentication
single type */ * CURLAUTH_DIGEST_IE - HTTP Digest authentication with IE flavour
#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) /* all fine types set */ * CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper
#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE)) * CURLAUTH_ONLY - Use together with a single other type to force no
* authentication or just that single type
* CURLAUTH_ANY - All fine types set
* CURLAUTH_ANYSAFE - All fine types except Basic
*/
#define CURLAUTH_NONE ((unsigned long)0)
#define CURLAUTH_BASIC (((unsigned long)1)<<0)
#define CURLAUTH_DIGEST (((unsigned long)1)<<1)
#define CURLAUTH_GSSNEGOTIATE (((unsigned long)1)<<2)
#define CURLAUTH_NTLM (((unsigned long)1)<<3)
#define CURLAUTH_DIGEST_IE (((unsigned long)1)<<4)
#define CURLAUTH_NTLM_WB (((unsigned long)1)<<5)
#define CURLAUTH_ONLY (((unsigned long)1)<<31)
#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */ #define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */
#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */ #define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */
@ -599,6 +633,10 @@ typedef enum {
#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */ #define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */
#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY #define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */
#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */
#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */
#define CURL_ERROR_SIZE 256 #define CURL_ERROR_SIZE 256
struct curl_khkey { struct curl_khkey {
@ -649,6 +687,15 @@ typedef enum {
CURLUSESSL_LAST /* not an option, never use */ CURLUSESSL_LAST /* not an option, never use */
} curl_usessl; } curl_usessl;
/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */
/* - ALLOW_BEAST tells libcurl to allow the BEAST SSL vulnerability in the
name of improving interoperability with older servers. Some SSL libraries
have introduced work-arounds for this flaw but those work-arounds sometimes
make the SSL communication fail. To regain functionality with those broken
servers, a user can this way allow the vulnerability back. */
#define CURLSSLOPT_ALLOW_BEAST (1<<0)
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all #ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
the obsolete stuff removed! */ the obsolete stuff removed! */
@ -743,7 +790,7 @@ typedef enum {
#endif #endif
#ifdef CURL_ISOCPP #ifdef CURL_ISOCPP
#define CINIT(name,type,number) CURLOPT_ ## name = CURLOPTTYPE_ ## type + number #define CINIT(na,t,nu) CURLOPT_ ## na = CURLOPTTYPE_ ## t + nu
#else #else
/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
#define LONG CURLOPTTYPE_LONG #define LONG CURLOPTTYPE_LONG
@ -901,9 +948,7 @@ typedef enum {
/* send linked-list of post-transfer QUOTE commands */ /* send linked-list of post-transfer QUOTE commands */
CINIT(POSTQUOTE, OBJECTPOINT, 39), CINIT(POSTQUOTE, OBJECTPOINT, 39),
/* Pass a pointer to string of the output using full variable-replacement CINIT(WRITEINFO, OBJECTPOINT, 40), /* DEPRECATED, do not use! */
as described elsewhere. */
CINIT(WRITEINFO, OBJECTPOINT, 40),
CINIT(VERBOSE, LONG, 41), /* talk a lot */ CINIT(VERBOSE, LONG, 41), /* talk a lot */
CINIT(HEADER, LONG, 42), /* throw the header out too */ CINIT(HEADER, LONG, 42), /* throw the header out too */
@ -912,7 +957,7 @@ typedef enum {
CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */ CINIT(FAILONERROR, LONG, 45), /* no output on http error codes >= 300 */
CINIT(UPLOAD, LONG, 46), /* this is an upload */ CINIT(UPLOAD, LONG, 46), /* this is an upload */
CINIT(POST, LONG, 47), /* HTTP POST method */ CINIT(POST, LONG, 47), /* HTTP POST method */
CINIT(DIRLISTONLY, LONG, 48), /* return bare names when listing directories */ CINIT(DIRLISTONLY, LONG, 48), /* bare names when listing directories */
CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */ CINIT(APPEND, LONG, 50), /* Append instead of overwrite on upload! */
@ -979,9 +1024,7 @@ typedef enum {
/* Max amount of cached alive connections */ /* Max amount of cached alive connections */
CINIT(MAXCONNECTS, LONG, 71), CINIT(MAXCONNECTS, LONG, 71),
/* What policy to use when closing connections when the cache is filled CINIT(CLOSEPOLICY, LONG, 72), /* DEPRECATED, do not use! */
up */
CINIT(CLOSEPOLICY, LONG, 72),
/* 73 = OBSOLETE */ /* 73 = OBSOLETE */
@ -1055,7 +1098,7 @@ typedef enum {
CINIT(SSLENGINE_DEFAULT, LONG, 90), CINIT(SSLENGINE_DEFAULT, LONG, 90),
/* Non-zero value means to use the global dns cache */ /* Non-zero value means to use the global dns cache */
CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* To become OBSOLETE soon */ CINIT(DNS_USE_GLOBAL_CACHE, LONG, 91), /* DEPRECATED, do not use! */
/* DNS cache timeout */ /* DNS cache timeout */
CINIT(DNS_CACHE_TIMEOUT, LONG, 92), CINIT(DNS_CACHE_TIMEOUT, LONG, 92),
@ -1092,8 +1135,9 @@ typedef enum {
CINIT(PROXYTYPE, LONG, 101), CINIT(PROXYTYPE, LONG, 101),
/* Set the Accept-Encoding string. Use this to tell a server you would like /* Set the Accept-Encoding string. Use this to tell a server you would like
the response to be compressed. */ the response to be compressed. Before 7.21.6, this was known as
CINIT(ENCODING, OBJECTPOINT, 102), CURLOPT_ENCODING */
CINIT(ACCEPT_ENCODING, OBJECTPOINT, 102),
/* Set pointer to private data */ /* Set pointer to private data */
CINIT(PRIVATE, OBJECTPOINT, 103), CINIT(PRIVATE, OBJECTPOINT, 103),
@ -1106,8 +1150,8 @@ typedef enum {
and password to whatever host the server decides. */ and password to whatever host the server decides. */
CINIT(UNRESTRICTED_AUTH, LONG, 105), CINIT(UNRESTRICTED_AUTH, LONG, 105),
/* Specifically switch on or off the FTP engine's use of the EPRT command ( it /* Specifically switch on or off the FTP engine's use of the EPRT command (
also disables the LPRT attempt). By default, those ones will always be it also disables the LPRT attempt). By default, those ones will always be
attempted before the good old traditional PORT command. */ attempted before the good old traditional PORT command. */
CINIT(FTP_USE_EPRT, LONG, 106), CINIT(FTP_USE_EPRT, LONG, 106),
@ -1451,6 +1495,46 @@ typedef enum {
/* Set authentication type for authenticated TLS */ /* Set authentication type for authenticated TLS */
CINIT(TLSAUTH_TYPE, OBJECTPOINT, 206), CINIT(TLSAUTH_TYPE, OBJECTPOINT, 206),
/* Set to 1 to enable the "TE:" header in HTTP requests to ask for
compressed transfer-encoded responses. Set to 0 to disable the use of TE:
in outgoing requests. The current default is 0, but it might change in a
future libcurl release.
libcurl will ask for the compressed methods it knows of, and if that
isn't any, it will not ask for transfer-encoding at all even if this
option is set to 1.
*/
CINIT(TRANSFER_ENCODING, LONG, 207),
/* Callback function for closing socket (instead of close(2)). The callback
should have type curl_closesocket_callback */
CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208),
CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209),
/* allow GSSAPI credential delegation */
CINIT(GSSAPI_DELEGATION, LONG, 210),
/* Set the name servers to use for DNS resolution */
CINIT(DNS_SERVERS, OBJECTPOINT, 211),
/* Time-out accept operations (currently for FTP only) after this amount
of miliseconds. */
CINIT(ACCEPTTIMEOUT_MS, LONG, 212),
/* Set TCP keepalive */
CINIT(TCP_KEEPALIVE, LONG, 213),
/* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */
CINIT(TCP_KEEPIDLE, LONG, 214),
CINIT(TCP_KEEPINTVL, LONG, 215),
/* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
CINIT(SSL_OPTIONS, LONG, 216),
/* set the SMTP auth originator */
CINIT(MAIL_AUTH, OBJECTPOINT, 217),
CURLOPT_LASTENTRY /* the last unused */ CURLOPT_LASTENTRY /* the last unused */
} CURLoption; } CURLoption;
@ -1554,13 +1638,16 @@ enum CURL_TLSAUTH {
}; };
/* symbols to use with CURLOPT_POSTREDIR. /* symbols to use with CURLOPT_POSTREDIR.
CURL_REDIR_POST_301 and CURL_REDIR_POST_302 can be bitwise ORed so that CURL_REDIR_POST_301, CURL_REDIR_POST_302 and CURL_REDIR_POST_303
CURL_REDIR_POST_301 | CURL_REDIR_POST_302 == CURL_REDIR_POST_ALL */ can be bitwise ORed so that CURL_REDIR_POST_301 | CURL_REDIR_POST_302
| CURL_REDIR_POST_303 == CURL_REDIR_POST_ALL */
#define CURL_REDIR_GET_ALL 0 #define CURL_REDIR_GET_ALL 0
#define CURL_REDIR_POST_301 1 #define CURL_REDIR_POST_301 1
#define CURL_REDIR_POST_302 2 #define CURL_REDIR_POST_302 2
#define CURL_REDIR_POST_ALL (CURL_REDIR_POST_301|CURL_REDIR_POST_302) #define CURL_REDIR_POST_303 4
#define CURL_REDIR_POST_ALL \
(CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
typedef enum { typedef enum {
CURL_TIMECOND_NONE, CURL_TIMECOND_NONE,
@ -1679,7 +1766,8 @@ CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost,
* Should return the buffer length passed to it as the argument "len" on * Should return the buffer length passed to it as the argument "len" on
* success. * success.
*/ */
typedef size_t (*curl_formget_callback)(void *arg, const char *buf, size_t len); typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
size_t len);
/* /*
* NAME curl_formget() * NAME curl_formget()
@ -1978,8 +2066,9 @@ typedef enum {
CURLSHE_BAD_OPTION, /* 1 */ CURLSHE_BAD_OPTION, /* 1 */
CURLSHE_IN_USE, /* 2 */ CURLSHE_IN_USE, /* 2 */
CURLSHE_INVALID, /* 3 */ CURLSHE_INVALID, /* 3 */
CURLSHE_NOMEM, /* out of memory */ CURLSHE_NOMEM, /* 4 out of memory */
CURLSHE_LAST /* never use */ CURLSHE_NOT_BUILT_IN, /* 5 feature not present in lib */
CURLSHE_LAST /* never use */
} CURLSHcode; } CURLSHcode;
typedef enum { typedef enum {
@ -2059,8 +2148,9 @@ typedef struct {
#define CURL_VERSION_CONV (1<<12) /* character conversions supported */ #define CURL_VERSION_CONV (1<<12) /* character conversions supported */
#define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */ #define CURL_VERSION_CURLDEBUG (1<<13) /* debug memory tracking supported */
#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */ #define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */
#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegating to winbind helper */
/* /*
* NAME curl_version_info() * NAME curl_version_info()
* *
* DESCRIPTION * DESCRIPTION

View File

@ -8,7 +8,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -59,52 +59,52 @@
/* ================================================================ */ /* ================================================================ */
#ifdef CURL_SIZEOF_LONG #ifdef CURL_SIZEOF_LONG
# error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" #error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined
#endif #endif
#ifdef CURL_TYPEOF_CURL_SOCKLEN_T #ifdef CURL_TYPEOF_CURL_SOCKLEN_T
# error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" #error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined
#endif #endif
#ifdef CURL_SIZEOF_CURL_SOCKLEN_T #ifdef CURL_SIZEOF_CURL_SOCKLEN_T
# error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" #error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined
#endif #endif
#ifdef CURL_TYPEOF_CURL_OFF_T #ifdef CURL_TYPEOF_CURL_OFF_T
# error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" #error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined
#endif #endif
#ifdef CURL_FORMAT_CURL_OFF_T #ifdef CURL_FORMAT_CURL_OFF_T
# error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" #error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined
#endif #endif
#ifdef CURL_FORMAT_CURL_OFF_TU #ifdef CURL_FORMAT_CURL_OFF_TU
# error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" #error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined
#endif #endif
#ifdef CURL_FORMAT_OFF_T #ifdef CURL_FORMAT_OFF_T
# error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" #error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined
#endif #endif
#ifdef CURL_SIZEOF_CURL_OFF_T #ifdef CURL_SIZEOF_CURL_OFF_T
# error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" #error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined
#endif #endif
#ifdef CURL_SUFFIX_CURL_OFF_T #ifdef CURL_SUFFIX_CURL_OFF_T
# error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" #error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined
#endif #endif
#ifdef CURL_SUFFIX_CURL_OFF_TU #ifdef CURL_SUFFIX_CURL_OFF_TU
# error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" #error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h"
Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined
#endif #endif

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -26,17 +26,17 @@
a script at release-time. This was made its own header file in 7.11.2 */ a script at release-time. This was made its own header file in 7.11.2 */
/* This is the global package copyright */ /* This is the global package copyright */
#define LIBCURL_COPYRIGHT "1996 - 2010 Daniel Stenberg, <daniel@haxx.se>." #define LIBCURL_COPYRIGHT "1996 - 2012 Daniel Stenberg, <daniel@haxx.se>."
/* 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.21.4" #define LIBCURL_VERSION "7.26.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 21 #define LIBCURL_VERSION_MINOR 26
#define LIBCURL_VERSION_PATCH 4 #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
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
@ -53,7 +53,7 @@
and it is always a greater number in a more recent release. It makes and it is always a greater number in a more recent release. It makes
comparisons with greater than and less than work. comparisons with greater than and less than work.
*/ */
#define LIBCURL_VERSION_NUM 0x071504 #define LIBCURL_VERSION_NUM 0x071a00
/* /*
* 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
@ -64,6 +64,6 @@
* *
* "Mon Feb 12 11:35:33 UTC 2007" * "Mon Feb 12 11:35:33 UTC 2007"
*/ */
#define LIBCURL_TIMESTAMP "Thu Feb 17 12:19:40 UTC 2011" #define LIBCURL_TIMESTAMP "Thu May 24 16:05:42 UTC 2012"
#endif /* __CURL_CURLVER_H */ #endif /* __CURL_CURLVER_H */

View File

@ -53,8 +53,8 @@ CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
* *
* Creates a new curl session handle with the same options set for the handle * Creates a new curl session handle with the same options set for the handle
* passed in. Duplicating a handle could only be a matter of cloning data and * passed in. Duplicating a handle could only be a matter of cloning data and
* options, internal state info and things like persistant connections cannot * options, internal state info and things like persistent connections cannot
* be transfered. It is useful in multithreaded applications when you can run * be transferred. It is useful in multithreaded applications when you can run
* curl_easy_duphandle() for each new thread to avoid a series of identical * curl_easy_duphandle() for each new thread to avoid a series of identical
* curl_easy_setopt() invokes in every thread. * curl_easy_setopt() invokes in every thread.
*/ */

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -41,66 +41,66 @@
#define curl_easy_setopt(handle, option, value) \ #define curl_easy_setopt(handle, option, value) \
__extension__ ({ \ __extension__ ({ \
__typeof__ (option) _curl_opt = option; \ __typeof__ (option) _curl_opt = option; \
if (__builtin_constant_p(_curl_opt)) { \ if(__builtin_constant_p(_curl_opt)) { \
if (_curl_is_long_option(_curl_opt)) \ if(_curl_is_long_option(_curl_opt)) \
if (!_curl_is_long(value)) \ if(!_curl_is_long(value)) \
_curl_easy_setopt_err_long(); \ _curl_easy_setopt_err_long(); \
if (_curl_is_off_t_option(_curl_opt)) \ if(_curl_is_off_t_option(_curl_opt)) \
if (!_curl_is_off_t(value)) \ if(!_curl_is_off_t(value)) \
_curl_easy_setopt_err_curl_off_t(); \ _curl_easy_setopt_err_curl_off_t(); \
if (_curl_is_string_option(_curl_opt)) \ if(_curl_is_string_option(_curl_opt)) \
if (!_curl_is_string(value)) \ if(!_curl_is_string(value)) \
_curl_easy_setopt_err_string(); \ _curl_easy_setopt_err_string(); \
if (_curl_is_write_cb_option(_curl_opt)) \ if(_curl_is_write_cb_option(_curl_opt)) \
if (!_curl_is_write_cb(value)) \ if(!_curl_is_write_cb(value)) \
_curl_easy_setopt_err_write_callback(); \ _curl_easy_setopt_err_write_callback(); \
if ((_curl_opt) == CURLOPT_READFUNCTION) \ if((_curl_opt) == CURLOPT_READFUNCTION) \
if (!_curl_is_read_cb(value)) \ if(!_curl_is_read_cb(value)) \
_curl_easy_setopt_err_read_cb(); \ _curl_easy_setopt_err_read_cb(); \
if ((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \
if (!_curl_is_ioctl_cb(value)) \ if(!_curl_is_ioctl_cb(value)) \
_curl_easy_setopt_err_ioctl_cb(); \ _curl_easy_setopt_err_ioctl_cb(); \
if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \
if (!_curl_is_sockopt_cb(value)) \ if(!_curl_is_sockopt_cb(value)) \
_curl_easy_setopt_err_sockopt_cb(); \ _curl_easy_setopt_err_sockopt_cb(); \
if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \
if (!_curl_is_opensocket_cb(value)) \ if(!_curl_is_opensocket_cb(value)) \
_curl_easy_setopt_err_opensocket_cb(); \ _curl_easy_setopt_err_opensocket_cb(); \
if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \
if (!_curl_is_progress_cb(value)) \ if(!_curl_is_progress_cb(value)) \
_curl_easy_setopt_err_progress_cb(); \ _curl_easy_setopt_err_progress_cb(); \
if ((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \
if (!_curl_is_debug_cb(value)) \ if(!_curl_is_debug_cb(value)) \
_curl_easy_setopt_err_debug_cb(); \ _curl_easy_setopt_err_debug_cb(); \
if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \
if (!_curl_is_ssl_ctx_cb(value)) \ if(!_curl_is_ssl_ctx_cb(value)) \
_curl_easy_setopt_err_ssl_ctx_cb(); \ _curl_easy_setopt_err_ssl_ctx_cb(); \
if (_curl_is_conv_cb_option(_curl_opt)) \ if(_curl_is_conv_cb_option(_curl_opt)) \
if (!_curl_is_conv_cb(value)) \ if(!_curl_is_conv_cb(value)) \
_curl_easy_setopt_err_conv_cb(); \ _curl_easy_setopt_err_conv_cb(); \
if ((_curl_opt) == CURLOPT_SEEKFUNCTION) \ if((_curl_opt) == CURLOPT_SEEKFUNCTION) \
if (!_curl_is_seek_cb(value)) \ if(!_curl_is_seek_cb(value)) \
_curl_easy_setopt_err_seek_cb(); \ _curl_easy_setopt_err_seek_cb(); \
if (_curl_is_cb_data_option(_curl_opt)) \ if(_curl_is_cb_data_option(_curl_opt)) \
if (!_curl_is_cb_data(value)) \ if(!_curl_is_cb_data(value)) \
_curl_easy_setopt_err_cb_data(); \ _curl_easy_setopt_err_cb_data(); \
if ((_curl_opt) == CURLOPT_ERRORBUFFER) \ if((_curl_opt) == CURLOPT_ERRORBUFFER) \
if (!_curl_is_error_buffer(value)) \ if(!_curl_is_error_buffer(value)) \
_curl_easy_setopt_err_error_buffer(); \ _curl_easy_setopt_err_error_buffer(); \
if ((_curl_opt) == CURLOPT_STDERR) \ if((_curl_opt) == CURLOPT_STDERR) \
if (!_curl_is_FILE(value)) \ if(!_curl_is_FILE(value)) \
_curl_easy_setopt_err_FILE(); \ _curl_easy_setopt_err_FILE(); \
if (_curl_is_postfields_option(_curl_opt)) \ if(_curl_is_postfields_option(_curl_opt)) \
if (!_curl_is_postfields(value)) \ if(!_curl_is_postfields(value)) \
_curl_easy_setopt_err_postfields(); \ _curl_easy_setopt_err_postfields(); \
if ((_curl_opt) == CURLOPT_HTTPPOST) \ if((_curl_opt) == CURLOPT_HTTPPOST) \
if (!_curl_is_arr((value), struct curl_httppost)) \ if(!_curl_is_arr((value), struct curl_httppost)) \
_curl_easy_setopt_err_curl_httpost(); \ _curl_easy_setopt_err_curl_httpost(); \
if (_curl_is_slist_option(_curl_opt)) \ if(_curl_is_slist_option(_curl_opt)) \
if (!_curl_is_arr((value), struct curl_slist)) \ if(!_curl_is_arr((value), struct curl_slist)) \
_curl_easy_setopt_err_curl_slist(); \ _curl_easy_setopt_err_curl_slist(); \
if ((_curl_opt) == CURLOPT_SHARE) \ if((_curl_opt) == CURLOPT_SHARE) \
if (!_curl_is_ptr((value), CURLSH)) \ if(!_curl_is_ptr((value), CURLSH)) \
_curl_easy_setopt_err_CURLSH(); \ _curl_easy_setopt_err_CURLSH(); \
} \ } \
curl_easy_setopt(handle, _curl_opt, value); \ curl_easy_setopt(handle, _curl_opt, value); \
@ -111,18 +111,18 @@ __extension__ ({ \
#define curl_easy_getinfo(handle, info, arg) \ #define curl_easy_getinfo(handle, info, arg) \
__extension__ ({ \ __extension__ ({ \
__typeof__ (info) _curl_info = info; \ __typeof__ (info) _curl_info = info; \
if (__builtin_constant_p(_curl_info)) { \ if(__builtin_constant_p(_curl_info)) { \
if (_curl_is_string_info(_curl_info)) \ if(_curl_is_string_info(_curl_info)) \
if (!_curl_is_arr((arg), char *)) \ if(!_curl_is_arr((arg), char *)) \
_curl_easy_getinfo_err_string(); \ _curl_easy_getinfo_err_string(); \
if (_curl_is_long_info(_curl_info)) \ if(_curl_is_long_info(_curl_info)) \
if (!_curl_is_arr((arg), long)) \ if(!_curl_is_arr((arg), long)) \
_curl_easy_getinfo_err_long(); \ _curl_easy_getinfo_err_long(); \
if (_curl_is_double_info(_curl_info)) \ if(_curl_is_double_info(_curl_info)) \
if (!_curl_is_arr((arg), double)) \ if(!_curl_is_arr((arg), double)) \
_curl_easy_getinfo_err_double(); \ _curl_easy_getinfo_err_double(); \
if (_curl_is_slist_info(_curl_info)) \ if(_curl_is_slist_info(_curl_info)) \
if (!_curl_is_arr((arg), struct curl_slist *)) \ if(!_curl_is_arr((arg), struct curl_slist *)) \
_curl_easy_getinfo_err_curl_slist(); \ _curl_easy_getinfo_err_curl_slist(); \
} \ } \
curl_easy_getinfo(handle, _curl_info, arg); \ curl_easy_getinfo(handle, _curl_info, arg); \
@ -141,15 +141,17 @@ __extension__ ({ \
/* To define a new warning, use _CURL_WARNING(identifier, "message") */ /* To define a new warning, use _CURL_WARNING(identifier, "message") */
#define _CURL_WARNING(id, message) \ #define _CURL_WARNING(id, message) \
static void __attribute__((warning(message))) __attribute__((unused)) \ static void __attribute__((__warning__(message))) \
__attribute__((noinline)) id(void) { __asm__(""); } __attribute__((__unused__)) __attribute__((__noinline__)) \
id(void) { __asm__(""); }
_CURL_WARNING(_curl_easy_setopt_err_long, _CURL_WARNING(_curl_easy_setopt_err_long,
"curl_easy_setopt expects a long argument for this option") "curl_easy_setopt expects a long argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_curl_off_t, _CURL_WARNING(_curl_easy_setopt_err_curl_off_t,
"curl_easy_setopt expects a curl_off_t argument for this option") "curl_easy_setopt expects a curl_off_t argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_string, _CURL_WARNING(_curl_easy_setopt_err_string,
"curl_easy_setopt expects a string (char* or char[]) argument for this option" "curl_easy_setopt expects a "
"string (char* or char[]) argument for this option"
) )
_CURL_WARNING(_curl_easy_setopt_err_write_callback, _CURL_WARNING(_curl_easy_setopt_err_write_callback,
"curl_easy_setopt expects a curl_write_callback argument for this option") "curl_easy_setopt expects a curl_write_callback argument for this option")
@ -160,7 +162,8 @@ _CURL_WARNING(_curl_easy_setopt_err_ioctl_cb,
_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb, _CURL_WARNING(_curl_easy_setopt_err_sockopt_cb,
"curl_easy_setopt expects a curl_sockopt_callback argument for this option") "curl_easy_setopt expects a curl_sockopt_callback argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb, _CURL_WARNING(_curl_easy_setopt_err_opensocket_cb,
"curl_easy_setopt expects a curl_opensocket_callback argument for this option" "curl_easy_setopt expects a "
"curl_opensocket_callback argument for this option"
) )
_CURL_WARNING(_curl_easy_setopt_err_progress_cb, _CURL_WARNING(_curl_easy_setopt_err_progress_cb,
"curl_easy_setopt expects a curl_progress_callback argument for this option") "curl_easy_setopt expects a curl_progress_callback argument for this option")
@ -173,9 +176,11 @@ _CURL_WARNING(_curl_easy_setopt_err_conv_cb,
_CURL_WARNING(_curl_easy_setopt_err_seek_cb, _CURL_WARNING(_curl_easy_setopt_err_seek_cb,
"curl_easy_setopt expects a curl_seek_callback argument for this option") "curl_easy_setopt expects a curl_seek_callback argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_cb_data, _CURL_WARNING(_curl_easy_setopt_err_cb_data,
"curl_easy_setopt expects a private data pointer as argument for this option") "curl_easy_setopt expects a "
"private data pointer as argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_error_buffer, _CURL_WARNING(_curl_easy_setopt_err_error_buffer,
"curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option") "curl_easy_setopt expects a "
"char buffer of CURL_ERROR_SIZE as argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_FILE, _CURL_WARNING(_curl_easy_setopt_err_FILE,
"curl_easy_setopt expects a FILE* argument for this option") "curl_easy_setopt expects a FILE* argument for this option")
_CURL_WARNING(_curl_easy_setopt_err_postfields, _CURL_WARNING(_curl_easy_setopt_err_postfields,
@ -224,7 +229,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
(option) == CURLOPT_PROXYUSERNAME || \ (option) == CURLOPT_PROXYUSERNAME || \
(option) == CURLOPT_PROXYPASSWORD || \ (option) == CURLOPT_PROXYPASSWORD || \
(option) == CURLOPT_NOPROXY || \ (option) == CURLOPT_NOPROXY || \
(option) == CURLOPT_ENCODING || \ (option) == CURLOPT_ACCEPT_ENCODING || \
(option) == CURLOPT_REFERER || \ (option) == CURLOPT_REFERER || \
(option) == CURLOPT_USERAGENT || \ (option) == CURLOPT_USERAGENT || \
(option) == CURLOPT_COOKIE || \ (option) == CURLOPT_COOKIE || \
@ -388,7 +393,8 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */ /* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */
/* XXX: also check size of an char[] array? */ /* XXX: also check size of an char[] array? */
#define _curl_is_error_buffer(expr) \ #define _curl_is_error_buffer(expr) \
(__builtin_types_compatible_p(__typeof__(expr), char *) || \ (_curl_is_NULL(expr) || \
__builtin_types_compatible_p(__typeof__(expr), char *) || \
__builtin_types_compatible_p(__typeof__(expr), char[])) __builtin_types_compatible_p(__typeof__(expr), char[]))
/* evaluates to true if expr is of type (const) void* or (const) FILE* */ /* evaluates to true if expr is of type (const) void* or (const) FILE* */
@ -481,7 +487,8 @@ typedef int (_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype);
typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t, typedef int (_curl_sockopt_callback2)(const void *, curl_socket_t,
curlsocktype); curlsocktype);
/* evaluates to true if expr is of type curl_opensocket_callback or "similar" */ /* evaluates to true if expr is of type curl_opensocket_callback or
"similar" */
#define _curl_is_opensocket_cb(expr) \ #define _curl_is_opensocket_cb(expr) \
(_curl_is_NULL(expr) || \ (_curl_is_NULL(expr) || \
__builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\ __builtin_types_compatible_p(__typeof__(expr), curl_opensocket_callback) ||\
@ -516,7 +523,11 @@ typedef int (_curl_progress_callback2)(const void *,
_curl_callback_compatible((expr), _curl_debug_callback1) || \ _curl_callback_compatible((expr), _curl_debug_callback1) || \
_curl_callback_compatible((expr), _curl_debug_callback2) || \ _curl_callback_compatible((expr), _curl_debug_callback2) || \
_curl_callback_compatible((expr), _curl_debug_callback3) || \ _curl_callback_compatible((expr), _curl_debug_callback3) || \
_curl_callback_compatible((expr), _curl_debug_callback4)) _curl_callback_compatible((expr), _curl_debug_callback4) || \
_curl_callback_compatible((expr), _curl_debug_callback5) || \
_curl_callback_compatible((expr), _curl_debug_callback6) || \
_curl_callback_compatible((expr), _curl_debug_callback7) || \
_curl_callback_compatible((expr), _curl_debug_callback8))
typedef int (_curl_debug_callback1) (CURL *, typedef int (_curl_debug_callback1) (CURL *,
curl_infotype, char *, size_t, void *); curl_infotype, char *, size_t, void *);
typedef int (_curl_debug_callback2) (CURL *, typedef int (_curl_debug_callback2) (CURL *,
@ -525,6 +536,14 @@ typedef int (_curl_debug_callback3) (CURL *,
curl_infotype, const char *, size_t, void *); curl_infotype, const char *, size_t, void *);
typedef int (_curl_debug_callback4) (CURL *, typedef int (_curl_debug_callback4) (CURL *,
curl_infotype, const char *, size_t, const void *); curl_infotype, const char *, size_t, const void *);
typedef int (_curl_debug_callback5) (CURL *,
curl_infotype, unsigned char *, size_t, void *);
typedef int (_curl_debug_callback6) (CURL *,
curl_infotype, unsigned char *, size_t, const void *);
typedef int (_curl_debug_callback7) (CURL *,
curl_infotype, const unsigned char *, size_t, void *);
typedef int (_curl_debug_callback8) (CURL *,
curl_infotype, const unsigned char *, size_t, const void *);
/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ /* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */
/* this is getting even messier... */ /* this is getting even messier... */
@ -550,7 +569,8 @@ typedef CURLcode (_curl_ssl_ctx_callback4)(CURL *, const void *, const void *);
typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); typedef CURLcode (_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *);
typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); typedef CURLcode (_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *);
typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); typedef CURLcode (_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *);
typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, const void *); typedef CURLcode (_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX,
const void *);
#else #else
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5;
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6; typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6;

View File

@ -1 +1 @@
89c49d395ece44cf2d891cd5c2a84f819e229d30 a23875412ca7660ea9bada038fd05f84534b2b85

View File

@ -1 +1 @@
4dc0690a9f8419b4aba821eeb739d6beb4242cda a04bd2973966590291accfdcd0624e015334652a

View File

@ -1 +1 @@
fca1b81187a22728c6c352f121ac03f8abf2ae75 dbf2fdecca23632d13cf417e0a7e5412c4786a5c

View File

@ -1 +1 @@
68aaf2639b745d8479ad875745409f9cf65f4b93 21cc0d62d0f8fb702fb49766e9bbc14ff54be5bf

View File

@ -1 +1 @@
0319233cc1a28ea568fdc4ced57f2d1cfe11e81f a28766b9e95f451e1743be3562ce2e5fb17da67a

View File

@ -1 +1 @@
54d8098e43887d3bb3a773542d869491d77d8e45 4a9068c1be4b5e5143ec763db264efda1f455f6c

View File

@ -1 +1 @@
2f84bee7e68f8b6766688634d6a35221cd006a66 22e24082eae1ffb8482044a22300fb82abdbbf72

View File

@ -1 +1 @@
67df2bca4c4bdf2c53f0ae219f55ad5efdd8dd48 b60c3d26c3a22525dd4c910f97e22885c3c3a4bd

View File

@ -1 +1 @@
03f601480de32bbcc70313b8afda1bbf0194944c c67e594f3c1e1583fa2c2db0a609865da6b01df8

View File

@ -1 +1 @@
08568c709e115ac77d96705d4b5cb47c1f494514 847ed6f57adc00708211a427105807cd955179e3

View File

@ -1 +1 @@
8ae8c1465f02581e5f557c549ccbd31f77ac392e 1d348a7593920f7706d1689a1d1d9530ed50cf00

View File

@ -1 +1 @@
829ad7281999aff0543b4aca6574779ef6c48644 15244fa0efa82876e4b4d525af784fac1ac358d4

View File

@ -1 +1 @@
813164629a16c93ebc3ff20a39072f2cae2aee3a 62051e2fe2e9a8d383d827f83c12321b7d3a83fe

View File

@ -1 +1 @@
936f891620a0dbe86ae34809f3472d57497a6098 9978214f8c9fe1a615368f222515d6a1badf1b23

View File

@ -1 +1 @@
e9908a726968236013dd4a7488211f936d1eb406 ca9e20ce632d8e0c45d40bd51ecce8dde8150fc1