github.com/ader1990/go@v0.0.0-20140630135419-8c24447fa791/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 dragonfly LDFLAGS: -lpthread 16 #cgo freebsd LDFLAGS: -lpthread 17 #cgo linux LDFLAGS: -lpthread 18 #cgo netbsd LDFLAGS: -lpthread 19 #cgo openbsd LDFLAGS: -lpthread 20 #cgo windows LDFLAGS: -lm -mthreads 21 22 #cgo CFLAGS: -Wall -Werror 23 24 */ 25 import "C" 26 27 // Supports _cgo_panic by converting a string constant to an empty 28 // interface. 29 30 func cgoStringToEface(s string, ret *interface{}) { 31 *ret = s 32 }