diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-02-11 14:53:56 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-02-11 15:01:19 -0800 |
commit | 8dc2499aa62f768c6395c9754b8cabc1ce25c494 (patch) | |
tree | 43d7fd2bbfd7ad8c9625a718a5e8718889351994 /libgo/go/path/filepath | |
parent | 9a56779dbc4e2d9c15be8d31e36f2f59be7331a8 (diff) | |
download | gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.zip gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.tar.gz gcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.tar.bz2 |
libgo: update to Go1.18beta2
gotools/
* Makefile.am (go_cmd_cgo_files): Add ast_go118.go
(check-go-tool): Copy golang.org/x/tools directories.
* Makefile.in: Regenerate.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/384695
Diffstat (limited to 'libgo/go/path/filepath')
-rw-r--r-- | libgo/go/path/filepath/example_unix_test.go | 1 | ||||
-rw-r--r-- | libgo/go/path/filepath/example_unix_walk_test.go | 1 | ||||
-rw-r--r-- | libgo/go/path/filepath/path_test.go | 2 | ||||
-rw-r--r-- | libgo/go/path/filepath/path_unix.go | 1 | ||||
-rw-r--r-- | libgo/go/path/filepath/path_windows.go | 4 | ||||
-rw-r--r-- | libgo/go/path/filepath/symlink_unix.go | 1 |
6 files changed, 6 insertions, 4 deletions
diff --git a/libgo/go/path/filepath/example_unix_test.go b/libgo/go/path/filepath/example_unix_test.go index 4ce1009..b364cf0 100644 --- a/libgo/go/path/filepath/example_unix_test.go +++ b/libgo/go/path/filepath/example_unix_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows && !plan9 -// +build !windows,!plan9 package filepath_test diff --git a/libgo/go/path/filepath/example_unix_walk_test.go b/libgo/go/path/filepath/example_unix_walk_test.go index d72efce..86146db 100644 --- a/libgo/go/path/filepath/example_unix_walk_test.go +++ b/libgo/go/path/filepath/example_unix_walk_test.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build !windows && !plan9 -// +build !windows,!plan9 package filepath_test diff --git a/libgo/go/path/filepath/path_test.go b/libgo/go/path/filepath/path_test.go index 1be17df..85926ea 100644 --- a/libgo/go/path/filepath/path_test.go +++ b/libgo/go/path/filepath/path_test.go @@ -794,6 +794,8 @@ var winisabstests = []IsAbsTest{ {`c:a\b`, false}, {`c:\a\b`, true}, {`c:/a/b`, true}, + {`\\host\share`, true}, + {`\\host\share\`, true}, {`\\host\share\foo`, true}, {`//host/share/foo/bar`, true}, } diff --git a/libgo/go/path/filepath/path_unix.go b/libgo/go/path/filepath/path_unix.go index b0a6391..88d7325 100644 --- a/libgo/go/path/filepath/path_unix.go +++ b/libgo/go/path/filepath/path_unix.go @@ -3,7 +3,6 @@ // license that can be found in the LICENSE file. //go:build aix || darwin || dragonfly || freebsd || hurd || (js && wasm) || linux || netbsd || openbsd || solaris -// +build aix darwin dragonfly freebsd hurd js,wasm linux netbsd openbsd solaris package filepath diff --git a/libgo/go/path/filepath/path_windows.go b/libgo/go/path/filepath/path_windows.go index 445c868..b4d8ac3 100644 --- a/libgo/go/path/filepath/path_windows.go +++ b/libgo/go/path/filepath/path_windows.go @@ -45,6 +45,10 @@ func IsAbs(path string) (b bool) { if l == 0 { return false } + // If the volume name starts with a double slash, this is a UNC path. + if isSlash(path[0]) && isSlash(path[1]) { + return true + } path = path[l:] if path == "" { return false diff --git a/libgo/go/path/filepath/symlink_unix.go b/libgo/go/path/filepath/symlink_unix.go index 657945a..7bfe17e 100644 --- a/libgo/go/path/filepath/symlink_unix.go +++ b/libgo/go/path/filepath/symlink_unix.go @@ -1,5 +1,4 @@ //go:build !windows -// +build !windows package filepath |