Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newlib/libc/posix/scandir.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/newlib/libc/posix/scandir.c b/newlib/libc/posix/scandir.c
index 56de1b9e1..c39d9a4c4 100644
--- a/newlib/libc/posix/scandir.c
+++ b/newlib/libc/posix/scandir.c
@@ -142,12 +142,13 @@ fail:
/*
* Alphabetic order comparison routine for those who want it.
+ * POSIX 2008 requires that alphasort() uses strcoll().
*/
int
-alphasort (const struct dirent **d1,
- const struct dirent **d2)
+alphasort(const struct dirent **d1, const struct dirent **d2)
{
- return(strcmp((*d1)->d_name, (*d2)->d_name));
+
+ return (strcoll((*d1)->d_name, (*d2)->d_name));
}
#endif /* ! HAVE_OPENDIR */