Browse Source

alphasort*.c: use strcoll instead of strcmp to support locales

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger 14 years ago
parent
commit
cebc143270
2 changed files with 2 additions and 2 deletions
  1. 1 1
      libc/misc/dirent/alphasort.c
  2. 1 1
      libc/misc/dirent/alphasort64.c

+ 1 - 1
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)

+ 1 - 1
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