Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2010 02:11:24 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Garrett Wollman <wollman@csail.mit.edu>
Cc:        freebsd-standards@freebsd.org
Subject:   Re: standards/142255: scandir prototype in dirent.h isn't compliant with POSIX 2008
Message-ID:  <20100107001124.GA57050@deviant.kiev.zoral.com.ua>
In-Reply-To: <19269.8963.733084.213387@khavrinen.csail.mit.edu>
References:  <201001031500.o03F0BO3042964@freefall.freebsd.org> <19269.8963.733084.213387@khavrinen.csail.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

--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:
> <<On Sun, 3 Jan 2010 15:00:11 GMT, Kostik Belousov <kostikbel@gmail.com> =
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--



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