summaryrefslogtreecommitdiffstats
path: root/libc-top-half/headers/private/wasi/libc-environ-compat.h
blob: fa2747dec87965ac66ebef5230d9e6af3755a59a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// This header file is meant to be included withinin the body of a function
// which uses `__environ`. Code using `__environ` expects it will be initialized
// eagerly. `__wasilibc_environ` is initialized lazily. Provide `__environ` as
// an alias and arrange for the lazy initialization to be performed.

extern char **__wasilibc_environ;

__wasilibc_ensure_environ();

#ifndef __wasilibc_environ
#define __environ __wasilibc_environ
#endif