projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2adf2fb
)
alias basename to glibc name for it, to meet abi goals
author
Rich Felker
<dalias@aerifal.cx>
Thu, 19 Jan 2012 04:28:48 +0000
(23:28 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 19 Jan 2012 04:28:48 +0000
(23:28 -0500)
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.
src/misc/basename.c
patch
|
blob
|
history
diff --git
a/src/misc/basename.c
b/src/misc/basename.c
index c87e00cdcdd9b76228f842a9429fb967f40da42b..cc4f778c518b8f01b86269c9904952906009fce5 100644
(file)
--- 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);