From owner-freebsd-standards@FreeBSD.ORG Thu Jan 7 00:30:03 2010 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EE24106568B for ; Thu, 7 Jan 2010 00:30:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 6AC478FC0A for ; Thu, 7 Jan 2010 00:30:01 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o070BO7j021662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 Jan 2010 02:11:24 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o070BOX3069789; Thu, 7 Jan 2010 02:11:24 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o070BO8G069788; Thu, 7 Jan 2010 02:11:24 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 7 Jan 2010 02:11:24 +0200 From: Kostik Belousov To: Garrett Wollman Message-ID: <20100107001124.GA57050@deviant.kiev.zoral.com.ua> References: <201001031500.o03F0BO3042964@freefall.freebsd.org> <19269.8963.733084.213387@khavrinen.csail.mit.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XUd+PsnCfaVdInSg" Content-Disposition: inline In-Reply-To: <19269.8963.733084.213387@khavrinen.csail.mit.edu> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-standards@freebsd.org Subject: Re: standards/142255: scandir prototype in dirent.h isn't compliant with POSIX 2008 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 00:30:03 -0000 --XUd+PsnCfaVdInSg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 06, 2010 at 06:55:47PM -0500, Garrett Wollman wrote: > < = said: >=20 > > The change of the prototype shall also fix alphasort(3). And then, each > > in-tree consumer should be updated. > =20 > > scandir(3) is historical BSD interface, that only appeared in SUSv4. > > It seems that Solaris and possibly glibc are conforming, so FreeBSD > > should probably follow the route. > =20 > I believe someone at least complained about the Standard's broken > prototypes, subsequent to the approval of the current standard, > although I don't recall what the outcome was. >=20 > > @@ -95,7 +95,7 @@ typedef void * DIR; > > __BEGIN_DECLS > > #if __BSD_VISIBLE > > DIR *__opendir2(const char *, int); > > -int alphasort(const void *, const void *); > > +int alphasort(const struct dirent **, const struct dirent **); > > int getdents(int, char *, int); > > int getdirentries(int, char *, int, long *); > > #endif >=20 > If we're going to break the historical 4.4BSD prototype to match the > broken one in SUSv4, the declaration should be moved to an appropriate > section of the header file. (I haven't checked -- is this interface > in the base standard or the XSI option? If the latter we should just > ignore it -- we should not be trying to implement XSI's mistakes.) See r201602. --XUd+PsnCfaVdInSg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktFJqsACgkQC3+MBN1Mb4gy4gCfYlFMbuCwING/KlgKmCCA5zMx y50Ani+V3y2diBVtFMmI5A8MM1xpBy1G =1EqH -----END PGP SIGNATURE----- --XUd+PsnCfaVdInSg--