From: Elias Naur Date: Wed, 14 Aug 2013 16:47:06 +0000 (-0400) Subject: cmd/cgo: fix windows build X-Git-Tag: go1.2rc2~587 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a5f257a042f19dfe0023a0e5ad7dd673b32ad087;p=gostls13.git cmd/cgo: fix windows build The shared library changes broke the windows build because __attribute__ ((visibility ("hidden"))) is not supported in windows gcc. This change removes the attribute, as it is only needed when building shared libraries. R=rsc CC=golang-dev https://golang.org/cl/12829044 --- diff --git a/src/cmd/cgo/out.go b/src/cmd/cgo/out.go index 140febb008..012e0365bb 100644 --- a/src/cmd/cgo/out.go +++ b/src/cmd/cgo/out.go @@ -494,7 +494,7 @@ func (p *Package) writeOutputFunc(fgcc *os.File, n *Name) { // Gcc wrapper unpacks the C argument struct // and calls the actual C function. - fmt.Fprintf(fgcc, "__attribute__ ((visibility (\"hidden\"))) void\n") + fmt.Fprintf(fgcc, "void\n") fmt.Fprintf(fgcc, "_cgo%s%s(void *v)\n", cPrefix, n.Mangle) fmt.Fprintf(fgcc, "{\n") if n.AddError {