mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cgo: make file path work for windows
R=golang-dev, mattn.jp, adg CC=golang-dev https://golang.org/cl/4634043
This commit is contained in:
parent
380e5a3709
commit
c562fbc44e
4 changed files with 14 additions and 10 deletions
|
|
@ -18,6 +18,7 @@ import (
|
|||
"go/token"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"strings"
|
||||
)
|
||||
|
|
@ -228,7 +229,7 @@ func main() {
|
|||
}
|
||||
pkg := f.Package
|
||||
if dir := os.Getenv("CGOPKGPATH"); dir != "" {
|
||||
pkg = dir + "/" + pkg
|
||||
pkg = filepath.Join(dir, pkg)
|
||||
}
|
||||
p.PackagePath = pkg
|
||||
p.writeOutput(f, input)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue