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

adds putenv call to win32. #2964

Merged
merged 1 commit into from Oct 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions libc-test/semver/windows.txt
Expand Up @@ -261,6 +261,8 @@ popen
printf
ptrdiff_t
putchar
putenv
putenv_s
puts
raise
rand
Expand Down Expand Up @@ -340,6 +342,8 @@ wexecve
wexecvp
wexecvpe
wopen
wputenv
wputenv_s
write
wrmdir
wsetlocale
Expand Down
8 changes: 8 additions & 0 deletions src/windows/mod.rs
Expand Up @@ -509,6 +509,14 @@ extern "C" {
pub fn aligned_malloc(size: size_t, alignment: size_t) -> *mut c_void;
#[link_name = "_aligned_free"]
pub fn aligned_free(ptr: *mut ::c_void);
#[link_name = "_putenv"]
pub fn putenv(envstring: *const ::c_char) -> ::c_int;
#[link_name = "_wputenv"]
pub fn wputenv(envstring: *const ::wchar_t) -> ::c_int;
#[link_name = "_putenv_s"]
pub fn putenv_s(envstring: *const ::c_char, value_string: *const ::c_char) -> ::errno_t;
#[link_name = "_wputenv_s"]
pub fn wputenv_s(envstring: *const ::wchar_t, value_string: *const ::wchar_t) -> ::errno_t;
}

extern "system" {
Expand Down