github.com/varialus/godfly@v0.0.0-20130904042352-1934f9f095ab/src/pkg/runtime/cgo/cgo.go (about) 1 // Copyright 2010 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 /* 6 Package cgo contains runtime support for code generated 7 by the cgo tool. See the documentation for the cgo command 8 for details on using cgo. 9 */ 10 package cgo 11 12 /* 13 14 #cgo darwin LDFLAGS: -lpthread 15 #cgo freebsd LDFLAGS: -lpthread 16 #cgo linux LDFLAGS: -lpthread 17 #cgo netbsd LDFLAGS: -lpthread 18 #cgo openbsd LDFLAGS: -lpthread 19 #cgo windows LDFLAGS: -lm -mthreads 20 21 #cgo CFLAGS: -Wall -Werror 22 23 */ 24 import "C" 25 26 // Supports _cgo_panic by converting a string constant to an empty 27 // interface. 28 29 func cgoStringToEface(s string, ret *interface{}) { 30 *ret = s 31 }