diff options
Diffstat (limited to 'libs/libcurl/include')
-rw-r--r-- | libs/libcurl/include/curl/curl.h | 258 | ||||
-rw-r--r-- | libs/libcurl/include/curl/curlver.h | 10 | ||||
-rw-r--r-- | libs/libcurl/include/curl/easy.h | 2 | ||||
-rw-r--r-- | libs/libcurl/include/curl/system.h | 168 | ||||
-rw-r--r-- | libs/libcurl/include/curl/typecheck-gcc.h | 547 | ||||
-rw-r--r-- | libs/libcurl/include/curl/websockets.h | 3 |
6 files changed, 590 insertions, 398 deletions
diff --git a/libs/libcurl/include/curl/curl.h b/libs/libcurl/include/curl/curl.h index e4a4d972c6..039f688be8 100644 --- a/libs/libcurl/include/curl/curl.h +++ b/libs/libcurl/include/curl/curl.h @@ -42,7 +42,7 @@ !defined(CURL_DISABLE_DEPRECATION) && !defined(BUILDING_LIBCURL)
#define CURL_DEPRECATED(version, message) \
__attribute__((deprecated("since " # version ". " message)))
-#if defined(__IAR_SYSTEMS_ICC__)
+#ifdef __IAR_SYSTEMS_ICC__
#define CURL_IGNORE_DEPRECATION(statements) \
_Pragma("diag_suppress=Pe1444") \
statements \
@@ -97,19 +97,11 @@ #include <sys/select.h>
#endif
-#if !defined(_WIN32) && !defined(_WIN32_WCE)
+#ifndef _WIN32
#include <sys/socket.h>
-#endif
-
-#if !defined(_WIN32)
#include <sys/time.h>
#endif
-/* Compatibility for non-Clang compilers */
-#ifndef __has_declspec_attribute
-# define __has_declspec_attribute(x) 0
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -121,11 +113,17 @@ typedef void CURLSH; * libcurl external API function linkage decorations.
*/
+#ifdef __has_declspec_attribute
+#define CURL_HAS_DECLSPEC_ATTRIBUTE(x) __has_declspec_attribute(x)
+#else
+#define CURL_HAS_DECLSPEC_ATTRIBUTE(x) 0
+#endif
+
#ifdef CURL_STATICLIB
# define CURL_EXTERN
#elif defined(_WIN32) || \
- (__has_declspec_attribute(dllexport) && \
- __has_declspec_attribute(dllimport))
+ (CURL_HAS_DECLSPEC_ATTRIBUTE(dllexport) && \
+ CURL_HAS_DECLSPEC_ATTRIBUTE(dllimport))
# if defined(BUILDING_LIBCURL)
# define CURL_EXTERN __declspec(dllexport)
# else
@@ -177,6 +175,16 @@ typedef enum { #define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL
#define CURLSSLBACKEND_DARWINSSL CURLSSLBACKEND_SECURETRANSPORT
+/* bits for the CURLOPT_FOLLOWLOCATION option */
+#define CURLFOLLOW_ALL 1L /* generic follow redirects */
+
+/* Do not use the custom method in the follow-up request if the HTTP code
+ instructs so (301, 302, 303). */
+#define CURLFOLLOW_OBEYCODE 2L
+
+/* Only use the custom method in the first request, always reset in the next */
+#define CURLFOLLOW_FIRSTONLY 3L
+
struct curl_httppost {
struct curl_httppost *next; /* next entry in the list */
char *name; /* pointer to allocated name */
@@ -551,14 +559,14 @@ typedef enum { CURLE_FTP_COULDNT_USE_REST, /* 31 - the REST command failed */
CURLE_OBSOLETE32, /* 32 - NOT USED */
CURLE_RANGE_ERROR, /* 33 - RANGE "command" did not work */
- CURLE_HTTP_POST_ERROR, /* 34 */
+ CURLE_OBSOLETE34, /* 34 */
CURLE_SSL_CONNECT_ERROR, /* 35 - wrong when connecting with SSL */
CURLE_BAD_DOWNLOAD_RESUME, /* 36 - could not resume download */
CURLE_FILE_COULDNT_READ_FILE, /* 37 */
CURLE_LDAP_CANNOT_BIND, /* 38 */
CURLE_LDAP_SEARCH_FAILED, /* 39 */
CURLE_OBSOLETE40, /* 40 - NOT USED */
- CURLE_FUNCTION_NOT_FOUND, /* 41 - NOT USED starting with 7.53.0 */
+ CURLE_OBSOLETE41, /* 41 - NOT USED starting with 7.53.0 */
CURLE_ABORTED_BY_CALLBACK, /* 42 */
CURLE_BAD_FUNCTION_ARGUMENT, /* 43 */
CURLE_OBSOLETE44, /* 44 - NOT USED */
@@ -637,12 +645,31 @@ typedef enum { CURLE_UNRECOVERABLE_POLL, /* 99 - poll/select returned fatal error */
CURLE_TOO_LARGE, /* 100 - a value/data met its maximum */
CURLE_ECH_REQUIRED, /* 101 - ECH tried but failed */
- CURL_LAST /* never use! */
+ CURL_LAST, /* never use! */
+
+ CURLE_RESERVED115 = 115, /* 115-126 - used in tests */
+ CURLE_RESERVED116 = 116,
+ CURLE_RESERVED117 = 117,
+ CURLE_RESERVED118 = 118,
+ CURLE_RESERVED119 = 119,
+ CURLE_RESERVED120 = 120,
+ CURLE_RESERVED121 = 121,
+ CURLE_RESERVED122 = 122,
+ CURLE_RESERVED123 = 123,
+ CURLE_RESERVED124 = 124,
+ CURLE_RESERVED125 = 125,
+ CURLE_RESERVED126 = 126
} CURLcode;
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
the obsolete stuff removed! */
+/* removed in 7.53.0 */
+#define CURLE_FUNCTION_NOT_FOUND CURLE_OBSOLETE41
+
+/* removed in 7.56.0 */
+#define CURLE_HTTP_POST_ERROR CURLE_OBSOLETE34
+
/* Previously obsolete error code reused in 7.38.0 */
#define CURLE_OBSOLETE16 CURLE_HTTP2
@@ -900,12 +927,13 @@ typedef int /* parameter for the CURLOPT_USE_SSL option */
+#define CURLUSESSL_NONE 0L /* do not attempt to use SSL */
+#define CURLUSESSL_TRY 1L /* try using SSL, proceed anyway otherwise */
+#define CURLUSESSL_CONTROL 2L /* SSL for the control connection or fail */
+#define CURLUSESSL_ALL 3L /* SSL for all communication or fail */
+
typedef enum {
- CURLUSESSL_NONE, /* do not attempt to use SSL */
- CURLUSESSL_TRY, /* try using SSL, proceed anyway otherwise */
- CURLUSESSL_CONTROL, /* SSL for the control connection or fail */
- CURLUSESSL_ALL, /* SSL for all communication or fail */
- CURLUSESSL_LAST /* not an option, never use */
+ CURLUSESSL_LAST = 4 /* not an option, never use */
} curl_usessl;
/* Definition of bits for the CURLOPT_SSL_OPTIONS argument: */
@@ -1009,6 +1037,12 @@ typedef enum { #define CURLALTSVC_H2 (1<<4)
#define CURLALTSVC_H3 (1<<5)
+/* bitmask values for CURLOPT_UPLOAD_FLAGS */
+#define CURLULFLAG_ANSWERED (1L<<0)
+#define CURLULFLAG_DELETED (1L<<1)
+#define CURLULFLAG_DRAFT (1L<<2)
+#define CURLULFLAG_FLAGGED (1L<<3)
+#define CURLULFLAG_SEEN (1L<<4)
struct curl_hstsentry {
char *name;
@@ -1953,10 +1987,10 @@ typedef enum { /* Set stream weight, 1 - 256 (default is 16) */
CURLOPT(CURLOPT_STREAM_WEIGHT, CURLOPTTYPE_LONG, 239),
- /* Set stream dependency on another CURL handle */
+ /* Set stream dependency on another curl handle */
CURLOPT(CURLOPT_STREAM_DEPENDS, CURLOPTTYPE_OBJECTPOINT, 240),
- /* Set E-xclusive stream dependency on another CURL handle */
+ /* Set E-xclusive stream dependency on another curl handle */
CURLOPT(CURLOPT_STREAM_DEPENDS_E, CURLOPTTYPE_OBJECTPOINT, 241),
/* Do not send any tftp option requests to the server */
@@ -2222,6 +2256,11 @@ typedef enum { /* maximum number of keepalive probes (Linux, *BSD, macOS, etc.) */
CURLOPT(CURLOPT_TCP_KEEPCNT, CURLOPTTYPE_LONG, 326),
+ CURLOPT(CURLOPT_UPLOAD_FLAGS, CURLOPTTYPE_LONG, 327),
+
+ /* set TLS supported signature algorithms */
+ CURLOPT(CURLOPT_SSL_SIGNATURE_ALGORITHMS, CURLOPTTYPE_STRINGPOINT, 328),
+
CURLOPT_LASTENTRY /* the last unused */
} CURLoption;
@@ -2270,26 +2309,25 @@ typedef enum { /* Convenient "aliases" */
#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER
- /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
-enum {
- CURL_HTTP_VERSION_NONE, /* setting this means we do not care, and that we
- would like the library to choose the best
- possible for us! */
- CURL_HTTP_VERSION_1_0, /* please use HTTP 1.0 in the request */
- CURL_HTTP_VERSION_1_1, /* please use HTTP 1.1 in the request */
- CURL_HTTP_VERSION_2_0, /* please use HTTP 2 in the request */
- CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
- CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1
- Upgrade */
- CURL_HTTP_VERSION_3 = 30, /* Use HTTP/3, fallback to HTTP/2 or HTTP/1 if
- needed. For HTTPS only. For HTTP, this option
- makes libcurl return error. */
- CURL_HTTP_VERSION_3ONLY = 31, /* Use HTTP/3 without fallback. For HTTPS
- only. For HTTP, this makes libcurl
- return error. */
-
- CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
-};
+/* These constants are for use with the CURLOPT_HTTP_VERSION option. */
+#define CURL_HTTP_VERSION_NONE 0L /* setting this means we do not care, and
+ that we would like the library to choose
+ the best possible for us! */
+#define CURL_HTTP_VERSION_1_0 1L /* please use HTTP 1.0 in the request */
+#define CURL_HTTP_VERSION_1_1 2L /* please use HTTP 1.1 in the request */
+#define CURL_HTTP_VERSION_2_0 3L /* please use HTTP 2 in the request */
+#define CURL_HTTP_VERSION_2TLS 4L /* use version 2 for HTTPS, version 1.1 for
+ HTTP */
+#define CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE 5L /* please use HTTP 2 without
+ HTTP/1.1 Upgrade */
+#define CURL_HTTP_VERSION_3 30L /* Use HTTP/3, fallback to HTTP/2 or
+ HTTP/1 if needed. For HTTPS only. For
+ HTTP, this option makes libcurl
+ return error. */
+#define CURL_HTTP_VERSION_3ONLY 31L /* Use HTTP/3 without fallback. For
+ HTTPS only. For HTTP, this makes
+ libcurl return error. */
+#define CURL_HTTP_VERSION_LAST 32L /* *ILLEGAL* http version */
/* Convenience definition simple because the name of the version is HTTP/2 and
not 2.0. The 2_0 version of the enum name was set while the version was
@@ -2299,32 +2337,33 @@ enum { /*
* Public API enums for RTSP requests
*/
-enum {
- CURL_RTSPREQ_NONE, /* first in list */
- CURL_RTSPREQ_OPTIONS,
- CURL_RTSPREQ_DESCRIBE,
- CURL_RTSPREQ_ANNOUNCE,
- CURL_RTSPREQ_SETUP,
- CURL_RTSPREQ_PLAY,
- CURL_RTSPREQ_PAUSE,
- CURL_RTSPREQ_TEARDOWN,
- CURL_RTSPREQ_GET_PARAMETER,
- CURL_RTSPREQ_SET_PARAMETER,
- CURL_RTSPREQ_RECORD,
- CURL_RTSPREQ_RECEIVE,
- CURL_RTSPREQ_LAST /* last in list */
-};
+
+#define CURL_RTSPREQ_NONE 0L
+#define CURL_RTSPREQ_OPTIONS 1L
+#define CURL_RTSPREQ_DESCRIBE 2L
+#define CURL_RTSPREQ_ANNOUNCE 3L
+#define CURL_RTSPREQ_SETUP 4L
+#define CURL_RTSPREQ_PLAY 5L
+#define CURL_RTSPREQ_PAUSE 6L
+#define CURL_RTSPREQ_TEARDOWN 7L
+#define CURL_RTSPREQ_GET_PARAMETER 8L
+#define CURL_RTSPREQ_SET_PARAMETER 9L
+#define CURL_RTSPREQ_RECORD 10L
+#define CURL_RTSPREQ_RECEIVE 11L
+#define CURL_RTSPREQ_LAST 12L /* not used */
/* These enums are for use with the CURLOPT_NETRC option. */
+#define CURL_NETRC_IGNORED 0L /* The .netrc will never be read.
+ This is the default. */
+#define CURL_NETRC_OPTIONAL 1L /* A user:password in the URL will be preferred
+ to one in the .netrc. */
+#define CURL_NETRC_REQUIRED 2L /* A user:password in the URL will be ignored.
+ Unless one is set programmatically, the
+ .netrc will be queried. */
enum CURL_NETRC_OPTION {
- CURL_NETRC_IGNORED, /* The .netrc will never be read.
- * This is the default. */
- CURL_NETRC_OPTIONAL, /* A user:password in the URL will be preferred
- * to one in the .netrc. */
- CURL_NETRC_REQUIRED, /* A user:password in the URL will be ignored.
- * Unless one is set programmatically, the .netrc
- * will be queried. */
- CURL_NETRC_LAST
+ /* 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 */
+ CURL_NETRC_LAST = 3
};
#define CURL_SSLVERSION_DEFAULT 0
@@ -2348,10 +2387,13 @@ enum CURL_NETRC_OPTION { /* never use, keep last */
#define CURL_SSLVERSION_MAX_LAST (CURL_SSLVERSION_LAST << 16)
+#define CURL_TLSAUTH_NONE 0L
+#define CURL_TLSAUTH_SRP 1L
+
enum CURL_TLSAUTH {
- CURL_TLSAUTH_NONE,
- CURL_TLSAUTH_SRP,
- CURL_TLSAUTH_LAST /* never use, keep last */
+ /* 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 */
+ CURL_TLSAUTH_LAST = 2
};
/* symbols to use with CURLOPT_POSTREDIR.
@@ -2366,14 +2408,16 @@ enum CURL_TLSAUTH { #define CURL_REDIR_POST_ALL \
(CURL_REDIR_POST_301|CURL_REDIR_POST_302|CURL_REDIR_POST_303)
-typedef enum {
- CURL_TIMECOND_NONE,
-
- CURL_TIMECOND_IFMODSINCE,
- CURL_TIMECOND_IFUNMODSINCE,
- CURL_TIMECOND_LASTMOD,
+#define CURL_TIMECOND_NONE 0L
+#define CURL_TIMECOND_IFMODSINCE 1L
+#define CURL_TIMECOND_IFUNMODSINCE 2L
+#define CURL_TIMECOND_LASTMOD 3L
- CURL_TIMECOND_LAST
+typedef enum {
+ /* we set a single member here, just to make sure we still provide
+ the enum typedef, but the values to use are defined above with L
+ suffixes */
+ CURL_TIMECOND_LAST = 4
} curl_TimeCond;
/* Special size_t value signaling a null-terminated string. */
@@ -2769,17 +2813,17 @@ struct curl_slist { * *before* curl_global_init().
*
* The backend can be identified by the id (e.g. CURLSSLBACKEND_OPENSSL). The
- * backend can also be specified via the name parameter (passing -1 as id).
- * If both id and name are specified, the name will be ignored. If neither id
- * nor name are specified, the function will fail with
- * CURLSSLSET_UNKNOWN_BACKEND and set the "avail" pointer to the
- * NULL-terminated list of available backends.
+ * backend can also be specified via the name parameter (passing -1 as id). If
+ * both id and name are specified, the name will be ignored. If neither id nor
+ * name are specified, the function will fail with CURLSSLSET_UNKNOWN_BACKEND
+ * and set the "avail" pointer to the NULL-terminated list of available
+ * backends.
*
* Upon success, the function returns CURLSSLSET_OK.
*
* If the specified SSL backend is not available, the function returns
- * CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a NULL-terminated
- * list of available SSL backends.
+ * CURLSSLSET_UNKNOWN_BACKEND and sets the "avail" pointer to a
+ * NULL-terminated list of available SSL backends.
*
* The SSL backend can be set only once. If it has already been set, a
* subsequent attempt to change it will result in a CURLSSLSET_TOO_LATE.
@@ -2953,7 +2997,9 @@ typedef enum { CURLINFO_USED_PROXY = CURLINFO_LONG + 66,
CURLINFO_POSTTRANSFER_TIME_T = CURLINFO_OFF_T + 67,
CURLINFO_EARLYDATA_SENT_T = CURLINFO_OFF_T + 68,
- CURLINFO_LASTONE = 68
+ CURLINFO_HTTPAUTH_USED = CURLINFO_LONG + 69,
+ CURLINFO_PROXYAUTH_USED = CURLINFO_LONG + 70,
+ CURLINFO_LASTONE = 70
} CURLINFO;
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
@@ -3224,6 +3270,50 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); #define CURLPAUSE_ALL (CURLPAUSE_RECV|CURLPAUSE_SEND)
#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)
+/*
+ * NAME curl_easy_ssls_import()
+ *
+ * DESCRIPTION
+ *
+ * The curl_easy_ssls_import function adds a previously exported SSL session
+ * to the SSL session cache of the easy handle (or the underlying share).
+ */
+CURL_EXTERN CURLcode curl_easy_ssls_import(CURL *handle,
+ const char *session_key,
+ const unsigned char *shmac,
+ size_t shmac_len,
+ const unsigned char *sdata,
+ size_t sdata_len);
+
+/* This is the curl_ssls_export_cb callback prototype. It
+ * is passed to curl_easy_ssls_export() to extract SSL sessions/tickets. */
+typedef CURLcode curl_ssls_export_cb(CURL *handle,
+ void *userptr,
+ const char *session_key,
+ const unsigned char *shmac,
+ size_t shmac_len,
+ const unsigned char *sdata,
+ size_t sdata_len,
+ curl_off_t valid_until,
+ int ietf_tls_id,
+ const char *alpn,
+ size_t earlydata_max);
+
+/*
+ * NAME curl_easy_ssls_export()
+ *
+ * DESCRIPTION
+ *
+ * The curl_easy_ssls_export function iterates over all SSL sessions stored
+ * in the easy handle (or underlying share) and invokes the passed
+ * callback.
+ *
+ */
+CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
+ curl_ssls_export_cb *export_fn,
+ void *userptr);
+
+
#ifdef __cplusplus
} /* end of extern "C" */
#endif
@@ -3236,9 +3326,7 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask); #include "options.h"
#include "header.h"
#include "websockets.h"
-#ifndef CURL_SKIP_INCLUDE_MPRINTF
#include "mprintf.h"
-#endif
/* the typechecker does not work in C++ (yet) */
#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
diff --git a/libs/libcurl/include/curl/curlver.h b/libs/libcurl/include/curl/curlver.h index 7efc6c21b9..1514abefb2 100644 --- a/libs/libcurl/include/curl/curlver.h +++ b/libs/libcurl/include/curl/curlver.h @@ -32,13 +32,13 @@ /* This is the version number of the libcurl package from which this header
file origins: */
-#define LIBCURL_VERSION "8.11.0"
+#define LIBCURL_VERSION "8.14.1"
/* The numeric version number is also available "in parts" by using these
defines: */
#define LIBCURL_VERSION_MAJOR 8
-#define LIBCURL_VERSION_MINOR 11
-#define LIBCURL_VERSION_PATCH 0
+#define LIBCURL_VERSION_MINOR 14
+#define LIBCURL_VERSION_PATCH 1
/* This is the numeric version of the libcurl version number, meant for easier
parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will
@@ -59,7 +59,7 @@ CURL_VERSION_BITS() macro since curl's own configure script greps for it
and needs it to contain the full number.
*/
-#define LIBCURL_VERSION_NUM 0x080b00
+#define LIBCURL_VERSION_NUM 0x080e01
/*
* This is the date and time when the full source package was created. The
@@ -70,7 +70,7 @@ *
* "2007-11-23"
*/
-#define LIBCURL_TIMESTAMP "2024-11-06"
+#define LIBCURL_TIMESTAMP "2025-06-04"
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
#define CURL_AT_LEAST_VERSION(x,y,z) \
diff --git a/libs/libcurl/include/curl/easy.h b/libs/libcurl/include/curl/easy.h index f21588d820..81c4b0f386 100644 --- a/libs/libcurl/include/curl/easy.h +++ b/libs/libcurl/include/curl/easy.h @@ -78,7 +78,7 @@ CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl); *
* DESCRIPTION
*
- * Re-initializes a CURL handle to the default values. This puts back the
+ * Re-initializes a curl handle to the default values. This puts back the
* handle to the same state as it was in when it was just created.
*
* It does keep: live connections, the Session ID cache, the DNS cache and the
diff --git a/libs/libcurl/include/curl/system.h b/libs/libcurl/include/curl/system.h index 58e95943af..25a6b1a997 100644 --- a/libs/libcurl/include/curl/system.h +++ b/libs/libcurl/include/curl/system.h @@ -36,13 +36,10 @@ * curl_off_t
* ----------
*
- * For any given platform/compiler curl_off_t must be typedef'ed to a 64-bit
+ * For any given platform/compiler curl_off_t MUST be typedef'ed to a 64-bit
* wide signed integral data type. The width of this data type must remain
* constant and independent of any possible large file support settings.
*
- * As an exception to the above, curl_off_t shall be typedef'ed to a 32-bit
- * wide signed integral data type if there is no 64-bit type.
- *
* As a general rule, curl_off_t shall not be mapped to off_t. This rule shall
* only be violated if off_t is the only 64-bit data type available and the
* size of off_t is independent of large file support settings. Keep your
@@ -52,62 +49,24 @@ *
*/
-#if defined(__DJGPP__) || defined(__GO32__)
-# if defined(__DJGPP__) && (__DJGPP__ > 1)
-# 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 int
-
-#elif defined(__SALFORDC__)
-# 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
+#ifdef __DJGPP__
+# 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
# define CURL_TYPEOF_CURL_SOCKLEN_T int
#elif defined(__BORLANDC__)
-# if (__BORLANDC__ < 0x520)
-# 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
-# else
-# define CURL_TYPEOF_CURL_OFF_T __int64
-# define CURL_FORMAT_CURL_OFF_T "I64d"
-# define CURL_FORMAT_CURL_OFF_TU "I64u"
-# define CURL_SUFFIX_CURL_OFF_T i64
-# define CURL_SUFFIX_CURL_OFF_TU ui64
-# endif
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-
-#elif defined(__TURBOC__)
-# 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
+# define CURL_TYPEOF_CURL_OFF_T __int64
+# define CURL_FORMAT_CURL_OFF_T "I64d"
+# define CURL_FORMAT_CURL_OFF_TU "I64u"
+# define CURL_SUFFIX_CURL_OFF_T i64
+# define CURL_SUFFIX_CURL_OFF_TU ui64
# define CURL_TYPEOF_CURL_SOCKLEN_T int
#elif defined(__POCC__)
-# if (__POCC__ < 280)
-# 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
-# elif defined(_MSC_VER)
+# if defined(_MSC_VER)
# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
@@ -159,23 +118,38 @@ # 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_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
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
-# endif
+# if !defined(__LP64)
+# 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
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# 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
+# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
+# endif
-#elif defined(_WIN32_WCE)
-# define CURL_TYPEOF_CURL_OFF_T __int64
-# define CURL_FORMAT_CURL_OFF_T "I64d"
-# define CURL_FORMAT_CURL_OFF_TU "I64u"
-# define CURL_SUFFIX_CURL_OFF_T i64
-# define CURL_SUFFIX_CURL_OFF_TU ui64
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
+#elif defined(UNDER_CE)
+# if defined(__MINGW32CE__)
+# 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
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# else
+# define CURL_TYPEOF_CURL_OFF_T __int64
+# define CURL_FORMAT_CURL_OFF_T "I64d"
+# define CURL_FORMAT_CURL_OFF_TU "I64u"
+# define CURL_SUFFIX_CURL_OFF_T i64
+# define CURL_SUFFIX_CURL_OFF_TU ui64
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# endif
#elif defined(__MINGW32__)
# include <inttypes.h>
@@ -220,13 +194,7 @@ # define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
-# elif defined(_LP64)
-# 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
-# else
+# else /* _LP64 and default */
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
@@ -239,22 +207,13 @@ #elif defined(__370__)
# if defined(__IBMC__) || defined(__IBMCPP__)
-# if defined(_ILP32)
-# elif defined(_LP64)
-# endif
# if defined(_LONG_LONG)
# 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
-# elif defined(_LP64)
-# 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
-# else
+# else /* _LP64 and default */
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
@@ -349,24 +308,15 @@ #elif defined(_MSC_VER)
# if (_MSC_VER >= 1800)
# include <inttypes.h>
-# define CURL_TYPEOF_CURL_OFF_T __int64
# define CURL_FORMAT_CURL_OFF_T PRId64
# define CURL_FORMAT_CURL_OFF_TU PRIu64
-# define CURL_SUFFIX_CURL_OFF_T i64
-# define CURL_SUFFIX_CURL_OFF_TU ui64
-# elif (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
-# define CURL_TYPEOF_CURL_OFF_T __int64
+# else
# define CURL_FORMAT_CURL_OFF_T "I64d"
# define CURL_FORMAT_CURL_OFF_TU "I64u"
-# define CURL_SUFFIX_CURL_OFF_T i64
-# define CURL_SUFFIX_CURL_OFF_TU ui64
-# 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_OFF_T __int64
+# define CURL_SUFFIX_CURL_OFF_T i64
+# define CURL_SUFFIX_CURL_OFF_TU ui64
# define CURL_TYPEOF_CURL_SOCKLEN_T int
/* ===================================== */
@@ -386,6 +336,8 @@ # define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
+# define CURL_POPCOUNT64(x) __builtin_popcountll(x)
+# define CURL_CTZ64(x) __builtin_ctzll(x)
# elif defined(__LP64__) || \
defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) || \
defined(__e2k__) || \
@@ -396,6 +348,8 @@ # define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
+# define CURL_POPCOUNT64(x) __builtin_popcountl(x)
+# define CURL_CTZ64(x) __builtin_ctzl(x)
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
# define CURL_PULL_SYS_TYPES_H 1
@@ -403,12 +357,12 @@ #else
/* generic "safe guess" on old 32-bit style */
-# 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
-# define CURL_TYPEOF_CURL_SOCKLEN_T int
+# 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
+# define CURL_TYPEOF_CURL_SOCKLEN_T int
#endif
#ifdef _AIX
@@ -462,7 +416,7 @@ #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \
defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \
- defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \
+ defined(__POCC__) || defined(__HIGHC__) || \
defined(__ILEC400__)
/* This compiler is believed to have an ISO compatible preprocessor */
#define CURL_ISOCPP
diff --git a/libs/libcurl/include/curl/typecheck-gcc.h b/libs/libcurl/include/curl/typecheck-gcc.h index 909fc6b7ff..4ef2b2f3ad 100644 --- a/libs/libcurl/include/curl/typecheck-gcc.h +++ b/libs/libcurl/include/curl/typecheck-gcc.h @@ -40,115 +40,157 @@ * To add an option that uses the same type as an existing option, you will
* just need to extend the appropriate _curl_*_option macro
*/
+
#define curl_easy_setopt(handle, option, value) \
__extension__({ \
- CURLoption _curl_opt = (option); \
- if(__builtin_constant_p(_curl_opt)) { \
+ if(__builtin_constant_p(option)) { \
CURL_IGNORE_DEPRECATION( \
- if(curlcheck_long_option(_curl_opt)) \
+ if(curlcheck_long_option(option)) \
if(!curlcheck_long(value)) \
_curl_easy_setopt_err_long(); \
- if(curlcheck_off_t_option(_curl_opt)) \
+ if(curlcheck_off_t_option(option)) \
if(!curlcheck_off_t(value)) \
_curl_easy_setopt_err_curl_off_t(); \
- if(curlcheck_string_option(_curl_opt)) \
+ if(curlcheck_string_option(option)) \
if(!curlcheck_string(value)) \
_curl_easy_setopt_err_string(); \
- if(curlcheck_write_cb_option(_curl_opt)) \
+ if((option) == CURLOPT_PRIVATE) { } \
+ if(curlcheck_write_cb_option(option)) \
if(!curlcheck_write_cb(value)) \
_curl_easy_setopt_err_write_callback(); \
- if((_curl_opt) == CURLOPT_RESOLVER_START_FUNCTION) \
+ if(curlcheck_curl_option(option)) \
+ if(!curlcheck_curl(value)) \
+ _curl_easy_setopt_err_curl(); \
+ if((option) == CURLOPT_RESOLVER_START_FUNCTION) \
if(!curlcheck_resolver_start_callback(value)) \
_curl_easy_setopt_err_resolver_start_callback(); \
- if((_curl_opt) == CURLOPT_READFUNCTION) \
+ if((option) == CURLOPT_READFUNCTION) \
if(!curlcheck_read_cb(value)) \
_curl_easy_setopt_err_read_cb(); \
- if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \
+ if((option) == CURLOPT_IOCTLFUNCTION) \
if(!curlcheck_ioctl_cb(value)) \
_curl_easy_setopt_err_ioctl_cb(); \
- if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \
+ if((option) == CURLOPT_SOCKOPTFUNCTION) \
if(!curlcheck_sockopt_cb(value)) \
_curl_easy_setopt_err_sockopt_cb(); \
- if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \
+ if((option) == CURLOPT_OPENSOCKETFUNCTION) \
if(!curlcheck_opensocket_cb(value)) \
_curl_easy_setopt_err_opensocket_cb(); \
- if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \
+ if((option) == CURLOPT_PROGRESSFUNCTION) \
if(!curlcheck_progress_cb(value)) \
_curl_easy_setopt_err_progress_cb(); \
- if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \
+ if((option) == CURLOPT_XFERINFOFUNCTION) \
+ if(!curlcheck_xferinfo_cb(value)) \
+ _curl_easy_setopt_err_xferinfo_cb(); \
+ if((option) == CURLOPT_DEBUGFUNCTION) \
if(!curlcheck_debug_cb(value)) \
_curl_easy_setopt_err_debug_cb(); \
- if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \
+ if((option) == CURLOPT_SSL_CTX_FUNCTION) \
if(!curlcheck_ssl_ctx_cb(value)) \
_curl_easy_setopt_err_ssl_ctx_cb(); \
- if(curlcheck_conv_cb_option(_curl_opt)) \
+ if(curlcheck_conv_cb_option(option)) \
if(!curlcheck_conv_cb(value)) \
_curl_easy_setopt_err_conv_cb(); \
- if((_curl_opt) == CURLOPT_SEEKFUNCTION) \
+ if((option) == CURLOPT_SEEKFUNCTION) \
if(!curlcheck_seek_cb(value)) \
_curl_easy_setopt_err_seek_cb(); \
- if(curlcheck_cb_data_option(_curl_opt)) \
+ if((option) == CURLOPT_CHUNK_BGN_FUNCTION) \
+ if(!curlcheck_chunk_bgn_cb(value)) \
+ _curl_easy_setopt_err_chunk_bgn_cb(); \
+ if((option) == CURLOPT_CHUNK_END_FUNCTION) \
+ if(!curlcheck_chunk_end_cb(value)) \
+ _curl_easy_setopt_err_chunk_end_cb(); \
+ if((option) == CURLOPT_CLOSESOCKETFUNCTION) \
+ if(!curlcheck_close_socket_cb(value)) \
+ _curl_easy_setopt_err_close_socket_cb(); \
+ if((option) == CURLOPT_FNMATCH_FUNCTION) \
+ if(!curlcheck_fnmatch_cb(value)) \
+ _curl_easy_setopt_err_fnmatch_cb(); \
+ if((option) == CURLOPT_HSTSREADFUNCTION) \
+ if(!curlcheck_hstsread_cb(value)) \
+ _curl_easy_setopt_err_hstsread_cb(); \
+ if((option) == CURLOPT_HSTSWRITEFUNCTION) \
+ if(!curlcheck_hstswrite_cb(value)) \
+ _curl_easy_setopt_err_hstswrite_cb(); \
+ if((option) == CURLOPT_SSH_HOSTKEYFUNCTION) \
+ if(!curlcheck_ssh_hostkey_cb(value)) \
+ _curl_easy_setopt_err_ssh_hostkey_cb(); \
+ if((option) == CURLOPT_SSH_KEYFUNCTION) \
+ if(!curlcheck_ssh_key_cb(value)) \
+ _curl_easy_setopt_err_ssh_key_cb(); \
+ if((option) == CURLOPT_INTERLEAVEFUNCTION) \
+ if(!curlcheck_interleave_cb(value)) \
+ _curl_easy_setopt_err_interleave_cb(); \
+ if((option) == CURLOPT_PREREQFUNCTION) \
+ if(!curlcheck_prereq_cb(value)) \
+ _curl_easy_setopt_err_prereq_cb(); \
+ if((option) == CURLOPT_TRAILERFUNCTION) \
+ if(!curlcheck_trailer_cb(value)) \
+ _curl_easy_setopt_err_trailer_cb(); \
+ if(curlcheck_cb_data_option(option)) \
if(!curlcheck_cb_data(value)) \
_curl_easy_setopt_err_cb_data(); \
- if((_curl_opt) == CURLOPT_ERRORBUFFER) \
+ if((option) == CURLOPT_ERRORBUFFER) \
if(!curlcheck_error_buffer(value)) \
_curl_easy_setopt_err_error_buffer(); \
- if((_curl_opt) == CURLOPT_STDERR) \
+ if((option) == CURLOPT_CURLU) \
+ if(!curlcheck_ptr((value), CURLU)) \
+ _curl_easy_setopt_err_curlu(); \
+ if((option) == CURLOPT_STDERR) \
if(!curlcheck_FILE(value)) \
_curl_easy_setopt_err_FILE(); \
- if(curlcheck_postfields_option(_curl_opt)) \
+ if(curlcheck_postfields_option(option)) \
if(!curlcheck_postfields(value)) \
_curl_easy_setopt_err_postfields(); \
- if((_curl_opt) == CURLOPT_HTTPPOST) \
+ if((option) == CURLOPT_HTTPPOST) \
if(!curlcheck_arr((value), struct curl_httppost)) \
_curl_easy_setopt_err_curl_httpost(); \
- if((_curl_opt) == CURLOPT_MIMEPOST) \
+ if((option) == CURLOPT_MIMEPOST) \
if(!curlcheck_ptr((value), curl_mime)) \
_curl_easy_setopt_err_curl_mimepost(); \
- if(curlcheck_slist_option(_curl_opt)) \
+ if(curlcheck_slist_option(option)) \
if(!curlcheck_arr((value), struct curl_slist)) \
_curl_easy_setopt_err_curl_slist(); \
- if((_curl_opt) == CURLOPT_SHARE) \
+ if((option) == CURLOPT_SHARE) \
if(!curlcheck_ptr((value), CURLSH)) \
_curl_easy_setopt_err_CURLSH(); \
- ) \
- } \
- curl_easy_setopt(handle, _curl_opt, value); \
+ ) \
+ } \
+ curl_easy_setopt(handle, option, value); \
})
/* wraps curl_easy_getinfo() with typechecking */
#define curl_easy_getinfo(handle, info, arg) \
__extension__({ \
- CURLINFO _curl_info = (info); \
- if(__builtin_constant_p(_curl_info)) { \
+ if(__builtin_constant_p(info)) { \
CURL_IGNORE_DEPRECATION( \
- if(curlcheck_string_info(_curl_info)) \
+ if(curlcheck_string_info(info)) \
if(!curlcheck_arr((arg), char *)) \
_curl_easy_getinfo_err_string(); \
- if(curlcheck_long_info(_curl_info)) \
+ if(curlcheck_long_info(info)) \
if(!curlcheck_arr((arg), long)) \
_curl_easy_getinfo_err_long(); \
- if(curlcheck_double_info(_curl_info)) \
+ if(curlcheck_double_info(info)) \
if(!curlcheck_arr((arg), double)) \
_curl_easy_getinfo_err_double(); \
- if(curlcheck_slist_info(_curl_info)) \
+ if(curlcheck_slist_info(info)) \
if(!curlcheck_arr((arg), struct curl_slist *)) \
_curl_easy_getinfo_err_curl_slist(); \
- if(curlcheck_tlssessioninfo_info(_curl_info)) \
+ if(curlcheck_tlssessioninfo_info(info)) \
if(!curlcheck_arr((arg), struct curl_tlssessioninfo *)) \
- _curl_easy_getinfo_err_curl_tlssesssioninfo(); \
- if(curlcheck_certinfo_info(_curl_info)) \
+ _curl_easy_getinfo_err_curl_tlssessioninfo(); \
+ if(curlcheck_certinfo_info(info)) \
if(!curlcheck_arr((arg), struct curl_certinfo *)) \
_curl_easy_getinfo_err_curl_certinfo(); \
- if(curlcheck_socket_info(_curl_info)) \
+ if(curlcheck_socket_info(info)) \
if(!curlcheck_arr((arg), curl_socket_t)) \
_curl_easy_getinfo_err_curl_socket(); \
- if(curlcheck_off_t_info(_curl_info)) \
+ if(curlcheck_off_t_info(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, info, arg); \
})
/*
@@ -157,7 +199,6 @@ #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)
-
/* the actual warnings, triggered by calling the _curl_easy_setopt_err*
* functions */
@@ -168,187 +209,212 @@ id(void) { __asm__(""); }
CURLWARNING(_curl_easy_setopt_err_long,
- "curl_easy_setopt expects a long argument for this option")
+ "curl_easy_setopt expects a long argument")
CURLWARNING(_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")
CURLWARNING(_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")
CURLWARNING(_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")
CURLWARNING(_curl_easy_setopt_err_resolver_start_callback,
- "curl_easy_setopt expects a "
- "curl_resolver_start_callback argument for this option"
- )
+ "curl_easy_setopt expects a "
+ "curl_resolver_start_callback argument")
CURLWARNING(_curl_easy_setopt_err_read_cb,
- "curl_easy_setopt expects a curl_read_callback argument for this option")
+ "curl_easy_setopt expects a curl_read_callback argument")
CURLWARNING(_curl_easy_setopt_err_ioctl_cb,
- "curl_easy_setopt expects a curl_ioctl_callback argument for this option")
+ "curl_easy_setopt expects a curl_ioctl_callback argument")
CURLWARNING(_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")
CURLWARNING(_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")
CURLWARNING(_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")
+CURLWARNING(_curl_easy_setopt_err_xferinfo_cb,
+ "curl_easy_setopt expects a curl_xferinfo_callback argument")
CURLWARNING(_curl_easy_setopt_err_debug_cb,
- "curl_easy_setopt expects a curl_debug_callback argument for this option")
+ "curl_easy_setopt expects a curl_debug_callback argument")
CURLWARNING(_curl_easy_setopt_err_ssl_ctx_cb,
- "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option")
+ "curl_easy_setopt expects a curl_ssl_ctx_callback argument")
CURLWARNING(_curl_easy_setopt_err_conv_cb,
- "curl_easy_setopt expects a curl_conv_callback argument for this option")
+ "curl_easy_setopt expects a curl_conv_callback argument")
CURLWARNING(_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")
CURLWARNING(_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")
+CURLWARNING(_curl_easy_setopt_err_chunk_bgn_cb,
+ "curl_easy_setopt expects a curl_chunk_bgn_callback argument")
+CURLWARNING(_curl_easy_setopt_err_chunk_end_cb,
+ "curl_easy_setopt expects a curl_chunk_end_callback argument")
+CURLWARNING(_curl_easy_setopt_err_close_socket_cb,
+ "curl_easy_setopt expects a curl_closesocket_callback argument")
+CURLWARNING(_curl_easy_setopt_err_fnmatch_cb,
+ "curl_easy_setopt expects a curl_fnmatch_callback argument")
+CURLWARNING(_curl_easy_setopt_err_hstsread_cb,
+ "curl_easy_setopt expects a curl_hstsread_callback argument")
+CURLWARNING(_curl_easy_setopt_err_hstswrite_cb,
+ "curl_easy_setopt expects a curl_hstswrite_callback argument")
+CURLWARNING(_curl_easy_setopt_err_ssh_key_cb,
+ "curl_easy_setopt expects a curl_sshkeycallback argument")
+CURLWARNING(_curl_easy_setopt_err_ssh_hostkey_cb,
+ "curl_easy_setopt expects a curl_sshhostkeycallback argument")
+CURLWARNING(_curl_easy_setopt_err_interleave_cb,
+ "curl_easy_setopt expects a curl_interleave_callback argument")
+CURLWARNING(_curl_easy_setopt_err_prereq_cb,
+ "curl_easy_setopt expects a curl_prereq_callback argument")
+CURLWARNING(_curl_easy_setopt_err_trailer_cb,
+ "curl_easy_setopt expects a curl_trailerfunc_ok argument")
CURLWARNING(_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")
+CURLWARNING(_curl_easy_setopt_err_curlu,
+ "curl_easy_setopt expects a 'CURLU *' argument")
+CURLWARNING(_curl_easy_setopt_err_curl,
+ "curl_easy_setopt expects a 'CURL *' argument")
CURLWARNING(_curl_easy_setopt_err_FILE,
- "curl_easy_setopt expects a 'FILE *' argument for this option")
+ "curl_easy_setopt expects a 'FILE *' argument")
CURLWARNING(_curl_easy_setopt_err_postfields,
- "curl_easy_setopt expects a 'void *' or 'char *' argument for this option")
+ "curl_easy_setopt expects a 'void *' or 'char *' argument")
CURLWARNING(_curl_easy_setopt_err_curl_httpost,
- "curl_easy_setopt expects a 'struct curl_httppost *' "
- "argument for this option")
+ "curl_easy_setopt expects a 'struct curl_httppost *' "
+ "argument")
CURLWARNING(_curl_easy_setopt_err_curl_mimepost,
- "curl_easy_setopt expects a 'curl_mime *' "
- "argument for this option")
+ "curl_easy_setopt expects a 'curl_mime *' "
+ "argument")
CURLWARNING(_curl_easy_setopt_err_curl_slist,
- "curl_easy_setopt expects a 'struct curl_slist *' argument for this option")
+ "curl_easy_setopt expects a 'struct curl_slist *' argument")
CURLWARNING(_curl_easy_setopt_err_CURLSH,
- "curl_easy_setopt expects a CURLSH* argument for this option")
-
+ "curl_easy_setopt expects a CURLSH* argument")
CURLWARNING(_curl_easy_getinfo_err_string,
- "curl_easy_getinfo expects a pointer to 'char *' for this info")
+ "curl_easy_getinfo expects a pointer to 'char *'")
CURLWARNING(_curl_easy_getinfo_err_long,
- "curl_easy_getinfo expects a pointer to long for this info")
+ "curl_easy_getinfo expects a pointer to long")
CURLWARNING(_curl_easy_getinfo_err_double,
- "curl_easy_getinfo expects a pointer to double for this info")
+ "curl_easy_getinfo expects a pointer to double")
CURLWARNING(_curl_easy_getinfo_err_curl_slist,
- "curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this info")
-CURLWARNING(_curl_easy_getinfo_err_curl_tlssesssioninfo,
- "curl_easy_getinfo expects a pointer to "
- "'struct curl_tlssessioninfo *' for this info")
+ "curl_easy_getinfo expects a pointer to 'struct curl_slist *'")
+CURLWARNING(_curl_easy_getinfo_err_curl_tlssessioninfo,
+ "curl_easy_getinfo expects a pointer to "
+ "'struct curl_tlssessioninfo *'")
CURLWARNING(_curl_easy_getinfo_err_curl_certinfo,
- "curl_easy_getinfo expects a pointer to "
- "'struct curl_certinfo *' for this info")
+ "curl_easy_getinfo expects a pointer to "
+ "'struct curl_certinfo *'")
CURLWARNING(_curl_easy_getinfo_err_curl_socket,
- "curl_easy_getinfo expects a pointer to curl_socket_t for this info")
+ "curl_easy_getinfo expects a pointer to curl_socket_t")
CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
- "curl_easy_getinfo expects a pointer to curl_off_t for this info")
+ "curl_easy_getinfo expects a pointer to curl_off_t")
/* groups of curl_easy_setops options that take the same type of argument */
-/* To add a new option to one of the groups, just add
- * (option) == CURLOPT_SOMETHING
- * to the or-expression. If the option takes a long or curl_off_t, you do not
- * have to do anything
- */
-
/* evaluates to true if option takes a long argument */
#define curlcheck_long_option(option) \
(0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT)
-#define curlcheck_off_t_option(option) \
+#define curlcheck_off_t_option(option) \
(((option) > CURLOPTTYPE_OFF_T) && ((option) < CURLOPTTYPE_BLOB))
+/* option takes a CURL * argument */
+#define curlcheck_curl_option(option) \
+ ((option) == CURLOPT_STREAM_DEPENDS || \
+ (option) == CURLOPT_STREAM_DEPENDS_E || \
+ 0)
+
/* evaluates to true if option takes a char* argument */
-#define curlcheck_string_option(option) \
- ((option) == CURLOPT_ABSTRACT_UNIX_SOCKET || \
- (option) == CURLOPT_ACCEPT_ENCODING || \
- (option) == CURLOPT_ALTSVC || \
- (option) == CURLOPT_CAINFO || \
- (option) == CURLOPT_CAPATH || \
- (option) == CURLOPT_COOKIE || \
- (option) == CURLOPT_COOKIEFILE || \
- (option) == CURLOPT_COOKIEJAR || \
- (option) == CURLOPT_COOKIELIST || \
- (option) == CURLOPT_CRLFILE || \
- (option) == CURLOPT_CUSTOMREQUEST || \
- (option) == CURLOPT_DEFAULT_PROTOCOL || \
- (option) == CURLOPT_DNS_INTERFACE || \
- (option) == CURLOPT_DNS_LOCAL_IP4 || \
- (option) == CURLOPT_DNS_LOCAL_IP6 || \
- (option) == CURLOPT_DNS_SERVERS || \
- (option) == CURLOPT_DOH_URL || \
- (option) == CURLOPT_ECH || \
- (option) == CURLOPT_EGDSOCKET || \
- (option) == CURLOPT_FTP_ACCOUNT || \
- (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \
- (option) == CURLOPT_FTPPORT || \
- (option) == CURLOPT_HSTS || \
- (option) == CURLOPT_HAPROXY_CLIENT_IP || \
- (option) == CURLOPT_INTERFACE || \
- (option) == CURLOPT_ISSUERCERT || \
- (option) == CURLOPT_KEYPASSWD || \
- (option) == CURLOPT_KRBLEVEL || \
- (option) == CURLOPT_LOGIN_OPTIONS || \
- (option) == CURLOPT_MAIL_AUTH || \
- (option) == CURLOPT_MAIL_FROM || \
- (option) == CURLOPT_NETRC_FILE || \
- (option) == CURLOPT_NOPROXY || \
- (option) == CURLOPT_PASSWORD || \
- (option) == CURLOPT_PINNEDPUBLICKEY || \
- (option) == CURLOPT_PRE_PROXY || \
- (option) == CURLOPT_PROTOCOLS_STR || \
- (option) == CURLOPT_PROXY || \
- (option) == CURLOPT_PROXY_CAINFO || \
- (option) == CURLOPT_PROXY_CAPATH || \
- (option) == CURLOPT_PROXY_CRLFILE || \
- (option) == CURLOPT_PROXY_ISSUERCERT || \
- (option) == CURLOPT_PROXY_KEYPASSWD || \
- (option) == CURLOPT_PROXY_PINNEDPUBLICKEY || \
- (option) == CURLOPT_PROXY_SERVICE_NAME || \
- (option) == CURLOPT_PROXY_SSL_CIPHER_LIST || \
- (option) == CURLOPT_PROXY_SSLCERT || \
- (option) == CURLOPT_PROXY_SSLCERTTYPE || \
- (option) == CURLOPT_PROXY_SSLKEY || \
- (option) == CURLOPT_PROXY_SSLKEYTYPE || \
- (option) == CURLOPT_PROXY_TLS13_CIPHERS || \
- (option) == CURLOPT_PROXY_TLSAUTH_PASSWORD || \
- (option) == CURLOPT_PROXY_TLSAUTH_TYPE || \
- (option) == CURLOPT_PROXY_TLSAUTH_USERNAME || \
- (option) == CURLOPT_PROXYPASSWORD || \
- (option) == CURLOPT_PROXYUSERNAME || \
- (option) == CURLOPT_PROXYUSERPWD || \
- (option) == CURLOPT_RANDOM_FILE || \
- (option) == CURLOPT_RANGE || \
- (option) == CURLOPT_REDIR_PROTOCOLS_STR || \
- (option) == CURLOPT_REFERER || \
- (option) == CURLOPT_REQUEST_TARGET || \
- (option) == CURLOPT_RTSP_SESSION_ID || \
- (option) == CURLOPT_RTSP_STREAM_URI || \
- (option) == CURLOPT_RTSP_TRANSPORT || \
- (option) == CURLOPT_SASL_AUTHZID || \
- (option) == CURLOPT_SERVICE_NAME || \
- (option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \
- (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \
- (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 || \
- (option) == CURLOPT_SSH_KNOWNHOSTS || \
- (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \
- (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \
- (option) == CURLOPT_SSLCERT || \
- (option) == CURLOPT_SSLCERTTYPE || \
- (option) == CURLOPT_SSLENGINE || \
- (option) == CURLOPT_SSLKEY || \
- (option) == CURLOPT_SSLKEYTYPE || \
- (option) == CURLOPT_SSL_CIPHER_LIST || \
- (option) == CURLOPT_TLS13_CIPHERS || \
- (option) == CURLOPT_TLSAUTH_PASSWORD || \
- (option) == CURLOPT_TLSAUTH_TYPE || \
- (option) == CURLOPT_TLSAUTH_USERNAME || \
- (option) == CURLOPT_UNIX_SOCKET_PATH || \
- (option) == CURLOPT_URL || \
- (option) == CURLOPT_USERAGENT || \
- (option) == CURLOPT_USERNAME || \
- (option) == CURLOPT_AWS_SIGV4 || \
- (option) == CURLOPT_USERPWD || \
- (option) == CURLOPT_XOAUTH2_BEARER || \
- (option) == CURLOPT_SSL_EC_CURVES || \
+#define curlcheck_string_option(option) \
+ ((option) == CURLOPT_ABSTRACT_UNIX_SOCKET || \
+ (option) == CURLOPT_ACCEPT_ENCODING || \
+ (option) == CURLOPT_ALTSVC || \
+ (option) == CURLOPT_CAINFO || \
+ (option) == CURLOPT_CAPATH || \
+ (option) == CURLOPT_COOKIE || \
+ (option) == CURLOPT_COOKIEFILE || \
+ (option) == CURLOPT_COOKIEJAR || \
+ (option) == CURLOPT_COOKIELIST || \
+ (option) == CURLOPT_CRLFILE || \
+ (option) == CURLOPT_CUSTOMREQUEST || \
+ (option) == CURLOPT_DEFAULT_PROTOCOL || \
+ (option) == CURLOPT_DNS_INTERFACE || \
+ (option) == CURLOPT_DNS_LOCAL_IP4 || \
+ (option) == CURLOPT_DNS_LOCAL_IP6 || \
+ (option) == CURLOPT_DNS_SERVERS || \
+ (option) == CURLOPT_DOH_URL || \
+ (option) == CURLOPT_ECH || \
+ (option) == CURLOPT_EGDSOCKET || \
+ (option) == CURLOPT_FTP_ACCOUNT || \
+ (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \
+ (option) == CURLOPT_FTPPORT || \
+ (option) == CURLOPT_HAPROXY_CLIENT_IP || \
+ (option) == CURLOPT_HSTS || \
+ (option) == CURLOPT_INTERFACE || \
+ (option) == CURLOPT_ISSUERCERT || \
+ (option) == CURLOPT_KEYPASSWD || \
+ (option) == CURLOPT_KRBLEVEL || \
+ (option) == CURLOPT_LOGIN_OPTIONS || \
+ (option) == CURLOPT_MAIL_AUTH || \
+ (option) == CURLOPT_MAIL_FROM || \
+ (option) == CURLOPT_NETRC_FILE || \
+ (option) == CURLOPT_NOPROXY || \
+ (option) == CURLOPT_PASSWORD || \
+ (option) == CURLOPT_PINNEDPUBLICKEY || \
+ (option) == CURLOPT_PRE_PROXY || \
+ (option) == CURLOPT_PROTOCOLS_STR || \
+ (option) == CURLOPT_PROXY || \
+ (option) == CURLOPT_PROXY_CAINFO || \
+ (option) == CURLOPT_PROXY_CAPATH || \
+ (option) == CURLOPT_PROXY_CRLFILE || \
+ (option) == CURLOPT_PROXY_ISSUERCERT || \
+ (option) == CURLOPT_PROXY_KEYPASSWD || \
+ (option) == CURLOPT_PROXY_PINNEDPUBLICKEY || \
+ (option) == CURLOPT_PROXY_SERVICE_NAME || \
+ (option) == CURLOPT_PROXY_SSL_CIPHER_LIST || \
+ (option) == CURLOPT_PROXY_SSLCERT || \
+ (option) == CURLOPT_PROXY_SSLCERTTYPE || \
+ (option) == CURLOPT_PROXY_SSLKEY || \
+ (option) == CURLOPT_PROXY_SSLKEYTYPE || \
+ (option) == CURLOPT_PROXY_TLS13_CIPHERS || \
+ (option) == CURLOPT_PROXY_TLSAUTH_PASSWORD || \
+ (option) == CURLOPT_PROXY_TLSAUTH_TYPE || \
+ (option) == CURLOPT_PROXY_TLSAUTH_USERNAME || \
+ (option) == CURLOPT_PROXYPASSWORD || \
+ (option) == CURLOPT_PROXYUSERNAME || \
+ (option) == CURLOPT_PROXYUSERPWD || \
+ (option) == CURLOPT_RANDOM_FILE || \
+ (option) == CURLOPT_RANGE || \
+ (option) == CURLOPT_REDIR_PROTOCOLS_STR || \
+ (option) == CURLOPT_REFERER || \
+ (option) == CURLOPT_REQUEST_TARGET || \
+ (option) == CURLOPT_RTSP_SESSION_ID || \
+ (option) == CURLOPT_RTSP_STREAM_URI || \
+ (option) == CURLOPT_RTSP_TRANSPORT || \
+ (option) == CURLOPT_SASL_AUTHZID || \
+ (option) == CURLOPT_SERVICE_NAME || \
+ (option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \
+ (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \
+ (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 || \
+ (option) == CURLOPT_SSH_KNOWNHOSTS || \
+ (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \
+ (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \
+ (option) == CURLOPT_SSLCERT || \
+ (option) == CURLOPT_SSLCERTTYPE || \
+ (option) == CURLOPT_SSLENGINE || \
+ (option) == CURLOPT_SSLKEY || \
+ (option) == CURLOPT_SSLKEYTYPE || \
+ (option) == CURLOPT_SSL_CIPHER_LIST || \
+ (option) == CURLOPT_SSL_EC_CURVES || \
+ (option) == CURLOPT_SSL_SIGNATURE_ALGORITHMS || \
+ (option) == CURLOPT_TLS13_CIPHERS || \
+ (option) == CURLOPT_TLSAUTH_PASSWORD || \
+ (option) == CURLOPT_TLSAUTH_TYPE || \
+ (option) == CURLOPT_TLSAUTH_USERNAME || \
+ (option) == CURLOPT_UNIX_SOCKET_PATH || \
+ (option) == CURLOPT_URL || \
+ (option) == CURLOPT_USERAGENT || \
+ (option) == CURLOPT_USERNAME || \
+ (option) == CURLOPT_AWS_SIGV4 || \
+ (option) == CURLOPT_USERPWD || \
+ (option) == CURLOPT_XOAUTH2_BEARER || \
0)
/* evaluates to true if option takes a curl_write_callback argument */
@@ -375,7 +441,7 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t, (option) == CURLOPT_IOCTLDATA || \
(option) == CURLOPT_OPENSOCKETDATA || \
(option) == CURLOPT_PREREQDATA || \
- (option) == CURLOPT_PROGRESSDATA || \
+ (option) == CURLOPT_XFERINFODATA || \
(option) == CURLOPT_READDATA || \
(option) == CURLOPT_SEEKDATA || \
(option) == CURLOPT_SOCKOPTDATA || \
@@ -479,22 +545,36 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t, curlcheck_arr((expr), signed char) || \
curlcheck_arr((expr), unsigned char))
+/* evaluates to true if expr is a CURL * */
+#define curlcheck_curl(expr) \
+ (curlcheck_NULL(expr) || \
+ __builtin_types_compatible_p(__typeof__(expr), CURL *))
+
+
/* evaluates to true if expr is a long (no matter the signedness)
* XXX: for now, int is also accepted (and therefore short and char, which
* are promoted to int when passed to a variadic function) */
-#define curlcheck_long(expr) \
- (__builtin_types_compatible_p(__typeof__(expr), long) || \
- __builtin_types_compatible_p(__typeof__(expr), signed long) || \
- __builtin_types_compatible_p(__typeof__(expr), unsigned long) || \
- __builtin_types_compatible_p(__typeof__(expr), int) || \
- __builtin_types_compatible_p(__typeof__(expr), signed int) || \
- __builtin_types_compatible_p(__typeof__(expr), unsigned int) || \
- __builtin_types_compatible_p(__typeof__(expr), short) || \
- __builtin_types_compatible_p(__typeof__(expr), signed short) || \
- __builtin_types_compatible_p(__typeof__(expr), unsigned short) || \
- __builtin_types_compatible_p(__typeof__(expr), char) || \
- __builtin_types_compatible_p(__typeof__(expr), signed char) || \
- __builtin_types_compatible_p(__typeof__(expr), unsigned char))
+#define curlcheck_long(expr) \
+ ( \
+ ((sizeof(long) != sizeof(int)) && \
+ (__builtin_types_compatible_p(__typeof__(expr), long) || \
+ __builtin_types_compatible_p(__typeof__(expr), signed long) || \
+ __builtin_types_compatible_p(__typeof__(expr), unsigned long))) \
+ || \
+ ((sizeof(long) == sizeof(int)) && \
+ (__builtin_types_compatible_p(__typeof__(expr), long) || \
+ __builtin_types_compatible_p(__typeof__(expr), signed long) || \
+ __builtin_types_compatible_p(__typeof__(expr), unsigned long) || \
+ __builtin_types_compatible_p(__typeof__(expr), int) || \
+ __builtin_types_compatible_p(__typeof__(expr), signed int) || \
+ __builtin_types_compatible_p(__typeof__(expr), unsigned int) || \
+ __builtin_types_compatible_p(__typeof__(expr), short) || \
+ __builtin_types_compatible_p(__typeof__(expr), signed short) || \
+ __builtin_types_compatible_p(__typeof__(expr), unsigned short) || \
+ __builtin_types_compatible_p(__typeof__(expr), char) || \
+ __builtin_types_compatible_p(__typeof__(expr), signed char) || \
+ __builtin_types_compatible_p(__typeof__(expr), unsigned char))) \
+ )
/* evaluates to true if expr is of type curl_off_t */
#define curlcheck_off_t(expr) \
@@ -629,6 +709,11 @@ typedef int (*_curl_progress_callback1)(void *, typedef int (*_curl_progress_callback2)(const void *,
double, double, double, double);
+/* evaluates to true if expr is of type curl_xferinfo_callback */
+#define curlcheck_xferinfo_cb(expr) \
+ (curlcheck_NULL(expr) || \
+ curlcheck_cb_compatible((expr), curl_xferinfo_callback))
+
/* evaluates to true if expr is of type curl_debug_callback or "similar" */
#define curlcheck_debug_cb(expr) \
(curlcheck_NULL(expr) || \
@@ -714,5 +799,69 @@ typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length); typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int);
typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int);
+/* evaluates to true if expr is of type curl_chunk_bgn_callback */
+#define curlcheck_chunk_bgn_cb(expr) \
+ (curlcheck_NULL(expr) || \
+ curlcheck_cb_compatible((expr), curl_chunk_bgn_callback) || \
+ curlcheck_cb_compatible((expr), _curl_chunk_bgn_callback1) || \
+ curlcheck_cb_compatible((expr), _curl_chunk_bgn_callback2))
+typedef long (*_curl_chunk_bgn_callback1)(struct curl_fileinfo *,
+ void *, int);
+typedef long (*_curl_chunk_bgn_callback2)(void *, void *, int);
+
+/* evaluates to true if expr is of type curl_chunk_end_callback */
+#define curlcheck_chunk_end_cb(expr) \
+ (curlcheck_NULL(expr) || \
+ curlcheck_cb_compatible((expr), curl_chunk_end_callback))
+
+/* evaluates to true if expr is of type curl_closesocket_callback */
+#define curlcheck_close_socket_cb(expr) \
+ (curlcheck_NULL(expr) || \
+ curlcheck_cb_compatible((expr), curl_closesocket_callback))
+
+/* evaluates to true if expr is of type curl_fnmatch_callback */
+#define curlcheck_fnmatch_cb(expr) \
+ (curlcheck_NULL(expr) || \
+ curlcheck_cb_compatible((expr), curl_fnmatch_callback))
+
+/* evaluates to true if expr is of type curl_hstsread_callback */
+#define curlcheck_hstsread_cb(expr) \
+ (curlcheck_NULL(expr) || \
+ curlcheck_cb_compatible((expr), curl_hstsread_callback))
+
+/* evaluates to true if expr is of type curl_hstswrite_callback */
+#define curlcheck_hstswrite_cb(expr) \
+ (curlcheck_NULL(expr) || \
+ curlcheck_cb_compatible((expr), curl_hstswrite_callback))
+
+/* evaluates to true if expr is of type curl_sshhostkeycallback */
+#define curlcheck_ssh_hostkey_cb(expr) \
+ (curlcheck_NULL(expr) || \
+ curlcheck_cb_compatible((expr), curl_sshhostkeycallback))
+
+/* evaluates to true if expr is of type curl_sshkeycallback */
+#define curlcheck_ssh_key_cb(expr) \
+ (curlcheck_NULL(expr) || \
+ curlcheck_cb_compatible((expr), curl_sshkeycallback))
+
+/* evaluates to true if expr is of type curl_interleave_callback */
+#define curlcheck_interleave_cb(expr) \
+ (curlcheck_NULL(expr) || \
+ curlcheck_cb_compatible((expr), _curl_interleave_callback1) || \
+ curlcheck_cb_compatible((expr), _curl_interleave_callback2))
+typedef size_t (*_curl_interleave_callback1)(void *p, size_t s,
+ size_t n, void *u);
+typedef size_t (*_curl_interleave_callback2)(char *p, size_t s,
+ size_t n, void *u);
+
+/* evaluates to true if expr is of type curl_prereq_callback */
+#define curlcheck_prereq_cb(expr) \
+ (curlcheck_NULL(expr) || \
+ curlcheck_cb_compatible((expr), curl_prereq_callback))
+
+/* evaluates to true if expr is of type curl_trailer_callback */
+#define curlcheck_trailer_cb(expr) \
+ (curlcheck_NULL(expr) || \
+ curlcheck_cb_compatible((expr), curl_trailer_callback))
#endif /* CURLINC_TYPECHECK_GCC_H */
diff --git a/libs/libcurl/include/curl/websockets.h b/libs/libcurl/include/curl/websockets.h index a10652dc1c..65accb27c9 100644 --- a/libs/libcurl/include/curl/websockets.h +++ b/libs/libcurl/include/curl/websockets.h @@ -73,7 +73,8 @@ CURL_EXTERN CURLcode curl_ws_send(CURL *curl, const void *buffer, unsigned int flags);
/* bits for the CURLOPT_WS_OPTIONS bitmask: */
-#define CURLWS_RAW_MODE (1<<0)
+#define CURLWS_RAW_MODE (1<<0)
+#define CURLWS_NOAUTOPONG (1<<1)
CURL_EXTERN const struct curl_ws_frame *curl_ws_meta(CURL *curl);
|