[git commit future 1/1] alphasort*.c: use strcoll instead of strcmp to support locales

Peter S. Mazinger ps.m at gmx.net
Wed Mar 16 19:20:32 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=e8856ab12187ae025b5d0034dbd457abc3dc51bf
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/future

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
 libc/misc/dirent/alphasort.c   |    2 +-
 libc/misc/dirent/alphasort64.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libc/misc/dirent/alphasort.c b/libc/misc/dirent/alphasort.c
index 55980d1..67b3b78 100644
--- a/libc/misc/dirent/alphasort.c
+++ b/libc/misc/dirent/alphasort.c
@@ -10,7 +10,7 @@
 
 int alphasort(const struct dirent **a, const struct dirent **b)
 {
-	return strcmp((*a)->d_name, (*b)->d_name);
+	return strcoll((*a)->d_name, (*b)->d_name);
 }
 #if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
 strong_alias_untyped(alphasort,alphasort64)
diff --git a/libc/misc/dirent/alphasort64.c b/libc/misc/dirent/alphasort64.c
index ef1e83e..6eb4142 100644
--- a/libc/misc/dirent/alphasort64.c
+++ b/libc/misc/dirent/alphasort64.c
@@ -13,6 +13,6 @@
 
 int alphasort64(const struct dirent64 **a, const struct dirent64 **b)
 {
-	return strcmp((*a)->d_name, (*b)->d_name);
+	return strcoll((*a)->d_name, (*b)->d_name);
 }
 #endif
-- 
1.7.3.4



More information about the uClibc-cvs mailing list