Skip to content

Commit f0e9bc8

Browse files
authored
fix: correct EVENT_VERSION format and improve warning message (#2861)
1 parent 464d3e2 commit f0e9bc8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

premake/event/premake5.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
project "event"
22
kind "StaticLib"
33

4-
local EVENT_VERSION = (io.readfile("configure") or ""):match("NUMERIC_VERSION%s+0x(%x+)")
4+
local EVENT_VERSION = (io.readfile("configure") or ""):match("NUMERIC_VERSION%s+(0x%x+)")
55
if not EVENT_VERSION then
66
print("Warning: Could not determine libevent version from the configure file, assuming 2.1.12.")
7-
EVENT_VERSION = "02010c00" -- 2.1.12
7+
EVENT_VERSION = "0x02010c00" -- 2.1.12
88
end
9-
EVENT_VERSION = tonumber(EVENT_VERSION, 16)
9+
EVENT_VERSION = tonumber(EVENT_VERSION)
1010
if EVENT_VERSION>=0x02020000 then
1111
print("Warning: Using libevent version 2.2.x is not supported, please use 2.1.x, otherwise you may encounter issues.")
1212
end
1313
if EVENT_VERSION>=0x02010000 and WINXP_SUPPORT then
14-
print("Warning: libevent 2.1 uses some new APIs which require Windows Vista or later, so WinXP support will be not valid.")
14+
print("Warning: libevent 2.1 uses some new APIs which require Windows Vista or later, so WinXP support will be invalid.")
1515
end
1616

1717
includedirs { "include", "compat" }

0 commit comments

Comments
 (0)