summaryrefslogtreecommitdiff
path: root/libgo/go/net/error_windows_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-02-11 14:53:56 -0800
committerIan Lance Taylor <iant@golang.org>2022-02-11 15:01:19 -0800
commit8dc2499aa62f768c6395c9754b8cabc1ce25c494 (patch)
tree43d7fd2bbfd7ad8c9625a718a5e8718889351994 /libgo/go/net/error_windows_test.go
parent9a56779dbc4e2d9c15be8d31e36f2f59be7331a8 (diff)
downloadgcc-8dc2499aa62f768c6395c9754b8cabc1ce25c494.tar.gz
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/net/error_windows_test.go')
-rw-r--r--libgo/go/net/error_windows_test.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/libgo/go/net/error_windows_test.go b/libgo/go/net/error_windows_test.go
index 834a9de4411..25825f96f80 100644
--- a/libgo/go/net/error_windows_test.go
+++ b/libgo/go/net/error_windows_test.go
@@ -4,7 +4,10 @@
package net
-import "syscall"
+import (
+ "errors"
+ "syscall"
+)
var (
errTimedout = syscall.ETIMEDOUT
@@ -17,3 +20,10 @@ func isPlatformError(err error) bool {
_, ok := err.(syscall.Errno)
return ok
}
+
+func isENOBUFS(err error) bool {
+ // syscall.ENOBUFS is a completely made-up value on Windows: we don't expect
+ // a real system call to ever actually return it. However, since it is already
+ // defined in the syscall package we may as well check for it.
+ return errors.Is(err, syscall.ENOBUFS)
+}