소스 검색

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.
Rich Felker 13 년 전
부모
커밋
07065210ca
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/misc/basename.c

+ 3 - 0
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);