From 64294f4ac5b1b41e95f20a827c2aead301becb92 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 23 Feb 2010 15:08:22 -0500 Subject: Make progress bars better. --- dimension/utility.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'dimension/utility.h') diff --git a/dimension/utility.h b/dimension/utility.h index d4ebda4..beb818e 100644 --- a/dimension/utility.h +++ b/dimension/utility.h @@ -17,11 +17,13 @@ * along with this program. If not, see . * *************************************************************************/ -#ifndef __GNUC__ - #define __attribute__(x) +#if defined(__GNUC__) || defined(__attribute__) + #define DMNSN_PRINTF_WARN(f, a) __attribute__((format (printf, f, a))) +#else + #define DMNSN_PRINTF_WARN(f, a) #endif /* Print a parsing diagnostic to stderr */ void dmnsn_diagnostic(const char *filename, int line, int col, const char *format, ...) - __attribute__ ((format (printf, 4, 5))); + DMNSN_PRINTF_WARN(4, 5); -- cgit v1.2.3