So errnoErr can be used in other packages.
This is something I missed when I sent CL 28990.
Fixes #17539
Change-Id: I8ee3b79c4d70ca1e5b29e5b40024f7ae9a86061e
Reviewed-on: https://go-review.googlesource.com/29690
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
// Do the interface allocations only once for common
// Errno values.
const (
- errnoWSAEINPROGRESS = 10036
+ errnoERROR_IO_PENDING = 997
)
var (
- errWSAEINPROGRESS error = syscall.Errno(errnoWSAEINPROGRESS)
+ errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
)
// errnoErr returns common boxed Errno values, to prevent
switch e {
case 0:
return nil
- case errnoWSAEINPROGRESS:
- return errWSAEINPROGRESS
+ case errnoERROR_IO_PENDING:
+ return errERROR_IO_PENDING
}
// TODO: add more here, after collecting data on the common
// error values see on Windows. (perhaps when running
// Do the interface allocations only once for common
// Errno values.
const (
- errnoWSAEINPROGRESS = 10036
+ errnoERROR_IO_PENDING = 997
)
var (
- errWSAEINPROGRESS error = syscall.Errno(errnoWSAEINPROGRESS)
+ errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
)
// errnoErr returns common boxed Errno values, to prevent
switch e {
case 0:
return nil
- case errnoWSAEINPROGRESS:
- return errWSAEINPROGRESS
+ case errnoERROR_IO_PENDING:
+ return errERROR_IO_PENDING
}
// TODO: add more here, after collecting data on the common
// error values see on Windows. (perhaps when running
// Do the interface allocations only once for common
// Errno values.
+const (
+ errnoERROR_IO_PENDING = 997
+)
+
var (
- errERROR_IO_PENDING error = {{syscalldot}}Errno(ERROR_IO_PENDING)
+ errERROR_IO_PENDING error = {{syscalldot}}Errno(errnoERROR_IO_PENDING)
)
// errnoErr returns common boxed Errno values, to prevent
switch e {
case 0:
return nil
- case ERROR_IO_PENDING:
+ case errnoERROR_IO_PENDING:
return errERROR_IO_PENDING
}
// TODO: add more here, after collecting data on the common
// Do the interface allocations only once for common
// Errno values.
+const (
+ errnoERROR_IO_PENDING = 997
+)
+
var (
- errERROR_IO_PENDING error = Errno(ERROR_IO_PENDING)
+ errERROR_IO_PENDING error = Errno(errnoERROR_IO_PENDING)
)
// errnoErr returns common boxed Errno values, to prevent
switch e {
case 0:
return nil
- case ERROR_IO_PENDING:
+ case errnoERROR_IO_PENDING:
return errERROR_IO_PENDING
}
// TODO: add more here, after collecting data on the common