#! /bin/sh -
-# @(#)makesyscalls.sh 8.1 (Berkeley) 6/11/93
+# @(#)makesyscalls.sh 8.2 (Berkeley) 4/3/95
set -e
printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysdcl
printf "\n#ifdef %s\n", compat > syscompat
- printf "#define compat(n, name) n, __CONCAT(o,name)\n\n" > syscompat
+ printf "#define compat(n, name) n, n * 4, __CONCAT(compat_43_,name)\n\n" > syscompat
printf "/*\n * System call names.\n *\n" > sysnames
printf " * DO NOT EDIT-- this file is automatically generated.\n" > sysnames
}
$2 == "STD" {
printf("int\t%s();\n", $4) > sysdcl
- printf("\t{ %d, %s },\t\t\t/* %d = %s */\n", \
- $3, $4, syscall, $5) > sysent
+ printf("\t{ %d, %d, %s },\t\t\t/* %d = %s */\n", \
+ $3, $3 * 4, $4, syscall, $5) > sysent
printf("\t\"%s\",\t\t\t/* %d = %s */\n", \
$5, syscall, $5) > sysnames
printf("#define\tSYS_%s\t%d\n", \
next
}
$2 == "COMPAT" {
- printf("int\to%s();\n", $4) > syscompat
+ printf("int\tcompat_43_%s();\n", $4) > syscompat
printf("\t{ compat(%d,%s) },\t\t/* %d = old %s */\n", \
$3, $4, syscall, $5) > sysent
printf("\t\"old.%s\",\t\t/* %d = old %s */\n", \
next
}
$2 == "LIBCOMPAT" {
- printf("int\to%s();\n", $4) > syscompat
+ printf("int\tcompat_43_%s();\n", $4) > syscompat
printf("\t{ compat(%d,%s) },\t\t/* %d = old %s */\n", \
$3, $4, syscall, $5) > sysent
printf("\t\"old.%s\",\t\t/* %d = old %s */\n", \
next
}
$2 == "OBSOL" {
- printf("\t{ 0, nosys },\t\t\t/* %d = obsolete %s */\n", \
+ printf("\t{ 0, 0, nosys },\t\t\t/* %d = obsolete %s */\n", \
syscall, comment) > sysent
printf("\t\"obs_%s\",\t\t\t/* %d = obsolete %s */\n", \
$4, syscall, comment) > sysnames
next
}
$2 == "UNIMPL" {
- printf("\t{ 0, nosys },\t\t\t/* %d = %s */\n", \
+ printf("\t{ 0, 0, nosys },\t\t\t/* %d = %s */\n", \
syscall, comment) > sysent
printf("\t\"#%d\",\t\t\t/* %d = %s */\n", \
syscall, syscall, comment) > sysnames
}
END {
printf("\n#else /* %s */\n", compat) > syscompat
- printf("#define compat(n, name) 0, nosys\n") > syscompat
+ printf("#define compat(n, name) 0, 0, nosys\n") > syscompat
printf("#endif /* %s */\n\n", compat) > syscompat
printf("};\n\n") > sysent