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

filefn.cpp: Use portable error codes #8

Open
wants to merge 1 commit into
base: audacity-fixes-3.1.3
Choose a base branch
from

Conversation

falkTX
Copy link

@falkTX falkTX commented May 9, 2021

I was getting a build error on my current mingw64 setup.
_get_doserrno usage seems a little problematic. looking up the function online I came across the official Microsoft page
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/get-doserrno?view=msvc-160

In there it states:

We recommend _get_errno instead of _get_doserrno for portable error codes

This PR replaces _get_doserrno with _get_errno and adjusts the errno codes accordingly.

Microsoft own page states in
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/get-doserrno?view=msvc-160

> We recommend _get_errno instead of _get_doserrno for portable error codes

Signed-off-by: falkTX <[email protected]>
@falkTX
Copy link
Author

falkTX commented May 9, 2021

Just realized a similar thing was attempted in #2
Looking at the code this one seems better.

Copy link

@BenBE BenBE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants