[Vm-dev] WIN32, _WIN32 and option: pragma

Eliot Miranda eliot.miranda at gmail.com
Fri Feb 16 23:10:25 UTC 2018


Hi Alistair,

On Mon, Feb 5, 2018 at 6:33 PM, Alistair Grant <akgrant0710 at gmail.com>
wrote:

>
> Hi Everyone,
>
> Would someone mind clarifying how I should be using the windows
> platform macros.  My understanding is:
>
> - WIN32 is defined by the VM build scripts on Windows 32 bit only
> - WIN64 is defined by the VM build scripts on Windows 64 bit only
> - _WIN32 is defined by the compiler on Windows 32 and 64 bit.
> - _WIN64 is defined by the compiler on Windows 64 bit only.
>
> If my understanding is incorrect, please correct me.
>
> If I want code that only runs on Windows (32 or 64 bit), I should
> check if _WIN32 is defined.
>
> The FileAttributesPlugin has a method with "<option: #WIN32>", which
> causes it to only be compiled on Windows 32 bit, while I also need it on
> Windows 64 bit.
>
> "<option: #_WIN32>" isn't recognised, so the code is never generated,
> and I couldn't figure out how to have #WIN32 OR #WIN64.
>

Sorry not to have got to this sooner, but the support is in there now.  So
by all means use <option: #_WIN32> now.


>
> What's the correct solution?
>
>
> Thanks!
> Alistair
>



-- 
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180216/b8d3095d/attachment-0001.html>


More information about the Vm-dev mailing list