alx-0008 - Standardize strtoi(3) and strtou(3) from NetBSD
Alejandro Colomar
alx at kernel.org
Wed Mar 19 16:53:34 UTC 2025
Hi Thorsten,
On Wed, Mar 19, 2025 at 05:36:32PM +0100, Thorsten Glaser wrote:
> On Wed, 19 Mar 2025, Alejandro Colomar wrote:
>
> >Please propose an implementation of the overload-selectinging macro
>
> 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
>
> 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’t Cc me explicitly on this thread.
>
> >Ok. Have a lovely day!
>
> (That’s because I get it via a mailing list, to avoid duplicates,
> which is always a hassle to sort out in my INBOX.)
Cheers,
Alex
--
<https://www.alejandro-colomar.es/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libbsd/attachments/20250319/8f12fc5b/attachment.sig>
More information about the libbsd
mailing list