aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2016-09-23 16:58:31 +1000
committerAlex Brainman <alex.brainman@gmail.com>2016-10-22 23:05:01 +0000
commitb7477f386926e65bb99db4eb90820576f6533614 (patch)
tree916af67aa164e346bcb14305f7c7a23f2d62bf95 /src
parentb992c391d4aae64e147fc64c77ad41d61be8e2e7 (diff)
downloadgo-b7477f386926e65bb99db4eb90820576f6533614.tar.xz
syscall: use ERROR_IO_PENDING value in errnoErr
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>
Diffstat (limited to 'src')
-rw-r--r--src/internal/syscall/windows/registry/zsyscall_windows.go8
-rw-r--r--src/internal/syscall/windows/zsyscall_windows.go8
-rw-r--r--src/syscall/mksyscall_windows.go8
-rw-r--r--src/syscall/zsyscall_windows.go8
4 files changed, 20 insertions, 12 deletions
diff --git a/src/internal/syscall/windows/registry/zsyscall_windows.go b/src/internal/syscall/windows/registry/zsyscall_windows.go
index 36ae303aa5..a3a1f5fc8f 100644
--- a/src/internal/syscall/windows/registry/zsyscall_windows.go
+++ b/src/internal/syscall/windows/registry/zsyscall_windows.go
@@ -13,11 +13,11 @@ var _ unsafe.Pointer
// 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
@@ -26,8 +26,8 @@ func errnoErr(e syscall.Errno) error {
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
diff --git a/src/internal/syscall/windows/zsyscall_windows.go b/src/internal/syscall/windows/zsyscall_windows.go
index 55af05d3e9..9ed977f2bd 100644
--- a/src/internal/syscall/windows/zsyscall_windows.go
+++ b/src/internal/syscall/windows/zsyscall_windows.go
@@ -13,11 +13,11 @@ var _ unsafe.Pointer
// 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
@@ -26,8 +26,8 @@ func errnoErr(e syscall.Errno) error {
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
diff --git a/src/syscall/mksyscall_windows.go b/src/syscall/mksyscall_windows.go
index fcc847616c..37e4a070cd 100644
--- a/src/syscall/mksyscall_windows.go
+++ b/src/syscall/mksyscall_windows.go
@@ -831,8 +831,12 @@ var _ unsafe.Pointer
// 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
@@ -841,7 +845,7 @@ func errnoErr(e {{syscalldot}}Errno) error {
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
diff --git a/src/syscall/zsyscall_windows.go b/src/syscall/zsyscall_windows.go
index c99e3cf532..2283c79236 100644
--- a/src/syscall/zsyscall_windows.go
+++ b/src/syscall/zsyscall_windows.go
@@ -11,8 +11,12 @@ var _ unsafe.Pointer
// 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
@@ -21,7 +25,7 @@ func errnoErr(e Errno) error {
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