[libc-commits] [PATCH] D119396: Introduce getenv to LLVM libcAdd support for getenv as defined by the Open Group's "System Interface & Header" in https://pubs.opengroup.org/onlinepubs/7908799/xsh/getenv.html
Raman Tenneti via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Feb 9 18:18:15 PST 2022
rtenneti created this revision.
Herald added subscribers: libc-commits, mgorny.
Herald added a project: libc-project.
rtenneti requested review of this revision.
getenv requires a standard way of accessing the environment,
so a pointer to the environment is added to the startup in crt1.
Consquently, this function is not usable on top of other libcs.
Added starts_with method to StringView. getenv function uses it.
Co-authored-by: Jeff Bailey <jeffbailey at google.com>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119396
Files:
libc/config/linux/app.h
libc/config/linux/x86_64/entrypoints.txt
libc/loader/linux/x86_64/start.cpp
libc/spec/posix.td
libc/src/__support/CPP/StringView.h
libc/src/stdlib/CMakeLists.txt
libc/src/stdlib/getenv.cpp
libc/src/stdlib/getenv.h
libc/test/loader/linux/CMakeLists.txt
libc/test/loader/linux/getenv_test.cpp
libc/test/loader/linux/loader_test.h
libc/test/utils/CPP/stringview_test.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119396.407361.patch
Type: text/x-patch
Size: 9628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220210/f15fcb3e/attachment.bin>
More information about the libc-commits
mailing list