Re: alx-0008 - Standardize strtoi(3) and strtou(3) from NetBSD

Alejandro Colomar <[email protected]> Wed, 19 Mar 2025 17:53:34 +0100
Newsgroups dev.linux.lists.liba2i
Message-ID <qx35v3mvr6366ze2dbqbbfk6rkpdhpw2q7g3b62acnqniavxz5@hpaa43zb52ht>
--3ksidbeoiwpsajag
Content-Type: text/plain; protected-headers=v1; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
From: Alejandro Colomar <[email protected]>
To: Thorsten Glaser <[email protected]>
Cc: [email protected], Bruno Haible <[email protected]>, 
	[email protected], [email protected], [email protected], 
	christos <[email protected]>, 
	=?utf-8?B?xJBvw6BuIFRy4bqnbiBDw7RuZw==?= Danh <[email protected]>, Paul Eggert <[email protected]>, 
	Eli Schwartz <[email protected]>, Guillem Jover <[email protected]>, 
	Iker Pedrosa <[email protected]>, Michael Vetter <[email protected]>, Robert Elz <[email protected]>, 
	[email protected], Sam James <[email protected]>, "Serge E. Hallyn" <[email protected]>
Subject: Re: alx-0008 - Standardize strtoi(3) and strtou(3) from NetBSD
References: <mgcfwxfmv3kpfnkkf6uj63kx5tdzl64p2zg2us4ntsu6q5xkwj@k52z5yyiywoo>
 <18739733.sWSEgdgrri@nimes>
 <mvwnrmk2xf45ivyk4kzxdxuwdk67666yt3kwafck6vo4vq2lru@wkqmoqsacqkf>
 <[email protected]>
 <6alwxn5mchma25qxvmzebx5vfheulfvgev7f7xjcjshma3hfok@3qtsvbzoljb2>
 <[email protected]>
MIME-Version: 1.0
In-Reply-To: <[email protected]>

Hi Thorsten,

On Wed, Mar 19, 2025 at 05:36:32PM +0100, Thorsten Glaser wrote:
> On Wed, 19 Mar 2025, Alejandro Colomar wrote:
>=20
> >Please propose an implementation of the overload-selectinging macro
>=20
> Well yes, no.

Could you please clarify?  I don't understand what you mean.  If you
think strtoi(3) should be replaced by a type-generic function, you
should clarify the semantics, at least to some degree (which I think
would be better with some code, but if you do with words it would be
better than nothing).

> >That macro can be implemented with C11.  Here's the implementation I
>=20
> But not with C89.

A type-generic macro cannot be implemented in C89 at all.  C11 is the
minimum for anything type-generic (except for compiler magic).  You can
probably use the same compiler magic to backport my a2i() macro to
dialects older than C11.

> bye,
> //mirabilos
> PS: Please don=E2=80=99t Cc me explicitly on this thread.
>=20
> >Ok.  Have a lovely day!
>=20
> (That=E2=80=99s because I get it via a mailing list, to avoid duplicates,
> which is always a hassle to sort out in my INBOX.)

Cheers,
Alex

--=20
<https://www.alejandro-colomar.es/>

--3ksidbeoiwpsajag
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmfa9ocACgkQ64mZXMKQ
wqkykw//T7vGcWWpLmzK+MgiMPGU8OcmcqTRSLuS7sIEZvQazlOHs3bVOz4BcOq5
GnhfdrUW/Vp7HVdkrn5TXM+8+nnrbPS0pHMQm4/5UhA3PkGSpB7IDwmkKssrYcA5
PjJYsfJ8ETxyADJ4e2RieRQF3JrL/MiqTMrwfKxW6GJM1zzNmZ6SrbP6qbB1PLyG
9BI8PSaNseOw/qJR+/xVPj2UT+2V801iQ1S4vHkbpQqrzzg5KqGxxrTj0ndtmvwd
PalkJSG6tdJEIJSf+4KyRjqaa+9f7uIl9U9OGRY7XyLk1IP9pNsfhDXdfFb1mpWP
Po6jh0095kG38/4FerIDIAwTK+eDtKsfLUijdi6lEkhN5zCY0X56HQyFZTmeIltU
F0R04VrDNRPlfUNgkIIy2IKMYVAMs4L28ASBKZnIB/S04Ds6O3Fp4JUMpBU4clO0
qhVSB0ePL1mkOM/8ZWnGUDB+a1etJARqmZ54SVNMPlLp64SrbMSvu/gmZBP7TyvL
B9UmAOQ2FTQU/Gjxa6QaQY+JFIYdofHWRMJfVFcIpo3rV69GKj0UiSLPuHTRVccy
NRZJFGAIvTNsuvn19Ibbh7JrOE8FURAGWWI4BfADf4pluR0GTfTWKuN+uVWtnA0J
KrEVAU6rLPMaomjROetZ3VVuv9d1PmeWUJk2/AzVDE7ImK4JHYs=
=xyFP
-----END PGP SIGNATURE-----

--3ksidbeoiwpsajag--