On 26 August 2013 19:01, Tom N Harris <tellia...@whoopdedo.org> wrote:
> On Monday, August 26, 2013 12:15:33 PM Hisham wrote:
>> This is technically incompatible, but sounds like a low-impact change.
>> Which brings us to the next question: how to determine the default
>> value of WINVER that should be autoset? This sounds like a task for
>> the Windows installer script. :) (after detecting the Windows version,
>> I suppose it could set LUAROCKS_WINVER in site_config.lua and then we
>> add `defaults.variables.WINVER = LUAROCKS_WINVER or "0x500"` to the
>> appropriate place in luarocks.cfg)
>
> The Windows SDK already gives you a default value if you don't define it
> before including <windows.h>. So the correct default for a build system is
> nothing at all.
>
> I don't like the idea. Why can't the people who want an unusual WINVER just
> put it the -DWINVER=0x501 cflag in their site config? A rock that expect a
> minumum version will define the macro in its source.
>
> There are too many compiler and API specific flags like this for LR to start
> getting involved with. i.e. UNICODE, LARGE_FILE_SOURCE, etc.

Those sound like good points to me as well (especially in light of a
default being already set by the Windows SDK). Tom is right pointing
out that this in fact works:

   luarocks build foo CFLAGS="-DWINVER=0x504"

(All builtin-type rocks respect that and most others should too. If
any doesn't, it's a bug in the rockspec.)

-- 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