From owner-svn-src-all@FreeBSD.ORG Thu Jan 7 15:37:14 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 4273D1065670; Thu, 7 Jan 2010 15:37:14 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id 90EF28FC12; Thu, 7 Jan 2010 15:37:13 +0000 (UTC) Received: from c122-106-155-90.carlnfd1.nsw.optusnet.com.au (c122-106-155-90.carlnfd1.nsw.optusnet.com.au [122.106.155.90]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o07Fb9Bf004779 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Jan 2010 02:37:11 +1100 Date: Fri, 8 Jan 2010 02:37:09 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Konstantin Belousov In-Reply-To: <201001052020.o05KKVEp002337@svn.freebsd.org> Message-ID: <20100108023003.L56206@delplex.bde.org> References: <201001052020.o05KKVEp002337@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r201604 - 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: Thu, 07 Jan 2010 15:37:14 -0000 On Tue, 5 Jan 2010, Konstantin Belousov wrote: > Log: > Do not rely on behaviour undefined by ANSI C, use thunks to adapt > alphasort-like interface to the comparision function required by > qsort() and qsort_r(). > > For opendir() thunk and alphasort(), comment on why we deviated from > POSIX by using strcmp() instead of strcoll(). > > Requested and reviewed by: bde > MFC after: 2 weeks Thanks. FreeBSD (wollman) fixed the corresponding undefined behaviour (which was inherited from 4.4BSD) in fts's comparison function in 2002. fts uses extra indirections and mostly-wasted space instead of qsort_r(). Bruce