mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-18 14:23:55 +00:00
Use prototypes in the generated builtins.{c,h} files.
This commit is contained in:
parent
202cd57290
commit
bfce4fe8c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149015
|
@ -58,9 +58,9 @@ cat <<\!
|
|||
!
|
||||
awk '/^[^#]/ {if(('$havejobs' || $2 != "-j") && ('$havehist' || $2 != "-h")) \
|
||||
print $0}' builtins.def | sed 's/-[hj]//' > $temp
|
||||
awk '{ printf "int %s();\n", $1}' $temp
|
||||
awk '{ printf "int %s(int, char **);\n", $1}' $temp
|
||||
echo '
|
||||
int (*const builtinfunc[])() = {'
|
||||
int (*const builtinfunc[])(int, char **) = {'
|
||||
awk '/^[^#]/ { printf "\t%s,\n", $1}' $temp
|
||||
echo '};
|
||||
|
||||
|
@ -87,6 +87,6 @@ struct builtincmd {
|
|||
int code;
|
||||
};
|
||||
|
||||
extern int (*const builtinfunc[])();
|
||||
extern int (*const builtinfunc[])(int, char **);
|
||||
extern const struct builtincmd builtincmd[];'
|
||||
rm -f $temp
|
||||
|
|
Loading…
Reference in a new issue