summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2016-05-22 20:42:51 +0200
committerSylvain Munaut <tnt@246tNt.com>2016-05-22 22:34:22 +0200
commit7b6b9961bc2d9b84daeb42a5c8f8aeba293d207c (patch)
treeae0e8937c4dc65ae4853e7cefdf6bbb090e20f8f
parent1e4598ff3423190b5bf18819bd27863b334cb2ee (diff)
fosphor/gl_font: Don't use the format __attribute__ when using MSVCHEADmaster
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r--lib/fosphor/gl_font.h8
1 files changed, 7 insertions, 1 deletions
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);