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

Fix macro expression that guards snprintf for Windows #727

Merged
merged 1 commit into from
Apr 21, 2024

Conversation

hebasto
Copy link
Contributor

@hebasto hebasto commented Apr 20, 2024

The check for snprintf support is currently broken, as it fails to handle all documented cases. Specifically, snprintf is needlessly emulated for the following scenarios:

  • mingw-w64 6.0.0 or new with ucrt
  • mingw-w64 8.0.0 or new with iso c ext

For more details, please refer to https://godbolt.org/z/ov3oGj9sz.

This PR resolves the issue and can be verified using https://godbolt.org/z/fWzMT5TeW.

Otherwise, the `snprintf` is still wrongly emulated for the following
cases:
 - mingw-w64 6.0.0 or new with ucrt
 - mingw-w64 8.0.0 or new with iso c ext
@miniupnp miniupnp self-assigned this Apr 21, 2024
@miniupnp miniupnp added miniupnpc windows bug related to MS Windows build build labels Apr 21, 2024
@miniupnp miniupnp merged commit 9a575da into miniupnp:master Apr 21, 2024
30 checks passed
@hebasto hebasto deleted the 240420-mingw-snprintf branch April 21, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build miniupnpc windows bug related to MS Windows build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants