1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00
Files
glibc/posix/environ.c
Florian Weimer 6ef0bd02db posix: Move environ helper variables next to environ definition (bug 32541)
This helps with statically interposing getenv.

Updates commit 7a61e7f557
("stdlib: Make getenv thread-safe in more cases").

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-03-07 21:40:55 +01:00

17 lines
505 B
C

/* This file just defines the `__environ' variable (and alias `environ'). */
#include <unistd.h>
#include <stddef.h>
#include <stdlib/setenv.h>
/* This must be initialized; we cannot have a weak alias into bss. */
char **__environ = NULL;
weak_alias (__environ, environ)
/* The SVR4 ABI says `_environ' will be the name to use
in case the user overrides the weak alias `environ'. */
weak_alias (__environ, _environ)
struct environ_array *__environ_array_list;
environ_counter __environ_counter;