]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: use ERROR_IO_PENDING value in errnoErr
authorAlex Brainman <alex.brainman@gmail.com>
Fri, 23 Sep 2016 06:58:31 +0000 (16:58 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Sat, 22 Oct 2016 23:05:01 +0000 (23:05 +0000)
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>

src/internal/syscall/windows/registry/zsyscall_windows.go
src/internal/syscall/windows/zsyscall_windows.go
src/syscall/mksyscall_windows.go
src/syscall/zsyscall_windows.go

index 36ae303aa530790fd8796b427be25a1447a9c978..a3a1f5fc8f516a8bdabe15d8dea5e7079c7499ce 100644 (file)
@@ -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
index 55af05d3e9a0d94ea29a0a44fcc31a3a3748e6db..9ed977f2bd0e721db4ac87aaad47a3c91746664f 100644 (file)
@@ -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
index fcc847616cdfb3a15b571d50f5fb38977695c1c6..37e4a070cd99909c0af6c219f1cb53d3251f0b0d 100644 (file)
@@ -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
index c99e3cf532063807d51754de3b833e1aedd0d0ea..2283c792369c9811eac96fb29c473ad77e36bbd0 100644 (file)
@@ -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