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
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012年01月18日 23:28:48 -0500
committerRich Felker <dalias@aerifal.cx>2012年01月18日 23:28:48 -0500
commit07065210cae8ae40fceeee4febf338e1f1aecd0c (patch)
tree23e7ecbf3001ada9c497b9c8cb361a765307b331
parent2adf2fb372745a406544188029d3f769f71a9f2c (diff)
downloadmusl-07065210cae8ae40fceeee4febf338e1f1aecd0c.tar.gz
alias basename to glibc name for it, to meet abi goals
note that regardless of the name used, basename is always conformant. it never takes on the bogus gnu behavior, unlike glibc where basename is nonconformant when declared manually without including libgen.h.
Diffstat
-rw-r--r--src/misc/basename.c 3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/misc/basename.c b/src/misc/basename.c
index c87e00cd..cc4f778c 100644
--- a/src/misc/basename.c
+++ b/src/misc/basename.c
@@ -1,5 +1,6 @@
#include <string.h>
#include <libgen.h>
+#include "libc.h"
char *basename(char *s)
{
@@ -10,3 +11,5 @@ char *basename(char *s)
for (; i&&s[i-1]!='/'; i--);
return s+i;
}
+
+weak_alias(basename, __xpg_basename);
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月18日 04:34:38 +0000

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