Skip to content

Commit 783fbc9

Browse files
author
minggo
authored
Merge pull request #241 from minggo/v3
upgrade curl to 7.50.0
2 parents 8781f15 + 1eab4cf commit 783fbc9

39 files changed

+512
-928
lines changed

curl/include/android/curl/curl.h

+28-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* | (__| |_| | _ <| |___
88
* \___|\___/|_| \_\_____|
99
*
10-
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
10+
* Copyright (C) 1998 - 2016, Daniel Stenberg, <[email protected]>, et al.
1111
*
1212
* This software is licensed as described in the file COPYING, which
1313
* you should have received as part of this distribution. The terms
@@ -91,7 +91,7 @@
9191
extern "C" {
9292
#endif
9393

94-
typedef void CURL;
94+
typedef struct Curl_easy CURL;
9595

9696
/*
9797
* libcurl external API function linkage decorations.
@@ -373,6 +373,7 @@ typedef curlioerr (*curl_ioctl_callback)(CURL *handle,
373373
int cmd,
374374
void *clientp);
375375

376+
#ifndef CURL_DID_MEMORY_FUNC_TYPEDEFS
376377
/*
377378
* The following typedef's are signatures of malloc, free, realloc, strdup and
378379
* calloc respectively. Function pointers of these types can be passed to the
@@ -385,6 +386,9 @@ typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
385386
typedef char *(*curl_strdup_callback)(const char *str);
386387
typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
387388

389+
#define CURL_DID_MEMORY_FUNC_TYPEDEFS
390+
#endif
391+
388392
/* the kind of data that is passed to information_callback*/
389393
typedef enum {
390394
CURLINFO_TEXT = 0,
@@ -471,9 +475,9 @@ typedef enum {
471475
CURLE_OBSOLETE44, /* 44 - NOT USED */
472476
CURLE_INTERFACE_FAILED, /* 45 - CURLOPT_INTERFACE failed */
473477
CURLE_OBSOLETE46, /* 46 - NOT USED */
474-
CURLE_TOO_MANY_REDIRECTS , /* 47 - catch endless re-direct loops */
478+
CURLE_TOO_MANY_REDIRECTS, /* 47 - catch endless re-direct loops */
475479
CURLE_UNKNOWN_OPTION, /* 48 - User specified an unknown option */
476-
CURLE_TELNET_OPTION_SYNTAX , /* 49 - Malformed telnet option */
480+
CURLE_TELNET_OPTION_SYNTAX, /* 49 - Malformed telnet option */
477481
CURLE_OBSOLETE50, /* 50 - NOT USED */
478482
CURLE_PEER_FAILED_VERIFICATION, /* 51 - peer's certificate or fingerprint
479483
wasn't verified fine */
@@ -535,6 +539,8 @@ typedef enum {
535539
CURLE_SSL_PINNEDPUBKEYNOTMATCH, /* 90 - specified pinned public key did not
536540
match */
537541
CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */
542+
CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer
543+
*/
538544
CURL_LAST /* never use! */
539545
} CURLcode;
540546

@@ -1460,7 +1466,7 @@ typedef enum {
14601466
CINIT(TFTP_BLKSIZE, LONG, 178),
14611467

14621468
/* Socks Service */
1463-
CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179),
1469+
CINIT(SOCKS5_GSSAPI_SERVICE, STRINGPOINT, 179), /* DEPRECATED, do not use! */
14641470

14651471
/* Socks Service */
14661472
CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),
@@ -1676,6 +1682,13 @@ typedef enum {
16761682
/* Do not send any tftp option requests to the server */
16771683
CINIT(TFTP_NO_OPTIONS, LONG, 242),
16781684

1685+
/* Linked-list of host:port:connect-to-host:connect-to-port,
1686+
overrides the URL's host:port (only for the network layer) */
1687+
CINIT(CONNECT_TO, OBJECTPOINT, 243),
1688+
1689+
/* Set TCP Fast Open */
1690+
CINIT(TCP_FASTOPEN, LONG, 244),
1691+
16791692
CURLOPT_LASTENTRY /* the last unused */
16801693
} CURLoption;
16811694

@@ -1727,6 +1740,8 @@ enum {
17271740
CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
17281741
CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */
17291742
CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
1743+
CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1
1744+
Upgrade */
17301745

17311746
CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
17321747
};
@@ -2110,6 +2125,11 @@ typedef enum {
21102125
CURLSSLBACKEND_MBEDTLS = 11
21112126
} curl_sslbackend;
21122127

2128+
/* aliases for library clones and renames */
2129+
#define CURLSSLBACKEND_LIBRESSL 1
2130+
#define CURLSSLBACKEND_BORINGSSL 1
2131+
#define CURLSSLBACKEND_WOLFSSL 6
2132+
21132133
/* Information about the SSL library used and the respective internal SSL
21142134
handle, which can be used to obtain further information regarding the
21152135
connection. Asked for with CURLINFO_TLS_SSL_PTR or CURLINFO_TLS_SESSION. */
@@ -2173,9 +2193,10 @@ typedef enum {
21732193
CURLINFO_TLS_SESSION = CURLINFO_SLIST + 43,
21742194
CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,
21752195
CURLINFO_TLS_SSL_PTR = CURLINFO_SLIST + 45,
2196+
CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46,
21762197
/* Fill in new entries below here! */
21772198

2178-
CURLINFO_LASTONE = 45
2199+
CURLINFO_LASTONE = 46
21792200
} CURLINFO;
21802201

21812202
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
@@ -2237,7 +2258,7 @@ typedef void (*curl_unlock_function)(CURL *handle,
22372258
curl_lock_data data,
22382259
void *userptr);
22392260

2240-
typedef void CURLSH;
2261+
typedef struct Curl_share CURLSH;
22412262

22422263
typedef enum {
22432264
CURLSHE_OK, /* all is fine */

curl/include/android/curl/curlbuild.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@
133133

134134
/* Configure process defines this to 1 when it finds out that system */
135135
/* header file stdint.h must be included by the external interface. */
136-
#define CURL_PULL_STDINT_H 1
136+
/* #undef CURL_PULL_STDINT_H */
137137
#ifdef CURL_PULL_STDINT_H
138138
# include <stdint.h>
139139
#endif
140140

141141
/* Configure process defines this to 1 when it finds out that system */
142142
/* header file inttypes.h must be included by the external interface. */
143-
#define CURL_PULL_INTTYPES_H 1
143+
/* #undef CURL_PULL_INTTYPES_H */
144144
#ifdef CURL_PULL_INTTYPES_H
145145
# include <inttypes.h>
146146
#endif
@@ -160,7 +160,7 @@
160160
#endif
161161

162162
/* The size of `long', as computed by sizeof. */
163-
#define CURL_SIZEOF_LONG 4
163+
#define CURL_SIZEOF_LONG 8
164164

165165
/* Integral data type used for curl_socklen_t. */
166166
#define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
@@ -172,27 +172,27 @@
172172
typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
173173

174174
/* Signed integral data type used for curl_off_t. */
175-
#define CURL_TYPEOF_CURL_OFF_T int64_t
175+
#define CURL_TYPEOF_CURL_OFF_T long
176176

177177
/* Data type definition of curl_off_t. */
178178
typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
179179

180180
/* curl_off_t formatting string directive without "%" conversion specifier. */
181-
#define CURL_FORMAT_CURL_OFF_T "lld"
181+
#define CURL_FORMAT_CURL_OFF_T "ld"
182182

183183
/* unsigned curl_off_t formatting string without "%" conversion specifier. */
184-
#define CURL_FORMAT_CURL_OFF_TU "llu"
184+
#define CURL_FORMAT_CURL_OFF_TU "lu"
185185

186186
/* curl_off_t formatting string directive with "%" conversion specifier. */
187-
#define CURL_FORMAT_OFF_T "%lld"
187+
#define CURL_FORMAT_OFF_T "%ld"
188188

189189
/* The size of `curl_off_t', as computed by sizeof. */
190190
#define CURL_SIZEOF_CURL_OFF_T 8
191191

192192
/* curl_off_t constant suffix. */
193-
#define CURL_SUFFIX_CURL_OFF_T LL
193+
#define CURL_SUFFIX_CURL_OFF_T L
194194

195195
/* unsigned curl_off_t constant suffix. */
196-
#define CURL_SUFFIX_CURL_OFF_TU ULL
196+
#define CURL_SUFFIX_CURL_OFF_TU UL
197197

198198
#endif /* __CURL_CURLBUILD_H */

curl/include/android/curl/curlver.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030

3131
/* This is the version number of the libcurl package from which this header
3232
file origins: */
33-
#define LIBCURL_VERSION "7.48.0"
33+
#define LIBCURL_VERSION "7.50.0-DEV"
3434

3535
/* The numeric version number is also available "in parts" by using these
3636
defines: */
3737
#define LIBCURL_VERSION_MAJOR 7
38-
#define LIBCURL_VERSION_MINOR 48
38+
#define LIBCURL_VERSION_MINOR 50
3939
#define LIBCURL_VERSION_PATCH 0
4040

4141
/* This is the numeric version of the libcurl version number, meant for easier
@@ -57,7 +57,7 @@
5757
CURL_VERSION_BITS() macro since curl's own configure script greps for it
5858
and needs it to contain the full number.
5959
*/
60-
#define LIBCURL_VERSION_NUM 0x073000
60+
#define LIBCURL_VERSION_NUM 0x073200
6161

6262
/*
6363
* This is the date and time when the full source package was created. The
@@ -68,7 +68,7 @@
6868
*
6969
* "Mon Feb 12 11:35:33 UTC 2007"
7070
*/
71-
#define LIBCURL_TIMESTAMP "Wed Mar 23 06:57:50 UTC 2016"
71+
#define LIBCURL_TIMESTAMP "DEV"
7272

7373
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z)
7474
#define CURL_AT_LEAST_VERSION(x,y,z) \

curl/include/android/curl/mprintf.h

+2-26
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* | (__| |_| | _ <| |___
88
* \___|\___/|_| \_\_____|
99
*
10-
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
10+
* Copyright (C) 1998 - 2016, Daniel Stenberg, <[email protected]>, et al.
1111
*
1212
* This software is licensed as described in the file COPYING, which
1313
* you should have received as part of this distribution. The terms
@@ -24,8 +24,7 @@
2424

2525
#include <stdarg.h>
2626
#include <stdio.h> /* needed for FILE */
27-
28-
#include "curl.h"
27+
#include "curl.h" /* for CURL_EXTERN */
2928

3029
#ifdef __cplusplus
3130
extern "C" {
@@ -44,29 +43,6 @@ CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,
4443
CURL_EXTERN char *curl_maprintf(const char *format, ...);
4544
CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
4645

47-
#ifdef _MPRINTF_REPLACE
48-
# undef printf
49-
# undef fprintf
50-
# undef sprintf
51-
# undef vsprintf
52-
# undef snprintf
53-
# undef vprintf
54-
# undef vfprintf
55-
# undef vsnprintf
56-
# undef aprintf
57-
# undef vaprintf
58-
# define printf curl_mprintf
59-
# define fprintf curl_mfprintf
60-
# define sprintf curl_msprintf
61-
# define vsprintf curl_mvsprintf
62-
# define snprintf curl_msnprintf
63-
# define vprintf curl_mvprintf
64-
# define vfprintf curl_mvfprintf
65-
# define vsnprintf curl_mvsnprintf
66-
# define aprintf curl_maprintf
67-
# define vaprintf curl_mvaprintf
68-
#endif
69-
7046
#ifdef __cplusplus
7147
}
7248
#endif

curl/include/android/curl/multi.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* | (__| |_| | _ <| |___
88
* \___|\___/|_| \_\_____|
99
*
10-
* Copyright (C) 1998 - 2015, Daniel Stenberg, <[email protected]>, et al.
10+
* Copyright (C) 1998 - 2016, Daniel Stenberg, <[email protected]>, et al.
1111
*
1212
* This software is licensed as described in the file COPYING, which
1313
* you should have received as part of this distribution. The terms
@@ -52,7 +52,7 @@
5252
extern "C" {
5353
#endif
5454

55-
typedef void CURLM;
55+
typedef struct Curl_multi CURLM;
5656

5757
typedef enum {
5858
CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or

curl/include/android/curl/types.h

-1
This file was deleted.

0 commit comments

Comments
 (0)