Skip to content

curl_setup.h: move UWP detection after config-win32.h#17980

Closed
vszakats wants to merge 2 commits intocurl:masterfrom
vszakats:w-uwp-init
Closed

curl_setup.h: move UWP detection after config-win32.h#17980
vszakats wants to merge 2 commits intocurl:masterfrom
vszakats:w-uwp-init

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jul 20, 2025

To honor a _WIN32_WINNT set by config-win32.h.

@vszakats vszakats added build Windows Windows-specific labels Jul 20, 2025
@vszakats vszakats closed this in 792a61e Jul 21, 2025
@vszakats vszakats deleted the w-uwp-init branch July 21, 2025 13:02
@vszakats
Copy link
Member Author

vszakats commented Jul 24, 2025

Solving this problem created another: config-win32.h turns out to
depend on the the result of UWP detection to set USE_WIN32_CRYPTO
and LDAP. But now this is done after this header, because UWP detection
itself depends on this header...

I'm not sure which bug causes less issues. The use-case is very niche:
UWP builds done with winbuild/project-file. These probably did not
(always?) work regardless of this patch.

edit: The _WIN32_WINNT setting logic seems to be there to override
default/minimum for MSVC compilers (for winbuild/project file builds).
I wonder if this is still necessary, in the light of having VS2008 (soon
VS2010) as minimum toolchains?

vszakats added a commit to vszakats/curl that referenced this pull request Jul 24, 2025
This change wasn't good because `config-win32.h` does rely on the UWP
detection result to set `USE_WIN32_CRYPTO` and LDAP macros. While it
fixed one issue, it created another.

It seems better to revert, and focus on reducing and/or eventually
dropping the logic within `config-win32.h` that alters `_WIN32_WINNT`.
It may not be necessary anymore with a minimum of VS2008 (soon VS2010).
The logic is also absent from cmake builds, without causing issues.

Builds affected winbuild/project-file for UWP. These are theoretical
builds because neither build method is prepared to target UWP.

Reverts 792a61e curl#17980
vszakats added a commit that referenced this pull request Jul 24, 2025
This change wasn't good because `config-win32.h` does rely on the UWP
detection result to set `USE_WIN32_CRYPTO` and LDAP macros. While it
fixed one issue, it created another.

It seems better to revert, and focus on reducing and/or eventually
dropping the logic within `config-win32.h` that alters `_WIN32_WINNT`.
It may not be necessary anymore with a minimum of VS2008 (soon VS2010).
The logic is also absent from cmake builds, without causing issues.

Could affect UWP winbuild/project-file builds. These are theoretical
builds because neither build method is prepared to target UWP.

Reverts 792a61e #17980
Ref: #17980 (comment)

Closes #18014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

1 participant