OSDN Git Service

alphasort*.c: use strcoll instead of strcmp to support locales
authorPeter S. Mazinger <ps.m@gmx.net>
Wed, 16 Mar 2011 20:50:52 +0000 (21:50 +0100)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fri, 15 Jun 2012 12:00:26 +0000 (14:00 +0200)
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/misc/dirent/alphasort.c
libc/misc/dirent/alphasort64.c

index 55980d1..67b3b78 100644 (file)
@@ -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)
index ef1e83e..6eb4142 100644 (file)
@@ -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