Skip to content

Fix GH-8267: MySQLi uses unsupported format specifier on Windows #8268

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

Closed
wants to merge 2 commits into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Mar 29, 2022

Instead of using the unsupported %I64u and %I64d format specifiers
on Windows, we use the portable PRIu64 and PRId64 specifiers.

The L64() macro and the my_longlong typedef should be adapted as
well, as the i64 literal suffix is still supported by MSVC, but using
LL or ll is recommended[1], and the standard int64_t is available
there anyway. This is not urgent, though.

[1] https://docs.microsoft.com/en-us/cpp/cpp/numeric-boolean-and-pointer-literals-cpp?view=msvc-170#integer-literals

cmb69 added 2 commits March 29, 2022 13:25
Instead of using the unsupported `%I64u` and `%I64d` format specifiers
on Windows, we use the portable `PRIu64` and `PRId64` specifiers.

The `L64()` macro and the `my_longlong` typedef should be adapted as
well, as the `i64` literal suffix is still supported by MSVC, but using
`LL` or `ll` is recommended[1], and the standard `int64_t` is available
there anyway.  This is not urgent, though.

[1] <https://docs.microsoft.com/en-us/cpp/cpp/numeric-boolean-and-pointer-literals-cpp?view=msvc-170#integer-literals>
@cmb69 cmb69 linked an issue Mar 29, 2022 that may be closed by this pull request
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

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

LGTM

@cmb69 cmb69 closed this in 7c702b7 Apr 7, 2022
@cmb69 cmb69 deleted the cmb/gh8267 branch April 7, 2022 15:08
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.

MySQLi uses unsupported format specifier on Windows
2 participants