From 47c0b33520adaafb81a0159101e20caa238a10a7 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 19 Sep 2003 00:50:01 +0000 Subject: [PATCH] #define PRINTF --- stepmania/src/global.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stepmania/src/global.h b/stepmania/src/global.h index 5bc1a31e93..6032012bd3 100644 --- a/stepmania/src/global.h +++ b/stepmania/src/global.h @@ -89,6 +89,14 @@ void SetCheckpoint( const char *file, int line, const char *message ); #define NORETURN #endif +/* Define a macro to tell the compiler that a function has printf() semantics, to + * aid warning output. */ +#if defined(__GNUC__) +#define PRINTF(a,b) __attribute__((format(__printf__,a,b))) +#else +#define PRINTF(a,b) +#endif + /* Use CStdString: */ #include "StdString.h"