[tor-dev] [Patch] or/config.c for MSVC
Gisle Vanem
gvanem at yahoo.no
Tue May 19 19:20:11 UTC 2015
This gcc-centric macro in or/config.c doesn't work well in
MSVC v16/18:
#define COMPLAIN(args...) \
STMT_BEGIN log_warn(LD_CONFIG, args); STMT_END
I suggest it should be patched like this:
--- a/config.c 2015-05-06 22:22:09 +0000
+++ b/config.c 2015-05-06 23:15:57 +0000
@@ -2571,8 +2571,8 @@
#define REJECT(arg) \
STMT_BEGIN *msg = tor_strdup(arg); return -1; STMT_END
-#define COMPLAIN(args...) \
- STMT_BEGIN log_warn(LD_CONFIG, args); STMT_END
+#define COMPLAIN(args, ...) \
+ STMT_BEGIN log_warn(LD_CONFIG, args, ## __VA_ARGS__); STMT_END
/** Log a warning message iff <b>filepath</b> is not absolute.
* Warning message must contain option name <b>option</b> and
-------
All recent compilers supports '__VA_ARGS__'?
--
--gv
More information about the tor-dev
mailing list