On Tue, Jan 5, 2010 at 2:17 PM, Sergey Khorev wrote:
> Well,
>
>> Isn't that only checking the type of CPU that the vim binary was built
>> with, instead of whether it was built as an x64 binary?  Or does
>> defining WIN64 cause an x64 binary to be built instead?
>
> CPU in makefile defines target CPU.
> -DWIN64 passed to compiler does nothing besides pointing out to source
> code we are targeting x64 or IA64.

OK, then.

>> I'm not sure what has("win64") should be returning based only on
>> reading the help, but I'd imagine it should either be a) whether the
>> vim binary itself is a 64 bit binary, or  b) whether the OS that the
>> binary is running on is a 64-bit version of windows.  The latter seems
>> more useful, but I'm not sure just from the help.  If I'm right,
>> though, it would have to be a runtime test; nothing at compile time
>> could do the trick.
>
> Source code clearly states it was meant as a compile-time check:
> #ifdef WIN64
>        "win64",
> #endif
>
> Honestly, I'm not sure what's the point in knowledge what OS version
> we are running.

I can conceive of a plugin that dynamically loads a DLL - or another
program - that requires a 64-bit windows, which would need to know
that the host OS supports it.  In this case, you'd want to know that
the OS is 64 bit, even if the vim binary is 32-bit.  But as I said, I
can see the argument either way.  It should obviously be consistent
with whatever win16 and win32 do, so if they're compile-time
architecture checks, all is fine.

~Matt
-- 
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui