The other form works for both msvc and gcc (see
http://codepad.org/VxF4pBHg for a proof (well, a proof that it
compiles with gcc, or at least a version of gcc)) so the #ifdef isn't
necessary, just use __VA_ARGS__ version. I verified that it compiles
with msvc 2005.

-- kjk

On Sun, Apr 27, 2008 at 2:18 PM, Aaron Gray
<[EMAIL PROTECTED]> wrote:
> Just signed onto fonc mailing list and am also in early stages of looking at
> MS VC porting of idc.
>
> Basically your going to have to do a #ifdef for the MS platforms.
>
> you need a comma and also a __VA_ARGS__ rather than a ##ARG, something like
> :-
>
> #ifndef _MSC_VER
>
>   #define _send(MSG, RCV, ARG...) ({     \
>     register oop _r= (RCV);      \
>     struct __closure *_c= (struct __closure *)_libid->bind((MSG), _r); \
>     (_c->method)((oop)_c, _r, _r, ##ARG);     \
>   })
>
> #else
>
>   #define _send(MSG, RCV, ...) ({     \
>     register oop _r= (RCV);      \
>     struct __closure *_c= (struct __closure *)_libid->bind((MSG), _r); \
>     (_c->method)((oop)_c, _r, _r, __VA_ARGS__);     \
>   })
>
> #endif
>
> Watch out for wrapped lines :)
>
> I have not tried the above as of yet but it should work.
>
> Aaron
> _______________________________________________
>  fonc mailing list
>  fonc@vpri.org
>  http://vpri.org/mailman/listinfo/fonc
>
>

_______________________________________________
fonc mailing list
fonc@vpri.org
http://vpri.org/mailman/listinfo/fonc

Reply via email to