From 12b1d1c1c55dcd32d23d13aaa93b7ac5ee5abc2e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 9 Oct 2022 12:35:01 +0200 Subject: [PATCH] windows/mkwinsyscall: remove errnoERROR_IO_PENDING const Signed-off-by: Sebastiaan van Stijn --- windows/mkwinsyscall/mkwinsyscall.go | 8 ++------ windows/registry/zsyscall_windows.go | 8 ++------ windows/zsyscall_windows.go | 8 ++------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/windows/mkwinsyscall/mkwinsyscall.go b/windows/mkwinsyscall/mkwinsyscall.go index b080c5399..4d4f22893 100644 --- a/windows/mkwinsyscall/mkwinsyscall.go +++ b/windows/mkwinsyscall/mkwinsyscall.go @@ -904,12 +904,8 @@ 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(errnoERROR_IO_PENDING) + errERROR_IO_PENDING error = {{windowsdot}}ERROR_IO_PENDING errERROR_EINVAL error = {{syscalldot}}EINVAL ) @@ -919,7 +915,7 @@ func errnoErr(e {{syscalldot}}Errno) error { switch e { case 0: return errERROR_EINVAL - case errnoERROR_IO_PENDING: + case {{windowsdot}}ERROR_IO_PENDING: return errERROR_IO_PENDING } // TODO: add more here, after collecting data on the common diff --git a/windows/registry/zsyscall_windows.go b/windows/registry/zsyscall_windows.go index fc1835d8a..ff329c1ae 100644 --- a/windows/registry/zsyscall_windows.go +++ b/windows/registry/zsyscall_windows.go @@ -13,12 +13,8 @@ var _ unsafe.Pointer // Do the interface allocations only once for common // Errno values. -const ( - errnoERROR_IO_PENDING = 997 -) - var ( - errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) + errERROR_IO_PENDING error = windows.ERROR_IO_PENDING errERROR_EINVAL error = syscall.EINVAL ) @@ -28,7 +24,7 @@ func errnoErr(e syscall.Errno) error { switch e { case 0: return errERROR_EINVAL - case errnoERROR_IO_PENDING: + case windows.ERROR_IO_PENDING: return errERROR_IO_PENDING } // TODO: add more here, after collecting data on the common diff --git a/windows/zsyscall_windows.go b/windows/zsyscall_windows.go index 96ba8559c..7511c00d7 100644 --- a/windows/zsyscall_windows.go +++ b/windows/zsyscall_windows.go @@ -11,12 +11,8 @@ var _ unsafe.Pointer // Do the interface allocations only once for common // Errno values. -const ( - errnoERROR_IO_PENDING = 997 -) - var ( - errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) + errERROR_IO_PENDING error = ERROR_IO_PENDING errERROR_EINVAL error = syscall.EINVAL ) @@ -26,7 +22,7 @@ func errnoErr(e syscall.Errno) error { switch e { case 0: return errERROR_EINVAL - case errnoERROR_IO_PENDING: + case ERROR_IO_PENDING: return errERROR_IO_PENDING } // TODO: add more here, after collecting data on the common