Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jan 2010 02:37:09 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Konstantin Belousov <kib@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r201604 - head/lib/libc/gen
Message-ID:  <20100108023003.L56206@delplex.bde.org>
In-Reply-To: <201001052020.o05KKVEp002337@svn.freebsd.org>
References:  <201001052020.o05KKVEp002337@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100108023003.L56206>