[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-dev] [Patch] or/config.c for MSVC



Hello Gisle,

I will look into this later this week. Do you use the
workflow in building-tor-msvc.txt to build tor on
Windows?

2015-07-10 14:15, Gisle Vanem raÅÄ:
Ping list?

Gisle Vanem wrote:

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

Even MSVC v19 doesn't have such preprocessor magic. It's
gcc specific and not C99 I guess. Can you please use
'__VA_ARGS__' instead? Something like:

  #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

_______________________________________________
tor-dev mailing list
tor-dev@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev