Skip to content

Commit

Permalink
Auto merge of #2964 - devnexen:win32_putenv, r=JohnTitor
Browse files Browse the repository at this point in the history
adds putenv call to win32.

closes #2926.
  • Loading branch information
bors committed Oct 16, 2022
2 parents 937aeaa + 44450fe commit 998e886
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
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

0 comments on commit 998e886

Please sign in to comment.