summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2010-01-18 13:44:44 +0000
committerache <ache@FreeBSD.org>2010-01-18 13:44:44 +0000
commitc3fd255426edd16af1593a5ff8125bdefa328e56 (patch)
tree7d918c25098c038e67214d8911ca277d72a3877b /lib/libc
parentbf36513f62162ecd4b2c5838eedb47826e263eae (diff)
downloadFreeBSD-src-c3fd255426edd16af1593a5ff8125bdefa328e56.zip
FreeBSD-src-c3fd255426edd16af1593a5ff8125bdefa328e56.tar.gz
Double checking my commit I found that comment saying that
POSIX 2008 and XSI 7require strcoll() for opendir() is not true. I can't find such requirement in POSIX 2008 and XSI 7. So, back out that part of my commit, returning old strcmp(), and remove this misleading comment.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/opendir.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/libc/gen/opendir.c b/lib/libc/gen/opendir.c
index d99faa4..dd6d042 100644
--- a/lib/libc/gen/opendir.c
+++ b/lib/libc/gen/opendir.c
@@ -92,15 +92,11 @@ __opendir2(const char *name, int flags)
return __opendir_common(fd, name, flags);
}
-/*
- * POSIX 2008 and XSI 7 require alphasort() to call strcoll() for
- * directory entries ordering.
- */
static int
-opendir_alphasort(const void *p1, const void *p2)
+opendir_sort(const void *p1, const void *p2)
{
- return (strcoll((*(const struct dirent **)p1)->d_name,
+ return (strcmp((*(const struct dirent **)p1)->d_name,
(*(const struct dirent **)p2)->d_name));
}
@@ -253,7 +249,7 @@ __opendir_common(int fd, const char *name, int flags)
* This sort must be stable.
*/
mergesort(dpv, n, sizeof(*dpv),
- opendir_alphasort);
+ opendir_sort);
dpv[n] = NULL;
xp = NULL;
OpenPOWER on IntegriCloud