summaryrefslogtreecommitdiff
path: root/libs/libcurl/include/curl/mprintf.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libcurl/include/curl/mprintf.h')
-rw-r--r--libs/libcurl/include/curl/mprintf.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/libcurl/include/curl/mprintf.h b/libs/libcurl/include/curl/mprintf.h
index fe27d98c1d..9fb67c1abd 100644
--- a/libs/libcurl/include/curl/mprintf.h
+++ b/libs/libcurl/include/curl/mprintf.h
@@ -32,13 +32,18 @@
extern "C" {
#endif
+#ifndef CURL_TEMP_PRINTF
#if (defined(__GNUC__) || defined(__clang__) || \
defined(__IAR_SYSTEMS_ICC__)) && \
defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \
!defined(CURL_NO_FMT_CHECKS)
#if defined(__MINGW32__) && !defined(__clang__)
+#if defined(__MINGW_PRINTF_FORMAT) /* mingw-w64 3.0.0+. Needs stdio.h. */
#define CURL_TEMP_PRINTF(fmt, arg) \
- __attribute__((format(gnu_printf, fmt, arg)))
+ __attribute__((format(__MINGW_PRINTF_FORMAT, fmt, arg)))
+#else
+#define CURL_TEMP_PRINTF(fmt, arg)
+#endif
#else
#define CURL_TEMP_PRINTF(fmt, arg) \
__attribute__((format(printf, fmt, arg)))
@@ -46,6 +51,7 @@ extern "C" {
#else
#define CURL_TEMP_PRINTF(fmt, arg)
#endif
+#endif
CURL_EXTERN int curl_mprintf(const char *format, ...)
CURL_TEMP_PRINTF(1, 2);