diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 705bc9dac800c..7551bd45f8396 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -111,6 +111,7 @@ ; limited set of output files. Before the first syscalls, #include lines will ; be copied and %%ABI_HEADERS%% expanded. Between system call entries, ; all lines beginning with # will be copied. Caveat Emptor. +; WARNING: this functionality is deprecated. #include #include diff --git a/sys/tools/syscalls/core/freebsd-syscall.lua b/sys/tools/syscalls/core/freebsd-syscall.lua index 1f82dd414ea0b..49b2781a6a39d 100644 --- a/sys/tools/syscalls/core/freebsd-syscall.lua +++ b/sys/tools/syscalls/core/freebsd-syscall.lua @@ -50,6 +50,7 @@ function FreeBSDSyscall:parseSysfile() local incs = "" local prolog = "" local first = true + local cpp_warned = false local s for line in fh:lines() do line = line:gsub(commentExpr, "") -- Strip any comments. @@ -82,6 +83,11 @@ function FreeBSDSyscall:parseSysfile() incs = incs .. h .. "\n" end elseif line:match("^#") then + if not cpp_warned then + util.warn("use of non-include cpp " .. + "directives is deprecated") + cpp_warned = true + end prolog = prolog .. line .. "\n" else s = syscall:new()