]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cgo: fix windows build
authorElias Naur <elias.naur@gmail.com>
Wed, 14 Aug 2013 16:47:06 +0000 (12:47 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 14 Aug 2013 16:47:06 +0000 (12:47 -0400)
        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

src/cmd/cgo/out.go

index 140febb0085554a87151a2c7326e432b1b2a5b26..012e0365bb283945d5ac71d7f449240976207c81 100644 (file)
@@ -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 {