diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-03-26 15:09:54 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1996-03-26 15:09:54 +0000 |
commit | 7286afc85c82c3638c2c4bc0028f896008ee8ddc (patch) | |
tree | 745d55651769e3f23eb9e32d847595df80f70839 /sys/kern/makesyscalls.sh | |
parent | 24109db2f091e388aefe92d70037a0fde2a7d998 (diff) |
From NetBSD: vnode_if.[ch] made machine independent.
very usefull (for <sys/vnode.h> inclusion).
from the other side this is really machine independent ...
tested w/ i386, but should not cause errors w/ other arch's.
pls, test it (don't forget to reconfig kernel ;)
Diffstat (limited to 'sys/kern/makesyscalls.sh')
-rw-r--r-- | sys/kern/makesyscalls.sh | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/sys/kern/makesyscalls.sh b/sys/kern/makesyscalls.sh index 8c94144ee2e..596c878abba 100644 --- a/sys/kern/makesyscalls.sh +++ b/sys/kern/makesyscalls.sh @@ -1,5 +1,5 @@ #! /bin/sh - -# $NetBSD: makesyscalls.sh,v 1.17 1995/10/07 06:28:31 mycroft Exp $ +# $NetBSD: makesyscalls.sh,v 1.18 1996/03/15 01:25:12 cgd Exp $ # # Copyright (c) 1994 Christopher G. Demetriou # All rights reserved. @@ -108,6 +108,9 @@ s/\$//g ' < $2 | $awk " $toupper BEGIN { + # to allow nested #if/#else/#endif sets + savedepth = 0 + sysnames = \"$sysnames\" sysprotos = \"$sysprotos\" sysnumhdr = \"$sysnumhdr\" @@ -177,17 +180,30 @@ $1 ~ /^#[ ]*if/ { print > sysent print > sysprotos print > sysnames - savesyscall = syscall + savesyscall[++savedepth] = syscall next } $1 ~ /^#[ ]*else/ { print > sysent print > sysprotos print > sysnames - syscall = savesyscall + if (savedepth <= 0) { + printf "%s: line %d: unbalenced #else\n", \ + infile, NR + exit 1 + } + syscall = savesyscall[savedepth] next } $1 ~ /^#/ { + if ($1 ~ /^#[ ]*endif/) { + if (savedepth <= 0) { + printf "%s: line %d: unbalenced #endif\n", \ + infile, NR + exit 1 + } + savedepth--; + } print > sysent print > sysprotos print > sysnames |