Dragos Dumitrescu/Drugwash | 5 Sep 2008 05:46
X-Face
Picon
Favicon

Gadu-Gadu broken for ANSI

Hello, Adam!
I'm afraid latest changes to gg.h have broken ANSI compatibility. VC6
refuses to compile gg.h because of this:
#define gg_netlog(format, ...) gg_netlogex(gg, format, ## __VA_ARGS__)

Error log as following:
-------------------Configuration: GG - Win32 Release--------------------
Compiling...
gg.c
D:\miranda\trunk\miranda\protocols\Gadu-Gadu\gg.h(366) : error C2010:
'.' : unexpected in macro formal parameter list
D:\miranda\trunk\miranda\protocols\Gadu-Gadu\gg.h(366) : error C2010:
'.' : unexpected in macro formal parameter list
D:\miranda\trunk\miranda\protocols\Gadu-Gadu\gg.h(366) : error C2010:
'.' : unexpected in macro formal parameter list
D:\miranda\trunk\miranda\protocols\Gadu-Gadu\gg.h(366) : error C2010:
')' : unexpected in macro formal parameter list
Error executing cl.exe.

GG.dll - 4 error(s), 0 warning(s)

Apparently, macros with variable number of arguments are not supported
by ANSI C. I'd appreciate if you could find an alternative. Thank you.

Regards,
Drugwash
--

-- 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
(Continue reading)

Adam Strzelecki | 5 Sep 2008 09:51
Picon
Favicon
Gravatar

Re: Gadu-Gadu broken for ANSI

> I'm afraid latest changes to gg.h have broken ANSI compatibility. VC6
> refuses to compile gg.h because of this:
> #define gg_netlog(format, ...) gg_netlogex(gg, format, ## __VA_ARGS__)
> Apparently, macros with variable number of arguments are not supported
> by ANSI C. I'd appreciate if you could find an alternative. Thank you.

__VA_ARGS__ are ANSI C99 (which VC5 and GCC4 is), however not C89.  
This macro was needed to not make huge changes to the code itself on  
transition to multi-instance proto.
Anyway I'll try to fix it somehow to work with VC6, probably I'll get  
rid of this macro and change all gg_netlog.

Cheers,
--

-- 
Adam Strzelecki

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane