diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2001-08-30 22:05:58 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2001-08-30 22:05:58 +0000 |
commit | 9be5855142af1e61b29fb3428b49b073be5ee4ee (patch) | |
tree | 7e6ee745e33c8363d405431bc2a35e20ae1fd164 /sys | |
parent | 20ddd96e73131f036a9826b9742214cad2c0b771 (diff) |
Add a simple protection against multiple inclusion of same headers.
This will be needed very soon.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/genassym.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/genassym.sh b/sys/kern/genassym.sh index 68325bb364d..6229d79037b 100644 --- a/sys/kern/genassym.sh +++ b/sys/kern/genassym.sh @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.sh,v 1.3 1997/07/25 05:39:16 mickey Exp $ +# $OpenBSD: genassym.sh,v 1.4 2001/08/30 22:05:57 miod Exp $ # $NetBSD: genassym.sh,v 1.7 1997/06/25 03:09:06 thorpej Exp $ # @@ -62,7 +62,10 @@ $0 ~ /^[ \t]*#.*/ || $0 ~ /^[ \t]*$/ { defining = 0; printf("}\n"); } - printf("#%s\n", $0); + if (includes[$0] == 0) { + printf("#%s\n", $0); + includes[$0] = 1; + } next; } |