diff options
| author | thegeorg <[email protected]> | 2024-10-11 21:07:18 +0300 | 
|---|---|---|
| committer | thegeorg <[email protected]> | 2024-10-11 21:17:24 +0300 | 
| commit | 1df197e6035ea9826bfedee7d48812e318ba9c7a (patch) | |
| tree | 76b8e9de41820755adf209854d06a84a8b5a1988 /contrib/libs/curl/lib/curl_trc.h | |
| parent | f9c007ea1b59b960201def74990810b26ecdfd48 (diff) | |
Revert "Update contrib/libs/curl to 8.10.1" to fix
Revert "Update contrib/libs/curl to 8.10.1"
This reverts commit 428ef806a15515cdaa325530aa8cc6903fac5fb6, reversing
changes made to 40e46e6394df409d1545a3771c8a47a86ed55eac.
Revert "Fix formatting after rXXXXXX"
This reverts commit a73689311a92e195d14136c5a0049ef1e40b1f3e, reversing
changes made to 17980b8756d1f74d3dacddc7ca4945c30f35611c.
commit_hash:5c5194831e5455b61fbee61619066396626beab1
Diffstat (limited to 'contrib/libs/curl/lib/curl_trc.h')
| -rw-r--r-- | contrib/libs/curl/lib/curl_trc.h | 140 | 
1 files changed, 27 insertions, 113 deletions
diff --git a/contrib/libs/curl/lib/curl_trc.h b/contrib/libs/curl/lib/curl_trc.h index 5f675b453fd..ade9108ac7d 100644 --- a/contrib/libs/curl/lib/curl_trc.h +++ b/contrib/libs/curl/lib/curl_trc.h @@ -58,7 +58,14 @@ void Curl_debug(struct Curl_easy *data, curl_infotype type,   * Output a failure message on registered callbacks for transfer.   */  void Curl_failf(struct Curl_easy *data, -                const char *fmt, ...) CURL_PRINTF(2, 3); +#if defined(__GNUC__) && !defined(printf) &&                    \ +  defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ +  !defined(__MINGW32__) +                       const char *fmt, ...) +                       __attribute__((format(printf, 2, 3))); +#else +                       const char *fmt, ...); +#endif  #define failf Curl_failf @@ -77,111 +84,50 @@ void Curl_failf(struct Curl_easy *data,  #define CURL_TRC_CF(data, cf, ...) \    do { if(Curl_trc_cf_is_verbose(cf, data)) \           Curl_trc_cf_infof(data, cf, __VA_ARGS__); } while(0) -#define CURL_TRC_WRITE(data, ...) \ -  do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \ -         Curl_trc_write(data, __VA_ARGS__); } while(0) -#define CURL_TRC_READ(data, ...) \ -  do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \ -         Curl_trc_read(data, __VA_ARGS__); } while(0) - -#ifndef CURL_DISABLE_FTP -#define CURL_TRC_FTP(data, ...) \ -  do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ftp)) \ -         Curl_trc_ftp(data, __VA_ARGS__); } while(0) -#endif /* !CURL_DISABLE_FTP */ -#ifndef CURL_DISABLE_SMTP -#define CURL_TRC_SMTP(data, ...) \ -  do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_smtp)) \ -         Curl_trc_smtp(data, __VA_ARGS__); } while(0) -#endif /* !CURL_DISABLE_SMTP */ -#if defined(USE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP) -#define CURL_TRC_WS(data, ...) \ -  do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ws)) \ -         Curl_trc_ws(data, __VA_ARGS__); } while(0) -#endif /* USE_WEBSOCKETS && !CURL_DISABLE_HTTP */ - -#else /* CURL_HAVE_C99 */ +#else  #define infof Curl_infof  #define CURL_TRC_CF Curl_trc_cf_infof -#define CURL_TRC_WRITE Curl_trc_write -#define CURL_TRC_READ  Curl_trc_read - -#ifndef CURL_DISABLE_FTP -#define CURL_TRC_FTP   Curl_trc_ftp -#endif -#ifndef CURL_DISABLE_SMTP -#define CURL_TRC_SMTP  Curl_trc_smtp -#endif -#if defined(USE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP) -#define CURL_TRC_WS    Curl_trc_ws  #endif -#endif /* !CURL_HAVE_C99 */ -  #ifndef CURL_DISABLE_VERBOSE_STRINGS  /* informational messages enabled */ -struct curl_trc_feat { -  const char *name; -  int log_level; -}; -extern struct curl_trc_feat Curl_trc_feat_read; -extern struct curl_trc_feat Curl_trc_feat_write; - -#define Curl_trc_is_verbose(data) \ -            ((data) && (data)->set.verbose && \ -            (!(data)->state.feat || \ -             ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO))) +#define Curl_trc_is_verbose(data)    ((data) && (data)->set.verbose)  #define Curl_trc_cf_is_verbose(cf, data) \ -            (Curl_trc_is_verbose(data) && \ -             (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO) -#define Curl_trc_ft_is_verbose(data, ft) \ -            (Curl_trc_is_verbose(data) && \ -             (ft)->log_level >= CURL_LOG_LVL_INFO) +                            ((data) && (data)->set.verbose && \ +                            (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)  /**   * Output an informational message when transfer's verbose logging is enabled.   */  void Curl_infof(struct Curl_easy *data, -                const char *fmt, ...) CURL_PRINTF(2, 3); +#if defined(__GNUC__) && !defined(printf) && defined(CURL_HAVE_C99) &&  \ +  !defined(__MINGW32__) +                       const char *fmt, ...) +                       __attribute__((format(printf, 2, 3))); +#else +                       const char *fmt, ...); +#endif  /**   * Output an informational message when both transfer's verbose logging   * and connection filters verbose logging are enabled.   */  void Curl_trc_cf_infof(struct Curl_easy *data, struct Curl_cfilter *cf, -                       const char *fmt, ...) CURL_PRINTF(3, 4); -void Curl_trc_ft_infof(struct Curl_easy *data, struct curl_trc_feat *ft, -                       const char *fmt, ...) CURL_PRINTF(3, 4); -void Curl_trc_write(struct Curl_easy *data, -                    const char *fmt, ...) CURL_PRINTF(2, 3); -void Curl_trc_read(struct Curl_easy *data, -                   const char *fmt, ...) CURL_PRINTF(2, 3); - -#ifndef CURL_DISABLE_FTP -extern struct curl_trc_feat Curl_trc_feat_ftp; -void Curl_trc_ftp(struct Curl_easy *data, -                  const char *fmt, ...) CURL_PRINTF(2, 3); -#endif -#ifndef CURL_DISABLE_SMTP -extern struct curl_trc_feat Curl_trc_feat_smtp; -void Curl_trc_smtp(struct Curl_easy *data, -                   const char *fmt, ...) CURL_PRINTF(2, 3); -#endif -#if defined(USE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP) -extern struct curl_trc_feat Curl_trc_feat_ws; -void Curl_trc_ws(struct Curl_easy *data, -                 const char *fmt, ...) CURL_PRINTF(2, 3); +#if defined(__GNUC__) && !defined(printf) && defined(CURL_HAVE_C99) && \ +  !defined(__MINGW32__) +                      const char *fmt, ...) +                      __attribute__((format(printf, 3, 4))); +#else +                      const char *fmt, ...);  #endif -  #else /* defined(CURL_DISABLE_VERBOSE_STRINGS) */  /* All informational messages are not compiled in for size savings */ -#define Curl_trc_is_verbose(d)        (FALSE) -#define Curl_trc_cf_is_verbose(x,y)   (FALSE) -#define Curl_trc_ft_is_verbose(x,y)   (FALSE) +#define Curl_trc_is_verbose(d)        ((void)(d), FALSE) +#define Curl_trc_cf_is_verbose(x,y)   ((void)(x), (void)(y), FALSE)  static void Curl_infof(struct Curl_easy *data, const char *fmt, ...)  { @@ -195,38 +141,6 @@ static void Curl_trc_cf_infof(struct Curl_easy *data,    (void)data; (void)cf; (void)fmt;  } -struct curl_trc_feat; - -static void Curl_trc_ft_infof(struct Curl_easy *data, -                              struct curl_trc_feat *ft, -                              const char *fmt, ...) -{ -  (void)data; (void)ft; (void)fmt; -} - -static void Curl_trc_write(struct Curl_easy *data, const char *fmt, ...) -{ -  (void)data; (void)fmt; -} - -static void Curl_trc_read(struct Curl_easy *data, const char *fmt, ...) -{ -  (void)data; (void)fmt; -} - -#ifndef CURL_DISABLE_FTP -static void Curl_trc_ftp(struct Curl_easy *data, const char *fmt, ...) -{ -  (void)data; (void)fmt; -} -#endif -#ifndef CURL_DISABLE_SMTP -static void Curl_trc_smtp(struct Curl_easy *data, const char *fmt, ...) -{ -  (void)data; (void)fmt; -} -#endif -  #endif /* !defined(CURL_DISABLE_VERBOSE_STRINGS) */  #endif /* HEADER_CURL_TRC_H */  | 
