Skip to content

Commit 4e425d4

Browse files
wkozaczuknyh
authored andcommitted
Add GNU libc extension variables __progname and __progname_full
This patch adds GNU libc extension variables __progname and __progname_full used by coreutils. These seem to come from BSD as 'BSD' paragraph explains - https://rosettacode.org/wiki/Program_name#C. Signed-off-by: Waldemar Kozaczuk <[email protected]> Message-Id: <[email protected]>
1 parent 47804c4 commit 4e425d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libc/libc.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
char *program_invocation_name;
3333
char *program_invocation_short_name;
3434

35+
weak_alias(program_invocation_name, __progname_full);
36+
weak_alias(program_invocation_short_name, __progname);
37+
3538
int libc_error(int err)
3639
{
3740
errno = err;

0 commit comments

Comments
 (0)