wasi-libc/libc-bottom-half/headers/private/stdlib.h
Dan Gohman 82fc2c4f44 Add a function to de-initialize the environment-variable state.
Add a `__wasilibc_deinit_environ` function which clears the current
environment variable state to the state where next time the environment
variable functions are called, they'll reinitialize the environment.

And add a `__wasilibc_maybe_reinitialize_environ_eagerly` function to
reinitialize the environment variable state if `environ` or `_environ`
are needed.

These functions are needed by wizer to be able to suspend and resume
a program and have it read new environment variables from the host
environment; see bytecodealliance/wizer#8 for background.
2021-05-25 15:25:05 -07:00

9 lines
132 B
C

#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#include <stddef.h>
#include_next <stdlib.h>
int clearenv(void);