diff options
author | jilles <jilles@FreeBSD.org> | 2011-06-13 21:03:27 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-06-13 21:03:27 +0000 |
commit | 16addb86733d970dc3f900be1a0536276292efbe (patch) | |
tree | 007f3e31e27062e0bd6f94d06d03f38056fc4685 /bin/sh/mkbuiltins | |
parent | 83fe27f2b389dab3f912243ac3e6a6b726ebed3a (diff) | |
download | FreeBSD-src-16addb86733d970dc3f900be1a0536276292efbe.zip FreeBSD-src-16addb86733d970dc3f900be1a0536276292efbe.tar.gz |
sh: Fix duplicate prototypes for builtins.
Have mkbuiltins write the prototypes for the *cmd functions to builtins.h
instead of builtins.c and include builtins.h in more .c files instead of
duplicating prototypes for *cmd functions in other headers.
Diffstat (limited to 'bin/sh/mkbuiltins')
-rwxr-xr-x | bin/sh/mkbuiltins | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/sh/mkbuiltins b/bin/sh/mkbuiltins index b78729a..49af058 100755 --- a/bin/sh/mkbuiltins +++ b/bin/sh/mkbuiltins @@ -58,9 +58,7 @@ cat <<\! ! awk '/^[^#]/ {if(('$havejobs' || $2 != "-j") && ('$havehist' || $2 != "-h")) \ print $0}' builtins.def | sed 's/-[hj]//' > $temp -awk '{ printf "int %s(int, char **);\n", $1}' $temp -echo ' -int (*const builtinfunc[])(int, char **) = {' +echo 'int (*const builtinfunc[])(int, char **) = {' awk '/^[^#]/ { printf "\t%s,\n", $1}' $temp echo '}; @@ -94,5 +92,7 @@ struct builtincmd { }; extern int (*const builtinfunc[])(int, char **); -extern const struct builtincmd builtincmd[];' +extern const struct builtincmd builtincmd[]; +' +awk '{ printf "int %s(int, char **);\n", $1}' $temp rm -f $temp |