Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 48 additions & 0 deletions deps/curl/.clang-tidy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
---
# https://clang.llvm.org/extra/clang-tidy/

# https://clang.llvm.org/extra/clang-tidy/checks/list.html
Checks:
- clang-analyzer-*
- -clang-analyzer-optin.performance.Padding
- -clang-analyzer-security.ArrayBound # due to false positives with clang-tidy v21.1.0
- -clang-analyzer-security.insecureAPI.bzero # for FD_ZERO() (seen on macOS)
- -clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling
- -clang-diagnostic-nullability-extension
- bugprone-assert-side-effect
- bugprone-chained-comparison
- bugprone-dynamic-static-initializers
- bugprone-macro-parentheses
- bugprone-macro-repeated-side-effects
- bugprone-misplaced-operator-in-strlen-in-alloc
- bugprone-misplaced-pointer-arithmetic-in-alloc
- bugprone-not-null-terminated-result
- bugprone-posix-return
- bugprone-redundant-branch-condition
- bugprone-signed-char-misuse
- bugprone-suspicious-enum-usage
- bugprone-suspicious-memset-usage
- bugprone-suspicious-missing-comma
- bugprone-suspicious-realloc-usage
- bugprone-suspicious-semicolon
- misc-const-correctness
- misc-header-include-cycle
- portability-*
- readability-duplicate-include
- readability-math-missing-parentheses
- readability-named-parameter
- readability-redundant-control-flow
- readability-redundant-declaration
- readability-redundant-function-ptr-dereference
- readability-redundant-parentheses
- readability-redundant-preprocessor
- readability-suspicious-call-argument
- readability-uppercase-literal-suffix

CheckOptions:
misc-header-include-cycle.IgnoredFilesList: 'curl/curl.h'

HeaderFilterRegex: '.*' # Default in v22.1.0+
2 changes: 1 addition & 1 deletion deps/curl/COPYING
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
COPYRIGHT AND PERMISSION NOTICE

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

All rights reserved.
Expand Down
5 changes: 4 additions & 1 deletion deps/curl/curl.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@
'lib/socks_sspi.c',
'lib/splay.c',
'lib/strcase.c',
'lib/strdup.c',
'lib/strequal.c',
'lib/strerror.c',
'lib/system_win32.c',
Expand All @@ -124,14 +123,17 @@
'lib/urlapi.c',
'lib/url.c',
'lib/version.c',
'lib/ws.c',
'lib/curlx/base64.c',
'lib/curlx/basename.c',
'lib/curlx/dynbuf.c',
'lib/curlx/fopen.c',
'lib/curlx/inet_ntop.c',
'lib/curlx/inet_pton.c',
'lib/curlx/multibyte.c',
'lib/curlx/nonblock.c',
'lib/curlx/strcopy.c',
'lib/curlx/strdup.c',
'lib/curlx/strerr.c',
'lib/curlx/strparse.c',
'lib/curlx/timediff.c',
Expand All @@ -154,6 +156,7 @@
"lib/vauth/spnego_sspi.c",
"lib/vauth/vauth.c",
'lib/vquic/vquic.c',
'lib/vssh/vssh.c',
'lib/vtls/apple.c',
'lib/vtls/gtls.c',
'lib/vtls/hostcheck.c',
Expand Down
1 change: 1 addition & 0 deletions deps/curl/include/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
CLANG_TIDY = @CLANG_TIDY@
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
Expand Down
2 changes: 1 addition & 1 deletion deps/curl/include/curl/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pkginclude_HEADERS = \
curl.h curlver.h easy.h mprintf.h stdcheaders.h multi.h \
typecheck-gcc.h system.h urlapi.h options.h header.h websockets.h

pkgincludedir= $(includedir)/curl
pkgincludedir = $(includedir)/curl

CHECKSRC = $(CS_$(V))
CS_0 = @echo " RUN " $@;
Expand Down
1 change: 1 addition & 0 deletions deps/curl/include/curl/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
CLANG_TIDY = @CLANG_TIDY@
CONFIGURE_OPTIONS = @CONFIGURE_OPTIONS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
Expand Down
86 changes: 47 additions & 39 deletions deps/curl/include/curl/curl.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#define CURL_IGNORE_DEPRECATION(statements) statements
#endif

#include "curlver.h" /* libcurl version defines */
#include "curlver.h" /* libcurl version defines */
#include "system.h" /* determine things runtime */

#include <stdio.h>
Expand Down Expand Up @@ -142,7 +142,7 @@ typedef SOCKET curl_socket_t;
#define CURL_SOCKET_BAD INVALID_SOCKET
#else
typedef int curl_socket_t;
#define CURL_SOCKET_BAD -1
#define CURL_SOCKET_BAD (-1)
#endif
#define curl_socket_typedef
#endif /* curl_socket_typedef */
Expand Down Expand Up @@ -820,7 +820,7 @@ typedef enum {
* CURLAUTH_NTLM_WB - HTTP NTLM authentication delegated to winbind helper
* CURLAUTH_BEARER - HTTP Bearer token authentication
* CURLAUTH_ONLY - Use together with a single other type to force no
* authentication or just that single type
* authentication or that single type
* CURLAUTH_ANY - All fine types set
* CURLAUTH_ANYSAFE - All fine types except Basic
*/
Expand All @@ -842,10 +842,13 @@ typedef enum {
#define CURLAUTH_BEARER (((unsigned long)1) << 6)
#define CURLAUTH_AWS_SIGV4 (((unsigned long)1) << 7)
#define CURLAUTH_ONLY (((unsigned long)1) << 31)
#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE)
#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE))
#define CURLAUTH_ANY ((~CURLAUTH_DIGEST_IE) & \
((unsigned long)0xffffffff))
#define CURLAUTH_ANYSAFE ((~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE)) & \
((unsigned long)0xffffffff))

#define CURLSSH_AUTH_ANY ~0L /* all types supported by server */
/* all types supported by server */
#define CURLSSH_AUTH_ANY ((unsigned long)0xffffffff)
#define CURLSSH_AUTH_NONE 0L /* none allowed, silly but complete */
#define CURLSSH_AUTH_PUBLICKEY (1L << 0) /* public/private key files */
#define CURLSSH_AUTH_PASSWORD (1L << 1) /* password */
Expand Down Expand Up @@ -1100,7 +1103,8 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
#define CURLPROTO_SMBS (1L << 27)
#define CURLPROTO_MQTT (1L << 28)
#define CURLPROTO_GOPHERS (1L << 29)
#define CURLPROTO_ALL (~0L) /* enable everything */
#define CURLPROTO_ALL ((unsigned long)0xffffffff) /* old-style enable
"everything" */

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

#define CURLOPT(na,t,nu) na = t + nu
#define CURLOPTDEPRECATED(na,t,nu,v,m) na CURL_DEPRECATED(v,m) = 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 runtime difference */

Expand Down Expand Up @@ -1244,7 +1249,7 @@ typedef enum {
CURLOPT(CURLOPT_QUOTE, CURLOPTTYPE_SLISTPOINT, 28),

/* send FILE * or void * to store headers to, if you use a callback it
is simply passed to the callback unmodified */
is passed to the callback unmodified */
CURLOPT(CURLOPT_HEADERDATA, CURLOPTTYPE_CBPOINT, 29),

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

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

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

/* add trailing data just after no more data is available */
/* add trailing data after no more data is available */
CURLOPT(CURLOPT_TRAILERFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 283),

/* pointer to be passed to HTTP_TRAILER_FUNCTION */
Expand Down Expand Up @@ -2198,7 +2203,7 @@ typedef enum {
CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256, CURLOPTTYPE_STRINGPOINT, 311),

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

/* Data passed to the CURLOPT_PREREQFUNCTION callback */
Expand Down Expand Up @@ -2278,7 +2283,6 @@ typedef enum {
#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL

/* */
#define CURLOPT_FTP_RESPONSE_TIMEOUT CURLOPT_SERVER_RESPONSE_TIMEOUT

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

Expand Down Expand Up @@ -2382,7 +2386,7 @@ enum CURL_NETRC_OPTION {
#define CURL_TLSAUTH_SRP 1L

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

typedef enum {
/* we set a single member here, just to make sure we still provide
/* we set a single member here, to make sure we still provide
the enum typedef, but the values to use are defined above with L
suffixes */
CURL_TIMECOND_LAST = 4
Expand Down Expand Up @@ -2704,7 +2708,7 @@ CURL_EXTERN char *curl_escape(const char *string,
*
* DESCRIPTION
*
* Unescapes URL encoding in strings (converts all %XX codes to their 8bit
* Unescapes URL encoding in strings (converts all %XX codes to their 8-bit
* versions). This function returns a new allocated string or NULL if an error
* occurred.
* Conversion Note: On non-ASCII platforms the ASCII %XX codes are
Expand Down Expand Up @@ -3020,9 +3024,8 @@ typedef enum {
/* Different data locks for a single share */
typedef enum {
CURL_LOCK_DATA_NONE = 0,
/* CURL_LOCK_DATA_SHARE is used internally to say that
* the locking is just made to change the internal state of the share
* itself.
/* CURL_LOCK_DATA_SHARE is used internally to say that the locking is made
* to change the internal state of the share itself.
*/
CURL_LOCK_DATA_SHARE,
CURL_LOCK_DATA_COOKIE,
Expand Down Expand Up @@ -3096,11 +3099,10 @@ typedef enum {
CURLVERSION_LAST /* never actually use this */
} CURLversion;

/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by
basically all programs ever that want to get version information. It is
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
from above. */
/* The 'CURLVERSION_NOW' is the symbolic name meant to be used by programs
that want to get version information. It is 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 from above. */
#define CURLVERSION_NOW CURLVERSION_TWELFTH

struct curl_version_info_data {
Expand Down Expand Up @@ -3183,7 +3185,8 @@ typedef struct curl_version_info_data curl_version_info_data;
supported */
#define CURL_VERSION_SSPI (1<<11) /* Built against Windows SSPI */
#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
(deprecated) */
#define CURL_VERSION_TLSAUTH_SRP (1<<14) /* TLS-SRP auth is supported */
#define CURL_VERSION_NTLM_WB (1<<15) /* NTLM delegation to winbind helper
is supported */
Expand Down Expand Up @@ -3212,7 +3215,7 @@ typedef struct curl_version_info_data curl_version_info_data;
* This function returns a pointer to a static copy of the version info
* struct. See above.
*/
CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion);
CURL_EXTERN curl_version_info_data *curl_version_info(CURLversion stamp);

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

/*
* NAME curl_share_strerror()
Expand All @@ -3234,7 +3237,7 @@ CURL_EXTERN const char *curl_easy_strerror(CURLcode);
* into the equivalent human readable error string. This is useful
* for printing meaningful error messages.
*/
CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
CURL_EXTERN const char *curl_share_strerror(CURLSHcode error);

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

#define CURLPAUSE_RECV (1 << 0)
#define CURLPAUSE_RECV_CONT (0)
#define CURLPAUSE_RECV_CONT 0

#define CURLPAUSE_SEND (1 << 2)
#define CURLPAUSE_SEND_CONT (0)
#define CURLPAUSE_SEND_CONT 0

#define CURLPAUSE_ALL (CURLPAUSE_RECV | CURLPAUSE_SEND)
#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT | CURLPAUSE_SEND_CONT)
Expand Down Expand Up @@ -3304,7 +3307,7 @@ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
#endif

/* unfortunately, the easy.h and multi.h include files need options and info
stuff before they can be included! */
stuff before they can be included! */
#include "easy.h" /* nothing in curl is fun without the easy stuff */
#include "multi.h"
#include "urlapi.h"
Expand All @@ -3323,11 +3326,16 @@ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
#if defined(__STDC__) && (__STDC__ >= 1)
/* This preprocessor magic that replaces a call with the exact same call is
only done to make sure application authors pass exactly three arguments
to these functions. */
#define curl_easy_setopt(handle,opt,param) curl_easy_setopt(handle,opt,param)
#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
#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)
to these functions. Use recursive macros to allow using these symbols via
the C++ global namespace '::' or reusing them as method names. */
#define curl_easy_setopt(handle, opt, param) \
curl_easy_setopt(handle, opt, param)
#define curl_easy_getinfo(handle, info, arg) \
curl_easy_getinfo(handle, info, arg)
#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)
#endif /* __STDC__ >= 1 */
#endif /* gcc >= 4.3 && !__cplusplus && !CURL_DISABLE_TYPECHECK */

Expand Down
Loading
Loading