1
0
mirror of https://github.com/golang/go synced 2024-11-22 10:24:41 -07:00

go/build: allow colon in #cgo flags

This makes it possible to say -I c:/foo on Windows.

Fixes #2683 comment #3.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5540043
This commit is contained in:
Russ Cox 2012-01-12 11:05:54 -08:00
parent eb94327068
commit fb036824df

View File

@ -476,7 +476,7 @@ func (ctxt *Context) saveCgo(filename string, di *DirInfo, cg *ast.CommentGroup)
return nil return nil
} }
var safeBytes = []byte("+-.,/0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz") var safeBytes = []byte("+-.,/0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz:")
func safeName(s string) bool { func safeName(s string) bool {
if s == "" { if s == "" {