Skip to content

: Provide std::getenv and std::system for UWP apps - #2850

Merged
Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
StephanTLavavej:wacky-apis
Jul 12, 2022
Merged

Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
StephanTLavavej:wacky-apis

Conversation

@StephanTLavavej

Copy link
Copy Markdown
Member

's using-declarations for making getenv and system available in namespace std were originally guarded by #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP when the Windows App Certification Kit was very restrictive.

OS-PR-1077295 "Add a bunch more CRT APIs to the WACK", merged on 2017-11-09, removed those guards from . Thus, we should remove the guards from , which will both simplify the header and improve conformance as viewed by UWP apps.

Noticed while implementing Standard Library Modules.

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added the enhancement Something can be improved label Jul 7, 2022
@AlexGuteniev

Copy link
Copy Markdown
Contributor

Shouldn't this be done with checking SDK version?

@sylveon

Copy link
Copy Markdown
Contributor

No, a newer SDK is not required for this to build. WACK is a validation suite and the Store always uses the latest copy of WACK. It will still build and run on SDKs older than the WACK fix.

@StephanTLavavej

Copy link
Copy Markdown
Member Author

Good question, Alex Guteniev (@AlexGuteniev). Adding to what Charles Milette (@sylveon) said, this UCRT change happened so long ago that it's always present in the UCRT headers shipping in VS 2022, so we don't need to worry about an ancient .

@StephanTLavavej

Copy link
Copy Markdown
Member Author

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

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

Labels

enhancement Something can be improved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants