pub fn unsetenv(n: &str) {
    #[cfg(unix)]
    fn _unsetenv(n: &str) {
        unsafe {
            with_env_lock(|| {
                n.with_c_str(|nbuf| {
                    libc::funcs::posix01::unistd::unsetenv(nbuf);
                })
            })
        }
    }
    #[cfg(windows)]
    fn _unsetenv(n: &str) {
        unsafe {
            with_env_lock(|| {
                use os::win32::as_utf16_p;
                as_utf16_p(n, |nbuf| {
                    libc::SetEnvironmentVariableW(nbuf, ptr::null());
                })
            })
        }
    }

    _unsetenv(n);
}
/// Remove a variable from the environment entirely
Remove a variable from the environment entirely
Remove a variable from the environment entirely
pub fn unsetenv(n: &str) {
    #[cfg(unix)]
    fn _unsetenv(n: &str) {
        unsafe {
            with_env_lock(|| {
                n.with_c_str(|nbuf| {
                    libc::funcs::posix01::unistd::unsetenv(nbuf);
                })
            })
        }
    }
    #[cfg(windows)]
    fn _unsetenv(n: &str) {
        unsafe {
            with_env_lock(|| {
                use os::win32::as_utf16_p;
                as_utf16_p(n, |nbuf| {
                    libc::SetEnvironmentVariableW(nbuf, ptr::null());
                })
            })
        }
    }
    _unsetenv(n);
}
pub fn unsetenv ( n : & str ) { # [ cfg ( unix ) ] fn _unsetenv ( n : & str ) { unsafe { with_env_lock ( | | { n . with_c_str ( | nbuf | { libc :: funcs :: posix01 :: unistd :: unsetenv ( nbuf ) ; } ) } ) } } # [ cfg ( windows ) ] fn _unsetenv ( n : & str ) { unsafe { with_env_lock ( | | { use os :: win32 :: as_utf16_p ; as_utf16_p ( n , | nbuf | { libc :: SetEnvironmentVariableW ( nbuf , ptr :: null ( ) ) ; } ) } ) } } _unsetenv ( n ) ; }
Remove a variable from the environment entirely
Remove a variable from the environment entirely
n
&str
n
&str