musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/string/memset.c
diff options
context:
space:
mode:
authorAlexander Monakov <amonakov@ispras.ru>2017年07月28日 17:46:49 +0300
committerRich Felker <dalias@aerifal.cx>2017年08月29日 19:50:48 -0400
commitc7f56b4d2f58714b7286ef12fa5410213847f2fe (patch)
treeaa6eda020bb2f17fc700ff30071d00efb3d88621 /src/string/memset.c
parentcc086693808c007679f02d5e0ee592446bf1b386 (diff)
downloadmusl-c7f56b4d2f58714b7286ef12fa5410213847f2fe.tar.gz
__init_libc: add fallbacks for __progname setup
It is possible for argv[0] to be a null pointer, but the __progname variable is used to implement functions in src/legacy/err.c that do not expect it to be null. It is also available to the user via the program_invocation_name alias as a GNU extension, and the implementation in Glibc initializes it to a pointer to empty string rather than NULL. Since argv[0] is usually non-null and it's preferable to keep those variables in BSS, implement the fallbacks in __init_libc, which also allows to have an intermediate fallback to AT_EXECFN.
Diffstat (limited to 'src/string/memset.c')
0 files changed, 0 insertions, 0 deletions
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月08日 18:10:05 +0000

AltStyle によって変換されたページ (->オリジナル) /