Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syscall: Windows Errno constants invalid #32309

Open
networkimprov opened this issue May 29, 2019 · 3 comments

Comments

Projects
None yet
5 participants
@networkimprov
Copy link

commented May 29, 2019

These constants: https://golang.org/src/syscall/types_windows.go#L7

Should appear in these constants: https://golang.org/src/syscall/zerrors_windows.go#L16

... because the latter are currently useless for comparison with Errno values, unlike other supported OSes. For example err.(*os.PathError).Err == syscall.ENOTEMPTY is never true on Windows.

Filed at request of @rsc

@gopherbot add OS-Windows

@ianlancetaylor ianlancetaylor added this to the Go1.13 milestone May 29, 2019

@rsc

This comment has been minimized.

Copy link
Contributor

commented May 31, 2019

There do exist fake windows syscall Errnos. They won't go away entirely. But the fakes should only be used for traditional Unix errors that don't exist in Windows world. For example ENOENT and ENOTDIR already map to real windows errors instead of being provided by fakes. In the same way, ENOTEMPTY should map to ERROR_DIR_NOT_EMPTY. Perhaps there are others too. But to be clear, some (many) of the fakes will remain.

@networkimprov

This comment has been minimized.

Copy link
Author

commented May 31, 2019

I'm unclear why each Errno that cannot appear on windows has a unique value. I would expect them to share a value, e.g. 0xbad5eed.

@networkimprov

This comment has been minimized.

Copy link
Author

commented Jun 3, 2019

I think we're at NeedsFix here... Should this be assigned to someone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.