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

Return to using a named constant #618

Open
irwir opened this issue Jun 16, 2022 · 2 comments
Open

Return to using a named constant #618

irwir opened this issue Jun 16, 2022 · 2 comments
Assignees
Milestone

Comments

@irwir
Copy link
Contributor

irwir commented Jun 16, 2022

The commit Use WINVER values instead of WIN32_WINNT[NAME]. goes against common practice of avoiding numerical constants.
It might be better to add conditional directives into one of the header files:

#if !defined(_WIN32_WINNT_VISTA)
#define _WIN32_WINNT_VISTA` 0x0600
#endif

Optionally, the value could be verified for being 0x0600 in #else branch.

With this change code might return to short and clear version as it was before Fix compilation when _WIN32_WINNT_VISTA macro is not defined

@miniupnp
Copy link
Owner

@irwir what do you mean ?
The commit 23f492f does not uses a numerical constant.

I guess you are talking about c1b6474

@irwir
Copy link
Contributor Author

irwir commented Jun 20, 2022

@miniupnp, you are right. I amended the issue text above.

@miniupnp miniupnp self-assigned this Jul 1, 2022
miniupnp added a commit that referenced this issue Oct 10, 2022
so it works correctly on both little endian and big endian CPUs
should fix #618
@miniupnp miniupnp added this to the miniupnpc_2.3 milestone May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants