Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Jan 2005 07:40:33 -0500
From:      Thomas Dickey <dickey@radix.net>
To:        current@freebsd.org
Subject:   Re: Implementation errors in strtol()
Message-ID:  <20050122124032.GA26006@saltmine.radix.net>
In-Reply-To: <20050122113015.GV30862@uriah.heep.sax.de>
References:  <20050121194103.GB19150@nagual.pp.ru> <20050121201400.GQ30862@uriah.heep.sax.de> <20050121221156.GA21459@nagual.pp.ru> <20050120192324.GA30862@uriah.heep.sax.de> <20050120205501.GA69123@nagual.pp.ru> <20050120211449.GC30862@uriah.heep.sax.de> <20050120214406.GA70088@nagual.pp.ru> <20050120222137.GE30862@uriah.heep.sax.de> <20050121230949.GA34313@VARK.MIT.EDU> <20050122113015.GV30862@uriah.heep.sax.de>

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

--TB36FDmn/VVEgNH/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jan 22, 2005 at 12:30:15PM +0100, Joerg Wunsch wrote:
> As Andrey Chernov wrote:
>=20
> > > Do whatever you want, I think it's silly and should rather be
> > > dropped as it is a useless feature, which could only lead people
> > > to write unportable code.
>=20
> > The code which _not_ expect this feature present is _equally_
> > unportable.
>=20
> Nope.  Just think about it: code which doesn't take this feature into
> account needs to check for conversion errors by means of verifying
> endptr.  It simply wouldn't care about errno at all, except for

That's what I always do - that's the way strtol was first documented.
Adding errno tweaks on top of that is (as noted) neither portable nor
necessary.

--=20
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

--TB36FDmn/VVEgNH/
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (SunOS)
Comment: For info see http://www.gnupg.org

iD8DBQFB8km+tIqByHxlDocRAtiyAJwKL+XkZxsQhfqtXX9X6Kzkmwbw6wCgpRzE
7/bmaZ/raoPWY8/+A4wvPbE=
=yf0V
-----END PGP SIGNATURE-----

--TB36FDmn/VVEgNH/--



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