2 print "#include <errno.h>";
3 print "#include <mach/error.h>";
4 print "#include <errorlib.h>";
5 print "#define static static const";
6 nsubs =
split(subsys
, subs
);
7 while (nsubs
> 0) printf "#include \"%s\"\n", subs
[nsubs
--];
9 const struct error_system __mach_error_systems[err_max_system + 1] =";
12 /^static.
*err_
[a
-z0
-9A
-Z_
]+_sub
*\
[/ {
13 s = $
0; sub(/^.
*err_
/, "", s
); sub(/_sub.
*$
/, "", s
);
14 printf " [err_get_system (err_%s)] = { errlib_count (err_%s_sub),",
16 printf "\"(system %s) error with unknown subsystem\", err_%s_sub },\n",
22 const int __mach_error_system_count = errlib_count (__mach_error_systems);";