Check for and use appropriate type of variadic macro arguments.
[srvx.git] / src / mod-blacklist.c
index 5c39a1e05138fd020dc6f16526f5bc8685f2bcd5..0e8efbefbf9aa4bc77d6ac9e320b88db1d045aee 100644 (file)
@@ -52,7 +52,11 @@ static struct {
     unsigned long gline_duration;
 } conf;
 
-#define blacklist_debug(format...) do { if (conf.debug_bot && conf.debug_channel) send_channel_notice(conf.debug_channel , conf.debug_bot , ## format); } while (0)
+#if defined(GCC_VARMACROS)
+# define blacklist_debug(ARGS...) do { if (conf.debug_bot && conf.debug_channel) send_channel_notice(conf.debug_channel, conf.debug_bot, ARGS); } while (0)
+#elif defined(C99_VARMACROS)
+# define blacklist_debug(...) do { if (conf.debug_bot && conf.debug_channel) send_channel_notice(conf.debug_channel, conf.debug_bot, __VA_ARGS__); } while (0)
+#endif
 
 static void
 do_expandos(char *output, unsigned int out_len, const char *input, ...)