On 22 August 2013 13:37, Alexey Melnichuk <mi...@newmail.ru> wrote:
> Thomas Harning Jr. <harningt@...> writes:
>>
>> The ideal situation would be for there to be some sort of information made
> available to the compiled C code (ex: TARGET_WINVER, TARGET__WIN32_WINNT,
> ...) that way the C code could do something like:
>>
>> #if TARGET_WINVER < DESIRED_WINVER
>> #error The compilation target is too old to support this module, ....
>> #else
>> #define _WINVER DESIRED_WINVER
>> #endif
>>
>
> Luarocks already know on which windows version it works. So it can define
> correct _WIN32_WINNT/WINVER.
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx
> I really do not understand why you need TARGET_WINVER/TARGET__WIN32_WINNT
> instead using directly _WIN32_WINNT/WINVER.
> Luasocket already need this facility. Now it manually define WINVER as
> 0x502(Win2k3) in rockspec. But i do not know is it work on Vista/Win7/etc.
> The problem only with cross-compiling. But i do not know how this is
> important. There no much binary rocks and there already big problem with
> runtime libraries.

The rockspec for
http://luarocks.org/repositories/rocks-scm/luasocket-3.0rc1-1.rockspec
defines 0x501 (whatever that means). What do you suggest? Should
LuaRocks automatically add -DWINVER=0x501 (or whatever number) every
time its builtin mode calls gcc? Should this extend to other modes
(through default CFLAGS)? What if the rockspec author wants to specify
a different WINVER -- is this something that makes sense to be defined
per rockspec or per build machine?

I'm worried that changing this may cause a compatibility problem with
rockspecs that already define WINVER explicitly (such as LuaSocket).

-- Hisham

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to