diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-05-23 00:40:54 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-05-23 00:40:54 +0200 |
commit | b24ef035bd08919075edd79b906e18909ac44eb9 (patch) | |
tree | 78485aace67fbbf061b339b81af143b074ee4108 /libbb | |
parent | 7948ecb505135c811a44bc8f8e391622d893d383 (diff) | |
download | busybox-w32-b24ef035bd08919075edd79b906e18909ac44eb9.tar.gz busybox-w32-b24ef035bd08919075edd79b906e18909ac44eb9.tar.bz2 busybox-w32-b24ef035bd08919075edd79b906e18909ac44eb9.zip |
find: cater for libc w/o FNM_CASEFOLD
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/Kbuild.src | 1 | ||||
-rw-r--r-- | libbb/bb_basename.c | 18 | ||||
-rw-r--r-- | libbb/get_last_path_component.c | 10 |
3 files changed, 9 insertions, 20 deletions
diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src index a22e70892..fa6e5b6e3 100644 --- a/libbb/Kbuild.src +++ b/libbb/Kbuild.src | |||
@@ -13,7 +13,6 @@ INSERT | |||
13 | lib-y += appletlib.o | 13 | lib-y += appletlib.o |
14 | lib-y += ask_confirmation.o | 14 | lib-y += ask_confirmation.o |
15 | lib-y += bb_askpass.o | 15 | lib-y += bb_askpass.o |
16 | lib-y += bb_basename.o | ||
17 | lib-y += bb_bswap_64.o | 16 | lib-y += bb_bswap_64.o |
18 | lib-y += bb_do_delay.o | 17 | lib-y += bb_do_delay.o |
19 | lib-y += bb_pwd.o | 18 | lib-y += bb_pwd.o |
diff --git a/libbb/bb_basename.c b/libbb/bb_basename.c deleted file mode 100644 index d678360fc..000000000 --- a/libbb/bb_basename.c +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* vi: set sw=4 ts=4: */ | ||
2 | /* | ||
3 | * Utility routines. | ||
4 | * | ||
5 | * Copyright (C) 2007 Denys Vlasenko | ||
6 | * | ||
7 | * Licensed under GPLv2, see file LICENSE in this source tree. | ||
8 | */ | ||
9 | |||
10 | #include "libbb.h" | ||
11 | |||
12 | const char* FAST_FUNC bb_basename(const char *name) | ||
13 | { | ||
14 | const char *cp = strrchr(name, '/'); | ||
15 | if (cp) | ||
16 | return cp + 1; | ||
17 | return name; | ||
18 | } | ||
diff --git a/libbb/get_last_path_component.c b/libbb/get_last_path_component.c index 72598d22e..04fdf2a3e 100644 --- a/libbb/get_last_path_component.c +++ b/libbb/get_last_path_component.c | |||
@@ -6,8 +6,16 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | |||
10 | #include "libbb.h" | 9 | #include "libbb.h" |
10 | |||
11 | const char* FAST_FUNC bb_basename(const char *name) | ||
12 | { | ||
13 | const char *cp = strrchr(name, '/'); | ||
14 | if (cp) | ||
15 | return cp + 1; | ||
16 | return name; | ||
17 | } | ||
18 | |||
11 | /* | 19 | /* |
12 | * "/" -> "/" | 20 | * "/" -> "/" |
13 | * "abc" -> "abc" | 21 | * "abc" -> "abc" |