Hisham <h <at> hisham.hm> writes: > So, for example, when running Windows 7 do you want to build binary > rocks that only work on Windows 7 and above? Given that Windows > usually does binary distribution, I would assume the opposite: that > devs building binary rocks want to set the minimum compatible version > often to something lower than the latest-and-greatest version that > devs usually run. >
I do not think this is necessary. As i sad before luasocket use `inet_pton` function. This function available since Vista. But luasocket provide it`s own implementation of this functions. Now this control by LUASOCKET_INET_PTON[1] macro. And we can build luasocket that will work on Vista+ systems but also we still can support older versions. In other modules to support older version we also can provide smaller functionality. To define LUASOCKET_INET_PTON macro on Windows(i do not know how it works on other platforms) we could define #if defined(_WINDOWS) && _WIN32_WINNT < _WIN32_WINNT_VISTA #define LUASOCKET_INET_PTON #endif > > build = { > type = "builtin", > modules = { > foo = { > sources = { "foo.c", "bar.c" }, > defines = { "WINVER=$(WINVER)" }, > }, > > and then in the user's config.lua: > > variables = { > WINVER = "0x502" > } > > or even in the luarocks invocation: > > luarocks build foo-1.0-1.rockspec WINVER=0x504 > > (this takes precedence over config.lua). > > Note that if the rockspec includes "WINVER=$(WINVER)" but WINVER is > not set anywhere, LuaRocks reports "Warning: unmatched variable > WINVER" and proceeds by passing -DWINVER= (that is, empty). > This is what i ask for. But with one addition. I think luarocks should ether provide builtin variable WINVER or set this variable while install. Also may be there way to define default value to variable? defines = { "WINVER=$(WINVER ? 0x501)" } [1]https://github.com/diegonehab/luasocket/blob/master/src/inet.c#L514 ------------------------------------------------------------------------------ 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