*/
bool buf_printf (struct buffer *buf, const char *format, ...)
#ifdef __GNUC__
- __attribute__ ((format (printf, 2, 3)))
+#if __USE_MINGW_ANSI_STDIO
+ __attribute__ ((format (gnu_printf, 2, 3)))
+#else
+ __attribute__ ((format (__printf__, 2, 3)))
+#endif
#endif
;
*/
bool openvpn_snprintf(char *str, size_t size, const char *format, ...)
#ifdef __GNUC__
- __attribute__ ((format (printf, 3, 4)))
+#if __USE_MINGW_ANSI_STDIO
+ __attribute__ ((format (gnu_printf, 3, 4)))
+#else
+ __attribute__ ((format (__printf__, 3, 4)))
+#endif
#endif
;
void x_msg (const unsigned int flags, const char *format, ...)
#ifdef __GNUC__
- __attribute__ ((format (printf, 2, 3)))
+#if __USE_MINGW_ANSI_STDIO
+ __attribute__ ((format (gnu_printf, 2, 3)))
+#else
+ __attribute__ ((format (__printf__, 2, 3)))
+#endif
#endif
; /* should be called via msg above */
void argv_printf (struct argv *a, const char *format, ...)
#ifdef __GNUC__
- __attribute__ ((format (printf, 2, 3)))
+#if __USE_MINGW_ANSI_STDIO
+ __attribute__ ((format (gnu_printf, 2, 3)))
+#else
+ __attribute__ ((format (__printf__, 2, 3)))
+#endif
#endif
;
void argv_printf_cat (struct argv *a, const char *format, ...)
#ifdef __GNUC__
- __attribute__ ((format (printf, 2, 3)))
+#if __USE_MINGW_ANSI_STDIO
+ __attribute__ ((format (gnu_printf, 2, 3)))
+#else
+ __attribute__ ((format (__printf__, 2, 3)))
+#endif
#endif
;
bool status_close (struct status_output *so);
void status_printf (struct status_output *so, const char *format, ...)
#ifdef __GNUC__
- __attribute__ ((format (printf, 2, 3)))
+#if __USE_MINGW_ANSI_STDIO
+ __attribute__ ((format (gnu_printf, 2, 3)))
+#else
+ __attribute__ ((format (__printf__, 2, 3)))
+#endif
#endif
;