]> Cypherpunks repositories - gostls13.git/commit
cgo: omit duplicate symbols in writeDefs
authorJulian Phillips <julian@quantumfyre.co.uk>
Tue, 16 Aug 2011 18:56:23 +0000 (14:56 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 16 Aug 2011 18:56:23 +0000 (14:56 -0400)
commit01dd57b3125892e0dc2054436f29cafb38b0a3ef
treeaf5e5271c38fd5ec058258ea71e9ec911d77a0b7
parentf12e543255894c82533f556b71ffc9f5ce94f286
cgo: omit duplicate symbols in writeDefs

When the C API being used includes multiple names for the same
underlying symbol (e.g. multiple #define's for the same variable), then
cgo will generate the same placeholder variables for each name.  This
then prevents the code from compiling due to multiple declarations of
the same variable - so change cgo to only create one instance of the
variable for the underlying symbol.

R=rsc
CC=golang-dev
https://golang.org/cl/4826055
misc/cgo/test/Makefile
misc/cgo/test/duplicate_symbol.go [new file with mode: 0644]
src/cmd/cgo/out.go