From: Russ Cox Date: Mon, 14 Nov 2011 06:21:38 +0000 (-0500) Subject: syscall: make windows Errno implement net.Error (fix build) X-Git-Tag: weekly.2011-11-18~80 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6677d2954eaa4d2ff89a5c962168440825b38611;p=gostls13.git syscall: make windows Errno implement net.Error (fix build) TBR=brainman CC=golang-dev https://golang.org/cl/5371086 --- diff --git a/src/pkg/syscall/dll_windows.go b/src/pkg/syscall/dll_windows.go index 461ce3f099..c6acdfce2c 100644 --- a/src/pkg/syscall/dll_windows.go +++ b/src/pkg/syscall/dll_windows.go @@ -15,6 +15,14 @@ func (e Errno) Error() string { return errstr(e) } +func (e Errno) Temporary() bool { + return e == EINTR || e == EMFILE || e.Timeout() +} + +func (e Errno) Timeout() bool { + return e == EAGAIN || e == EWOULDBLOCK || e == ETIMEDOUT +} + // DLLError describes reasons for DLL load failures. type DLLError struct { Err error