static void
ch_error(channel_T *ch, const char *fmt, ...)
-#ifdef __GNUC__
-__attribute__((format(printf, 2, 3)))
+#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
+ __attribute__((format(printf, 2, 3)))
#endif
;
_RTLENTRYF
# endif
vim_snprintf_add(char *, size_t, char *, ...)
-#ifdef __GNUC__
+#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
__attribute__((format(printf, 3, 4)))
#endif
;
_RTLENTRYF
# endif
vim_snprintf(char *, size_t, char *, ...)
-#ifdef __GNUC__
+#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
__attribute__((format(printf, 3, 4)))
#endif
;
/* Not generated automatically, to add extra attribute. */
void ch_log(channel_T *ch, const char *fmt, ...)
-#ifdef __GNUC__
+#ifdef USE_PRINTF_FORMAT_ATTRIBUTE
__attribute__((format(printf, 2, 3)))
#endif
;
typedef struct stat stat_T;
#endif
+#if defined(__GNUC__) && !defined(__MINGW32__)
+# define USE_PRINTF_FORMAT_ATTRIBUTE
+#endif
+
typedef enum
{
ASSERT_EQUAL,