From a3e24ec490673845170052007673b3956cff651b Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 14 Aug 2005 01:59:32 +0000 Subject: [PATCH] added non c99 alternatives in examples/utils.h (thanks Mo) --- examples/utils.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/utils.h b/examples/utils.h index f9d94a26..3c48b652 100644 --- a/examples/utils.h +++ b/examples/utils.h @@ -26,9 +26,16 @@ #include #include -#define debug(...) if (verbose) fprintf (stderr, __VA_ARGS__) -#define errmsg(...) fprintf (stderr, __VA_ARGS__) -#define outmsg(...) fprintf (stdout, __VA_ARGS__) +#ifdef HAVE_C99_VARARGS_MACROS +#define debug(...) if (verbose) fprintf (stderr, __VA_ARGS__) +#define errmsg(...) fprintf (stderr, __VA_ARGS__) +#define outmsg(...) fprintf (stdout, __VA_ARGS__) +#else +#define debug(format, args...) if (verbose) fprintf(stderr, format , ##args) +#define errmsg(format, args...) fprintf(stderr, format , ##args) +#define outmsg(format, args...) fprintf(stdout, format , ##args) +#endif + extern int frames; extern int verbose; -- 2.26.2