diff options
Diffstat (limited to 'sys/kern/genassym.sh')
-rw-r--r-- | sys/kern/genassym.sh | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/kern/genassym.sh b/sys/kern/genassym.sh index 9ab8967c81d..e3296b99399 100644 --- a/sys/kern/genassym.sh +++ b/sys/kern/genassym.sh @@ -1,5 +1,5 @@ -# $OpenBSD: genassym.sh,v 1.1 1997/03/27 11:50:45 niklas Exp $ -# $NetBSD: genassym.sh,v 1.6 1997/03/13 22:47:20 gwr Exp $ +# $OpenBSD: genassym.sh,v 1.2 1997/07/25 05:20:52 mickey Exp $ +# $NetBSD: genassym.sh,v 1.7 1997/06/25 03:09:06 thorpej Exp $ # # Copyright (c) 1997 Matthias Pfaller. @@ -76,6 +76,22 @@ $0 ~ /^endif/ { next; } +/^struct[ \t]/ { + structname = $2; + $0 = "define " structname "_SIZEOF sizeof(struct " structname ")"; + /* fall through */ +} + +/^member[ \t]/ { + $0 = "define " $2 " offsetof(struct " structname ", " $2 ")"; + /* fall through */ +} + +/^export[ \t]/ { + $0 = "define " $2 " " $2; + /* fall through */ +} + /^define[ \t]/ { if (defining == 0) { defining = 1; |