Add function prototypes

This commit is contained in:
Martin Kroeker 2022-08-13 11:38:27 +02:00 committed by GitHub
parent 8a5ad01acd
commit f703846ad9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 0 deletions

View File

@ -4000,6 +4000,22 @@ case "$p1" in
no_underscore_objs="$no_underscore_objs $misc_common_objs"
printf 'int main(void){\n'
for obj in $underscore_objs; do
[ "$obj" != "xerbla" ] && printf 'extern void %s%s%s%s();\n' \
"$symbolprefix" "$obj" "$bu" "$symbolsuffix"
done
for obj in $need_2underscore_objs; do
printf 'extern void %s%s%s%s%s();\n' \
"$symbolprefix" "$obj" "$bu" "$bu" "$symbolsuffix"
done
for obj in $no_underscore_objs; do
printf 'extern void %s%s%s();\n' \
"$symbolprefix" "$obj" "$symbolsuffix"
done
printf '\n'
for obj in $underscore_objs; do
[ "$obj" != "xerbla" ] && printf '%s%s%s%s();\n' \
"$symbolprefix" "$obj" "$bu" "$symbolsuffix"

View File

@ -3955,6 +3955,18 @@ if ($ARGV[0] eq "linktest") {
@no_underscore_objs = (@no_underscore_objs, @misc_common_objs);
print "int main(void){\n";
foreach $objs (@underscore_objs) {
print "extern void ", $symbolprefix, $objs, $bu, $symbolsuffix, "();\n" if $objs ne "xerbla";
}
foreach $objs (@need_2underscore_objs) {
print "extern void ", $symbolprefix, $objs, $bu, $bu, $symbolsuffix, "();\n";
}
foreach $objs (@no_underscore_objs) {
print "extern void ", $symbolprefix, $objs, $symbolsuffix, "();\n";
}
foreach $objs (@underscore_objs) {
print $symbolprefix, $objs, $bu, $symbolsuffix, "();\n" if $objs ne "xerbla";
}