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

Gisle Vanem gvanem at yahoo.no
Fri Jul 10 11:15:17 UTC 2015


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


-- 
--gv


More information about the tor-dev mailing list