gofrontend: deduplicate C syscall function declarations
A gccgo language extension allows a function to be declared multiple times. Avoid the use of this extension by dedeplicating declarations in mksyscall.awk. From-SVN: r209508
This commit is contained in:
parent
e8ad3ca026
commit
5584c49a11
1 changed files with 5 additions and 2 deletions
|
@ -96,8 +96,11 @@ BEGIN {
|
|||
cfnresult = line
|
||||
|
||||
printf("// Automatically generated wrapper for %s/%s\n", gofnname, cfnname)
|
||||
printf("//extern %s\n", cfnname)
|
||||
printf("func c_%s(%s) %s\n", cfnname, cfnparams, cfnresult)
|
||||
if (!(cfnname in cfns)) {
|
||||
cfns[cfnname] = 1
|
||||
printf("//extern %s\n", cfnname)
|
||||
printf("func c_%s(%s) %s\n", cfnname, cfnparams, cfnresult)
|
||||
}
|
||||
printf("func %s(%s) %s%s%s%s{\n",
|
||||
gofnname, gofnparams, gofnresults == "" ? "" : "(", gofnresults,
|
||||
gofnresults == "" ? "" : ")", gofnresults == "" ? "" : " ")
|
||||
|
|
Loading…
Add table
Reference in a new issue