1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$NetBSD: patch-cb,v 1.1 2006/01/19 04:21:39 rillig Exp $
Made the handling of the variadic macro arguments conforming to ISO C99.
--- src/utils.h.orig 2003-09-10 20:52:09.000000000 +0200
+++ src/utils.h 2006-01-19 04:26:14.000000000 +0100
@@ -44,7 +44,7 @@ unsigned long lcm(unsigned long x, unsig
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#ifdef HAVE_VARIADIC_MACROS
-#define fail(args...) __fail(__FILE__, __LINE__, __FUNCTION__, args)
+#define fail(...) __fail(__FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)
#else
void fail(const char *fmt, ...);
#endif
@@ -53,7 +53,7 @@ void __fail(const char *file, unsigned i
const char *func, const char *fmt, ...) __attribute__ ((__noreturn__));
#ifdef HAVE_VARIADIC_MACROS
-#define user_error(args...) __user_error(__FILE__, __LINE__, __FUNCTION__, args)
+#define user_error(...) __user_error(__FILE__, __LINE__, __FUNCTION__, __VA_ARGS__)
#else
void user_error(const char *fmt, ...);
#endif
|