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

rl1987 rl1987 at sdf.lonestar.org
Tue Jul 14 19:11:41 UTC 2015


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



More information about the tor-dev mailing list