Skip to content

Commit 54f9319

Browse files
committed
deps: update libcurl to 8.19.0
1 parent 156ce89 commit 54f9319

309 files changed

Lines changed: 16994 additions & 20632 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

deps/curl/.clang-tidy.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
2+
#
3+
# SPDX-License-Identifier: curl
4+
---
5+
# https://clang.llvm.org/extra/clang-tidy/
6+
7+
# https://clang.llvm.org/extra/clang-tidy/checks/list.html
8+
Checks:
9+
- clang-analyzer-*
10+
- -clang-analyzer-optin.performance.Padding
11+
- -clang-analyzer-security.ArrayBound # due to false positives with clang-tidy v21.1.0
12+
- -clang-analyzer-security.insecureAPI.bzero # for FD_ZERO() (seen on macOS)
13+
- -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
14+
- -clang-diagnostic-nullability-extension
15+
- bugprone-assert-side-effect
16+
- bugprone-chained-comparison
17+
- bugprone-dynamic-static-initializers
18+
- bugprone-macro-parentheses
19+
- bugprone-macro-repeated-side-effects
20+
- bugprone-misplaced-operator-in-strlen-in-alloc
21+
- bugprone-misplaced-pointer-arithmetic-in-alloc
22+
- bugprone-not-null-terminated-result
23+
- bugprone-posix-return
24+
- bugprone-redundant-branch-condition
25+
- bugprone-signed-char-misuse
26+
- bugprone-suspicious-enum-usage
27+
- bugprone-suspicious-memset-usage
28+
- bugprone-suspicious-missing-comma
29+
- bugprone-suspicious-realloc-usage
30+
- bugprone-suspicious-semicolon
31+
- misc-const-correctness
32+
- misc-header-include-cycle
33+
- portability-*
34+
- readability-duplicate-include
35+
- readability-math-missing-parentheses
36+
- readability-named-parameter
37+
- readability-redundant-control-flow
38+
- readability-redundant-declaration
39+
- readability-redundant-function-ptr-dereference
40+
- readability-redundant-parentheses
41+
- readability-redundant-preprocessor
42+
- readability-suspicious-call-argument
43+
- readability-uppercase-literal-suffix
44+
45+
CheckOptions:
46+
misc-header-include-cycle.IgnoredFilesList: 'curl/curl.h'
47+
48+
HeaderFilterRegex: '.*' # Default in v22.1.0+

deps/curl/COPYING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
COPYRIGHT AND PERMISSION NOTICE
22

3-
Copyright (c) 1996 - 2025, Daniel Stenberg, <daniel@haxx.se>, and many
3+
Copyright (c) 1996 - 2026, Daniel Stenberg, <daniel@haxx.se>, and many
44
contributors, see the THANKS file.
55

66
All rights reserved.

deps/curl/curl.gyp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
'lib/socks_sspi.c',
111111
'lib/splay.c',
112112
'lib/strcase.c',
113-
'lib/strdup.c',
114113
'lib/strequal.c',
115114
'lib/strerror.c',
116115
'lib/system_win32.c',
@@ -124,14 +123,17 @@
124123
'lib/urlapi.c',
125124
'lib/url.c',
126125
'lib/version.c',
126+
'lib/ws.c',
127127
'lib/curlx/base64.c',
128+
'lib/curlx/basename.c',
128129
'lib/curlx/dynbuf.c',
129130
'lib/curlx/fopen.c',
130131
'lib/curlx/inet_ntop.c',
131132
'lib/curlx/inet_pton.c',
132133
'lib/curlx/multibyte.c',
133134
'lib/curlx/nonblock.c',
134135
'lib/curlx/strcopy.c',
136+
'lib/curlx/strdup.c',
135137
'lib/curlx/strerr.c',
136138
'lib/curlx/strparse.c',
137139
'lib/curlx/timediff.c',
@@ -154,6 +156,7 @@
154156
"lib/vauth/spnego_sspi.c",
155157
"lib/vauth/vauth.c",
156158
'lib/vquic/vquic.c',
159+
'lib/vssh/vssh.c',
157160
'lib/vtls/apple.c',
158161
'lib/vtls/gtls.c',
159162
'lib/vtls/hostcheck.c',

deps/curl/include/Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ CC = @CC@
218218
CCDEPMODE = @CCDEPMODE@
219219
CFLAGS = @CFLAGS@
220220
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
221+
CLANG_TIDY = @CLANG_TIDY@
221222
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
222223
CPP = @CPP@
223224
CPPFLAGS = @CPPFLAGS@

deps/curl/include/curl/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pkginclude_HEADERS = \
2525
curl.h curlver.h easy.h mprintf.h stdcheaders.h multi.h \
2626
typecheck-gcc.h system.h urlapi.h options.h header.h websockets.h
2727

28-
pkgincludedir= $(includedir)/curl
28+
pkgincludedir = $(includedir)/curl
2929

3030
CHECKSRC = $(CS_$(V))
3131
CS_0 = @echo " RUN " $@;

deps/curl/include/curl/Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ CC = @CC@
205205
CCDEPMODE = @CCDEPMODE@
206206
CFLAGS = @CFLAGS@
207207
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
208+
CLANG_TIDY = @CLANG_TIDY@
208209
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
209210
CPP = @CPP@
210211
CPPFLAGS = @CPPFLAGS@

deps/curl/include/curl/curl.h

Lines changed: 47 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#define CURL_IGNORE_DEPRECATION(statements) statements
6060
#endif
6161

62-
#include "curlver.h" /* libcurl version defines */
62+
#include "curlver.h" /* libcurl version defines */
6363
#include "system.h" /* determine things runtime */
6464

6565
#include <stdio.h>
@@ -142,7 +142,7 @@ typedef SOCKET curl_socket_t;
142142
#define CURL_SOCKET_BAD INVALID_SOCKET
143143
#else
144144
typedef int curl_socket_t;
145-
#define CURL_SOCKET_BAD -1
145+
#define CURL_SOCKET_BAD (-1)
146146
#endif
147147
#define curl_socket_typedef
148148
#endif /* curl_socket_typedef */
@@ -820,7 +820,7 @@ typedef enum {
820820
* CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper
821821
* CURLAUTH_BEARER - HTTP Bearer token authentication
822822
* CURLAUTH_ONLY - Use together with a single other type to force no
823-
* authentication or just that single type
823+
* authentication or that single type
824824
* CURLAUTH_ANY - All fine types set
825825
* CURLAUTH_ANYSAFE - All fine types except Basic
826826
*/
@@ -842,10 +842,13 @@ typedef enum {
842842
#define CURLAUTH_BEARER (((unsigned long)1) << 6)
843843
#define CURLAUTH_AWS_SIGV4 (((unsigned long)1) << 7)
844844
#define CURLAUTH_ONLY (((unsigned long)1) << 31)
845-
#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
846-
#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE))
845+
#define CURLAUTH_ANY ((~CURLAUTH_DIGEST_IE) & \
846+
((unsigned long)0xffffffff))
847+
#define CURLAUTH_ANYSAFE ((~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE)) & \
848+
((unsigned long)0xffffffff))
847849

848-
#define CURLSSH_AUTH_ANY ~0L /* all types supported by server */
850+
/* all types supported by server */
851+
#define CURLSSH_AUTH_ANY ((unsigned long)0xffffffff)
849852
#define CURLSSH_AUTH_NONE 0L /* none allowed, silly but complete */
850853
#define CURLSSH_AUTH_PUBLICKEY (1L << 0) /* public/private key files */
851854
#define CURLSSH_AUTH_PASSWORD (1L << 1) /* password */
@@ -1100,7 +1103,8 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
11001103
#define CURLPROTO_SMBS (1L << 27)
11011104
#define CURLPROTO_MQTT (1L << 28)
11021105
#define CURLPROTO_GOPHERS (1L << 29)
1103-
#define CURLPROTO_ALL (~0L) /* enable everything */
1106+
#define CURLPROTO_ALL ((unsigned long)0xffffffff) /* old-style enable
1107+
"everything" */
11041108

11051109
/* long may be 32 or 64 bits, but we should never depend on anything else
11061110
but 32 */
@@ -1113,8 +1117,9 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
11131117
/* *STRINGPOINT is an alias for OBJECTPOINT to allow tools to extract the
11141118
string options from the header file */
11151119

1116-
#define CURLOPT(na,t,nu) na = t + nu
1117-
#define CURLOPTDEPRECATED(na,t,nu,v,m) na CURL_DEPRECATED(v,m) = t + nu
1120+
#define CURLOPT(na, t, nu) na = ((t) + (nu))
1121+
#define CURLOPTDEPRECATED(na, t, nu, v, m) na CURL_DEPRECATED(v, m) \
1122+
= ((t) + (nu))
11181123

11191124
/* CURLOPT aliases that make no runtime difference */
11201125

@@ -1244,7 +1249,7 @@ typedef enum {
12441249
CURLOPT(CURLOPT_QUOTE, CURLOPTTYPE_SLISTPOINT, 28),
12451250

12461251
/* send FILE * or void * to store headers to, if you use a callback it
1247-
is simply passed to the callback unmodified */
1252+
is passed to the callback unmodified */
12481253
CURLOPT(CURLOPT_HEADERDATA, CURLOPTTYPE_CBPOINT, 29),
12491254

12501255
/* point to a file to read the initial cookies from, also enables
@@ -1353,7 +1358,7 @@ typedef enum {
13531358

13541359
/* Set the krb4/5 security level, this also enables krb4/5 awareness. This
13551360
* is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
1356-
* is set but does not match one of these, 'private' will be used. */
1361+
* is set but does not match one of these, 'private' will be used. */
13571362
CURLOPTDEPRECATED(CURLOPT_KRBLEVEL, CURLOPTTYPE_STRINGPOINT, 63,
13581363
8.17.0, "removed"),
13591364

@@ -2119,7 +2124,7 @@ typedef enum {
21192124
/* Specify URL using CURL URL API. */
21202125
CURLOPT(CURLOPT_CURLU, CURLOPTTYPE_OBJECTPOINT, 282),
21212126

2122-
/* add trailing data just after no more data is available */
2127+
/* add trailing data after no more data is available */
21232128
CURLOPT(CURLOPT_TRAILERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 283),
21242129

21252130
/* pointer to be passed to HTTP_TRAILER_FUNCTION */
@@ -2198,7 +2203,7 @@ typedef enum {
21982203
CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256, CURLOPTTYPE_STRINGPOINT, 311),
21992204

22002205
/* Function that will be called immediately before the initial request
2201-
is made on a connection (after any protocol negotiation step). */
2206+
is made on a connection (after any protocol negotiation step). */
22022207
CURLOPT(CURLOPT_PREREQFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 312),
22032208

22042209
/* Data passed to the CURLOPT_PREREQFUNCTION callback */
@@ -2278,7 +2283,6 @@ typedef enum {
22782283
#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
22792284
#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
22802285

2281-
/* */
22822286
#define CURLOPT_FTP_RESPONSE_TIMEOUT CURLOPT_SERVER_RESPONSE_TIMEOUT
22832287

22842288
/* Added in 8.2.0 */
@@ -2352,8 +2356,8 @@ typedef enum {
23522356
Unless one is set programmatically, the
23532357
.netrc will be queried. */
23542358
enum CURL_NETRC_OPTION {
2355-
/* we set a single member here, just to make sure we still provide the enum,
2356-
but the values to use are defined above with L suffixes */
2359+
/* we set a single member here, to make sure we still provide the enum, but
2360+
the values to use are defined above with L suffixes */
23572361
CURL_NETRC_LAST = 3
23582362
};
23592363

@@ -2382,7 +2386,7 @@ enum CURL_NETRC_OPTION {
23822386
#define CURL_TLSAUTH_SRP 1L
23832387

23842388
enum CURL_TLSAUTH {
2385-
/* we set a single member here, just to make sure we still provide the enum,
2389+
/* we set a single member here, to make sure we still provide the enum,
23862390
but the values to use are defined above with L suffixes */
23872391
CURL_TLSAUTH_LAST = 2
23882392
};
@@ -2405,7 +2409,7 @@ enum CURL_TLSAUTH {
24052409
#define CURL_TIMECOND_LASTMOD 3L
24062410

24072411
typedef enum {
2408-
/* we set a single member here, just to make sure we still provide
2412+
/* we set a single member here, to make sure we still provide
24092413
the enum typedef, but the values to use are defined above with L
24102414
suffixes */
24112415
CURL_TIMECOND_LAST = 4
@@ -2704,7 +2708,7 @@ CURL_EXTERN char *curl_escape(const char *string,
27042708
*
27052709
* DESCRIPTION
27062710
*
2707-
* Unescapes URL encoding in strings (converts all %XX codes to their 8bit
2711+
* Unescapes URL encoding in strings (converts all %XX codes to their 8-bit
27082712
* versions). This function returns a new allocated string or NULL if an error
27092713
* occurred.
27102714
* Conversion Note: On non-ASCII platforms the ASCII %XX codes are
@@ -3020,9 +3024,8 @@ typedef enum {
30203024
/* Different data locks for a single share */
30213025
typedef enum {
30223026
CURL_LOCK_DATA_NONE = 0,
3023-
/* CURL_LOCK_DATA_SHARE is used internally to say that
3024-
* the locking is just made to change the internal state of the share
3025-
* itself.
3027+
/* CURL_LOCK_DATA_SHARE is used internally to say that the locking is made
3028+
* to change the internal state of the share itself.
30263029
*/
30273030
CURL_LOCK_DATA_SHARE,
30283031
CURL_LOCK_DATA_COOKIE,
@@ -3096,11 +3099,10 @@ typedef enum {
30963099
CURLVERSION_LAST /* never actually use this */
30973100
} CURLversion;
30983101

3099-
/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by
3100-
basically all programs ever that want to get version information. It is
3101-
meant to be a built-in version number for what kind of struct the caller
3102-
expects. If the struct ever changes, we redefine the NOW to another enum
3103-
from above. */
3102+
/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by programs
3103+
that want to get version information. It is meant to be a built-in
3104+
version number for what kind of struct the caller expects. If the struct
3105+
ever changes, we redefine the NOW to another enum from above. */
31043106
#define CURLVERSION_NOW CURLVERSION_TWELFTH
31053107

31063108
struct curl_version_info_data {
@@ -3183,7 +3185,8 @@ typedef struct curl_version_info_data curl_version_info_data;
31833185
supported */
31843186
#define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */
31853187
#define CURL_VERSION_CONV (1<<12) /* Character conversions supported */
3186-
#define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported */
3188+
#define CURL_VERSION_CURLDEBUG (1<<13) /* Debug memory tracking supported
3189+
(deprecated) */
31873190
#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */
31883191
#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper
31893192
is supported */
@@ -3212,7 +3215,7 @@ typedef struct curl_version_info_data curl_version_info_data;
32123215
* This function returns a pointer to a static copy of the version info
32133216
* struct. See above.
32143217
*/
3215-
CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
3218+
CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion stamp);
32163219

32173220
/*
32183221
* NAME curl_easy_strerror()
@@ -3223,7 +3226,7 @@ CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
32233226
* into the equivalent human readable error string. This is useful
32243227
* for printing meaningful error messages.
32253228
*/
3226-
CURL_EXTERN const char *curl_easy_strerror(CURLcode);
3229+
CURL_EXTERN const char *curl_easy_strerror(CURLcode error);
32273230

32283231
/*
32293232
* NAME curl_share_strerror()
@@ -3234,7 +3237,7 @@ CURL_EXTERN const char *curl_easy_strerror(CURLcode);
32343237
* into the equivalent human readable error string. This is useful
32353238
* for printing meaningful error messages.
32363239
*/
3237-
CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
3240+
CURL_EXTERN const char *curl_share_strerror(CURLSHcode error);
32383241

32393242
/*
32403243
* NAME curl_easy_pause()
@@ -3248,10 +3251,10 @@ CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
32483251
CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
32493252

32503253
#define CURLPAUSE_RECV (1 << 0)
3251-
#define CURLPAUSE_RECV_CONT (0)
3254+
#define CURLPAUSE_RECV_CONT 0
32523255

32533256
#define CURLPAUSE_SEND (1 << 2)
3254-
#define CURLPAUSE_SEND_CONT (0)
3257+
#define CURLPAUSE_SEND_CONT 0
32553258

32563259
#define CURLPAUSE_ALL (CURLPAUSE_RECV | CURLPAUSE_SEND)
32573260
#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT)
@@ -3304,7 +3307,7 @@ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
33043307
#endif
33053308

33063309
/* unfortunately, the easy.h and multi.h include files need options and info
3307-
stuff before they can be included! */
3310+
stuff before they can be included! */
33083311
#include "easy.h" /* nothing in curl is fun without the easy stuff */
33093312
#include "multi.h"
33103313
#include "urlapi.h"
@@ -3323,11 +3326,16 @@ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
33233326
#if defined(__STDC__) && (__STDC__ >= 1)
33243327
/* This preprocessor magic that replaces a call with the exact same call is
33253328
only done to make sure application authors pass exactly three arguments
3326-
to these functions. */
3327-
#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
3328-
#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
3329-
#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
3330-
#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
3329+
to these functions. Use recursive macros to allow using these symbols via
3330+
the C++ global namespace '::' or reusing them as method names. */
3331+
#define curl_easy_setopt(handle, opt, param) \
3332+
curl_easy_setopt(handle, opt, param)
3333+
#define curl_easy_getinfo(handle, info, arg) \
3334+
curl_easy_getinfo(handle, info, arg)
3335+
#define curl_share_setopt(share, opt, param) \
3336+
curl_share_setopt(share, opt, param)
3337+
#define curl_multi_setopt(handle, opt, param) \
3338+
curl_multi_setopt(handle, opt, param)
33313339
#endif /* __STDC__ >= 1 */
33323340
#endif /* gcc >= 4.3 && !__cplusplus && !CURL_DISABLE_TYPECHECK */
33333341

0 commit comments

Comments
 (0)