From owner-svn-src-all@FreeBSD.ORG Mon Jan 18 13:44:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1FB5106566C; Mon, 18 Jan 2010 13:44:44 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A16158FC15; Mon, 18 Jan 2010 13:44:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0IDiiaZ079039; Mon, 18 Jan 2010 13:44:44 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0IDiiEL079037; Mon, 18 Jan 2010 13:44:44 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201001181344.o0IDiiEL079037@svn.freebsd.org> From: "Andrey A. Chernov" Date: Mon, 18 Jan 2010 13:44:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202572 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 13:44:44 -0000 Author: ache Date: Mon Jan 18 13:44:44 2010 New Revision: 202572 URL: http://svn.freebsd.org/changeset/base/202572 Log: 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. Modified: head/lib/libc/gen/opendir.c Modified: head/lib/libc/gen/opendir.c ============================================================================== --- head/lib/libc/gen/opendir.c Mon Jan 18 13:38:45 2010 (r202571) +++ head/lib/libc/gen/opendir.c Mon Jan 18 13:44:44 2010 (r202572) @@ -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 *nam * This sort must be stable. */ mergesort(dpv, n, sizeof(*dpv), - opendir_alphasort); + opendir_sort); dpv[n] = NULL; xp = NULL;