<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 7, 2021 at 4:21 PM James K. Lowden <<a href="mailto:jklowden@schemamania.org">jklowden@schemamania.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 7 Jan 2021 01:25:43 +0100<br>
Heiko Lewin <<a href="mailto:hlewin@gmx.de" target="_blank">hlewin@gmx.de</a>> wrote:<br>
<br>
> Can't you just "#define WIN32 WIN32"?<br>
<br>
+1<br>
<br>
Why didn't I think of that? </blockquote><div><br></div><div>error: 'WIN32' was not declared in this scope<br>   13 | #define WIN32 WIN32<br>      |                             ^~~~~<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I think this is equivalent and portable:</blockquote><div><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">        #ifdef WIN32<br>        #define WIN32_WAS_SET  WIN32<br>        #undef WIN32<br>        #endif<br>        ....<br>        #ifdef WIN32_WAS_SET<br>        #define WIN32  WIN32_WAS_SET<br>        #undef WIN32_WAS_SET<br>        #endif</blockquote></div><div><br></div><div>C preprocessor does not work like that. None of these "tricks" would work.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
<br>
--jkl<br>
<br>
-- <br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org" target="_blank">cairo@cairographics.org</a><br>
<a href="https://lists.cairographics.org/mailman/listinfo/cairo" rel="noreferrer" target="_blank">https://lists.cairographics.org/mailman/listinfo/cairo</a><br>
</blockquote></div></div>