Improve getprogname/setprogname #1
Labels
No labels
VDI
bug
build
critical
documentation
duplicate
enhancement
help wanted
i18n-l10n
invalid
kernel
libc
packaging
question
upstream
website
wontfix
xaaes
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kitfreemint/util-mint#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, setprogname do nothing and getprogname returns a litteral string (name of the binary)
Todo:
The pointer progname must point inside argv[0] to skip the path. So, getprogname return the basename
Check if setprogname is called at beginning of main() (because it's automatically done on NetBSD and programs may call getprogname without setprogname)
getprogname/setprogname are available in libnbcompat. Todo: Use this library instead of write dirty hack
crtinit.c already includes program_invocation_name and program_invocation_short_name (set from argv[0])
We just have to add related functions