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

putenv and friends are missing on Windows #2926

Closed
RReverser opened this issue Sep 26, 2022 · 1 comment · Fixed by #2964
Closed

putenv and friends are missing on Windows #2926

RReverser opened this issue Sep 26, 2022 · 1 comment · Fixed by #2964
Labels
C-API-request Category: API request

Comments

@RReverser
Copy link

_putenv, _wputenv, _putenv_s, _wputenv_s are currently missing.

They're important because, on Windows, std::env::set_var is implemented via SetEnvironmentVariableW WinAPI, which has a separate table from CRT (libc) implementation. As a result, if you're linking Rust with C code and want C code to see some dynamically set environment variables, putenv and friends are your only option.

@RReverser RReverser added the C-API-request Category: API request label Sep 26, 2022
@RReverser
Copy link
Author

More generally, it seems that most of the functions from Process and Environment Control
page are currently missing.

bors added a commit that referenced this issue Oct 16, 2022
@bors bors closed this as completed in 44450fe Oct 16, 2022
tatref pushed a commit to tatref/libc that referenced this issue Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-API-request Category: API request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant