switchname = \"$switchname\"
namesname = \"$namesname\"
infile = \"$input_file\"
+ infilepretty = \"${input_file#"$TARGET"}\"
"'
printf "/*\n" > syslegal
printf " * \n" > syslegal
printf " * System call switch table.\n *\n" > syslegal
printf " * DO NOT EDIT-- this file is automatically generated.\n" > syslegal
- printf " * created from %s\n */\n\n", infile > syslegal
+ printf " * created from %s\n */\n\n", infilepretty > syslegal
}
NR == 1 {
printf "\n/* The casts are bogus but will do for now. */\n" > sysent
else
printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, arg) > systraceargdesctempfile
if (index(arg, "*") > 0 || arg == "caddr_t")
- printf("\t\tuarg[%d] = (intptr_t) p->%s; /* %s */\n", \
+ printf("\t\tuarg[%d] = (uint64_t) p->%s; /* %s */\n", \
i - 1, \
argname[i], arg) > systraceargstempfile
else if (substr(arg, 1, 1) == "u" || arg == "size_t")
- printf("\t\tuarg[%d] = p->%s; /* %s */\n", \
+ printf("\t\tuarg[%d] = (uint64_t) p->%s; /* %s */\n", \
i - 1, \
argname[i], arg) > systraceargstempfile
else
- printf("\t\tiarg[%d] = p->%s; /* %s */\n", \
+ printf("\t\tiarg[%d] = (int64_t) p->%s; /* %s */\n", \
i - 1, \
argname[i], arg) > systraceargstempfile
}
printf("\n#endif /* !%s */\n", sysproto_h) > sysprotoend
printf("};\n") > sysent
- printf("const unsigned int nsysent = sizeof(sysent) / sizeof(sysent[0]);\n") > sysent
+ printf("const unsigned int nsysent = sizeof(sysent) / sizeof(sysent[0]);\n") > sysent
printf("};\n") > syscallnamestempfile
printf("#define\t%sMAXSYSCALL\t%d\n", syscallprefix, syscall_num) \
printf "\tdefault:\n\t\tbreak;\n\t};\n\tif (p != NULL)\n\t\tstrlcpy(desc, p, descsz);\n}\n" > systracerettempfile
} '
-# define value in syscall table file to permit redifintion because of the way
-# __private_extern__ (doesn't) work.
if [ $output_syscalltablefile -eq 1 ]; then
cat $syslegal > $syscalltablefile
- printf "#define __INIT_SYSENT_C__ 1\n" >> $syscalltablefile
cat $sysinc $sysent >> $syscalltablefile
fi