-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
swprintf does not reset errno under Visual Studio 2013 #614
Comments
The fmt library doesn't use |
@vitaut Thank you for the quick reply. Just to clarify, does this mean that users of fmtlib need to be aware that using it can potentially change global state and treat it like any other system call that can alter |
Technically yes, but it shouldn't really matter, because to use
So I don't think that preserving |
I have encountered an issue with
errno
remaining set toERANGE
when using this library under Windows. It turns out that the following code:when compiled with Visual Studio 2013 will output:
and when compiled with Visual Studio 2017 will output:
According to the documentation:
And, looking into the documentation for
errno
:Given this inconsistent behaviour, I am wondering if fmtlib should attempt to call
_set_errno(0)
after invoking such functions.The text was updated successfully, but these errors were encountered: