27 Apr 23:15
idc for windows platform
From: Aaron Gray <aaronngray.lists@...>
Subject: idc for windows platform
Newsgroups: gmane.comp.lang.smalltalk.fonc
Date: 2008-04-27 21:18:10 GMT
Subject: idc for windows platform
Newsgroups: gmane.comp.lang.smalltalk.fonc
Date: 2008-04-27 21:18:10 GMT
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); \
})
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__); \
})
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> </div>
<div>Just signed onto fonc mailing list and am also
in early stages of looking at MS VC porting of idc.</div>
<div> </div>
<div>Basically your going to have to do a #ifdef for the
MS platforms.</div>
<div> </div>
<div>you need a comma and also a __VA_ARGS__ rather than
a ##ARG, something like :-</div>
<div> </div>
<div>#ifndef _MSC_VER</div>
<div> </div>
<div> #define _send(MSG, RCV, ARG...)
({ \<br> register oop _r=
(RCV); \<br> struct __closure
*_c= (struct __closure *)_libid->bind((MSG), _r); \<br>
(_c->method)((oop)_c, _r, _r, ##ARG); \<br>
})</div>
<div> </div>
<div>#else</div>
<div> </div>
<div> #define _send(MSG, RCV, ...)
({ \<br> register oop _r=
(RCV); \<br> struct __closure
*_c= (struct __closure *)_libid->bind((MSG), _r); \<br>
(_c->method)((oop)_c, _r, _r, __VA_ARGS__);
\<br> })</div>
<div> </div>
<div>#endif</div>
<div> </div>
<div>Watch out for wrapped lines :)</div>
<div> </div>
<div>I have not tried the above as of yet but it should
work.</div>
<div> </div>
<div>Aaron
</div>
</div>
</div>
RSS Feed