git: ed8a4423fba4 - main - makesyscalls: allow multiple expressions for each abi change
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 22 Nov 2021 22:37:45 UTC
The branch main has been updated by brooks:
URL: https://cgit.FreeBSD.org/src/commit/?id=ed8a4423fba42f0aca5cfa3ce4aa1c763fdf578d
commit ed8a4423fba42f0aca5cfa3ce4aa1c763fdf578d
Author: Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-11-22 22:36:56 +0000
Commit: Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-11-22 22:36:56 +0000
makesyscalls: allow multiple expressions for each abi change
Limitations in lua patterns means we need to be able to match more
than one possible expression.
Reviewed by: kevans
---
sys/tools/makesyscalls.lua | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua
index 1f646d64e2e4..622a6ad4b1dd 100644
--- a/sys/tools/makesyscalls.lua
+++ b/sys/tools/makesyscalls.lua
@@ -130,18 +130,24 @@ end
local known_abi_flags = {
long_size = {
value = 0x00000001,
- expr = "_Contains[a-z_]*_long_",
+ exprs = {
+ "_Contains[a-z_]*_long_",
+ },
},
time_t_size = {
value = 0x00000002,
- expr = "_Contains[a-z_]*_timet_",
+ exprs = {
+ "_Contains[a-z_]*_timet_",
+ },
},
pointer_args = {
value = 0x00000004,
},
pointer_size = {
value = 0x00000008,
- expr = "_Contains[a-z_]*_ptr_",
+ exprs = {
+ "_Contains[a-z_]*_ptr_",
+ },
},
}
@@ -552,9 +558,13 @@ end
local function check_abi_changes(arg)
for k, v in pairs(known_abi_flags) do
- local expr = v["expr"]
- if abi_changes(k) and expr ~= nil and arg:find(expr) then
- return true
+ local exprs = v["exprs"]
+ if abi_changes(k) and exprs ~= nil then
+ for _, e in pairs(exprs) do
+ if arg:find(e) then
+ return true
+ end
+ end
end
end