From 7b6b9961bc2d9b84daeb42a5c8f8aeba293d207c Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Sun, 22 May 2016 20:42:51 +0200 Subject: [PATCH] fosphor/gl_font: Don't use the format __attribute__ when using MSVC Signed-off-by: Sylvain Munaut --- lib/fosphor/gl_font.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/fosphor/gl_font.h b/lib/fosphor/gl_font.h index 4a5c230..85a9da7 100644 --- a/lib/fosphor/gl_font.h +++ b/lib/fosphor/gl_font.h @@ -30,6 +30,12 @@ * \brief Basic OpenGL font rendering */ +#ifdef _MSC_VER +# define ATTR_FORMAT(a,b,c) +#else +# define ATTR_FORMAT(a,b,c) __attribute__((format(a,b,c))) +#endif + struct gl_font; @@ -60,7 +66,7 @@ void glf_draw_str(const struct gl_font *glf, void glf_printf(const struct gl_font *glf, float x, enum glf_align x_align, float y, enum glf_align y_align, - const char *fmt, ...) __attribute__((format(printf, 6, 7))); + const char *fmt, ...) ATTR_FORMAT(printf, 6, 7); void glf_begin(const struct gl_font *glf, float fg_color[3]); void glf_end(void);