LibC: Rewrite environ handling

environ is only allocated on heap when you insert new variables.

environment variables are only `free`'d if they are `malloc`'d by libc
This commit is contained in:
2025-04-16 21:08:01 +03:00
parent ee9e941a56
commit bdbde25784
3 changed files with 217 additions and 131 deletions

View File

@@ -4,6 +4,7 @@ set(LIBC_SOURCES
ctype.cpp
dirent.cpp
dlfcn.cpp
environ.cpp
errno.cpp
fcntl.cpp
fenv.cpp