Aaron Gray | 27 Apr 23:15

idc for windows platform

Hi,
 
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   
<div>
<div>
<div>Hi,</div>
<div>&nbsp;</div>
<div>Just signed onto&nbsp;fonc mailing list and am also 
in early stages of looking at MS VC porting of idc.</div>
<div>&nbsp;</div>
<div>Basically your going to have to do a #ifdef for the 
MS platforms.</div>
<div>&nbsp;</div>
<div>you need a comma and also a __VA_ARGS__ rather than 
a ##ARG, something like :-</div>
<div>&nbsp;</div>
<div>#ifndef _MSC_VER</div>
<div>&nbsp;</div>
<div>&nbsp; #define _send(MSG, RCV, ARG...) 
({&nbsp;&nbsp;&nbsp;&nbsp; \<br>&nbsp;&nbsp;&nbsp; register oop _r= 
(RCV);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<br>&nbsp;&nbsp;&nbsp; struct __closure 
*_c= (struct __closure *)_libid-&gt;bind((MSG), _r); \<br>&nbsp;&nbsp;&nbsp; 
(_c-&gt;method)((oop)_c, _r, _r, ##ARG);&nbsp;&nbsp;&nbsp;&nbsp; \<br>&nbsp; 
})</div>
<div>&nbsp;</div>
<div>#else</div>
<div>&nbsp;</div>
<div>&nbsp; #define _send(MSG, RCV, ...) 
({&nbsp;&nbsp;&nbsp;&nbsp; \<br>&nbsp;&nbsp;&nbsp; register oop _r= 
(RCV);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<br>&nbsp;&nbsp;&nbsp; struct __closure 
*_c= (struct __closure *)_libid-&gt;bind((MSG), _r); \<br>&nbsp;&nbsp;&nbsp; 
(_c-&gt;method)((oop)_c, _r, _r, __VA_ARGS__);&nbsp;&nbsp;&nbsp;&nbsp; 
\<br>&nbsp; })</div>
<div>&nbsp;</div>
<div>#endif</div>
<div>&nbsp;</div>
<div>Watch out for wrapped lines :)</div>
<div>&nbsp;</div>
<div>I have not tried the above as of yet but it should 
work.</div>
<div>&nbsp;</div>
<div>Aaron&nbsp;&nbsp;&nbsp; 
</div>
</div>
</div>

Gmane