bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison


From: Paul Smith
Subject: Re: [PATCH 3/3] Introduce $(compare ...) for numerical comparison
Date: Sun, 28 Nov 2021 10:09:05 -0500
User-agent: Evolution 3.36.5-0ubuntu1

On Sun, 2021-11-28 at 15:49 +0100, Jouke Witteveen wrote:
> I fully agree, but was not aware of the robustness of INTSTR_LENGTH.
> It felt a bit fragile when I spotted its definition in makeint.h.

The C standard defines the largest unsigned long long value
as 18446744073709551615, the largest signed long long value
as 9223372036854775807, and the smallest signed long long value as -
9223372036854775808.  So, the definition cannot be wrong in any
standards-conforming implementation of C.

> File sizes are an interesting application indeed. If you want me to
> change the patches to use strtoll, I would need some help since I am
> not sure how to set things up so that we get a fallback
> implementation on platforms where it is missing.

I already did it locally, thanks for the offer.  I enhanced the tests
to check that the above (signed) values are parsed correctly.

I just changed the gnulib import of "strtol" to "strtoll".  strtoll()
is required by the C99 standard (which we were forced to require in GNU
make as well, since gnulib requires it) so it's pretty much everywhere
these days.  There are a few older platforms where it has incorrect
implementations that gnulib will take care of for us.

Cheers!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]