Alejandro Colomar wrote:
> BTW, does gnulib have documentation for xstrtol()? I couldn't find it.
> And for MALLOC()? I'm interested in reading both.
Paul added the documentation for xstrtol().
There is no macro or symbol named MALLOC in gnulib; I don't know what you
are referring to.
Bruno
Paul Eggert wrote:
> I installed the attached Gnulib patch which addresses that
> point ...
The comments reference parameter names VAL, VALID_SUFFIXES, etc.
but the declaration does not contain parameter names. This patch
fixes that:
2024-07-19 Bruno Haible
xstrtol: Improve document
Hi Paul,
On Thu, Jul 18, 2024 at 05:37:26PM GMT, Paul Eggert wrote:
> On 2024-07-18 12:53, Alejandro Colomar wrote:
> > I think it'd be common to assume that unless specifically
> > documented, you behave like POSIX's strtol(3), which produces defined
> > behavior for a base of 1.
>
> Fair enough
On 2024-07-18 12:53, Alejandro Colomar wrote:
I think it'd be common to assume that unless specifically
documented, you behave like POSIX's strtol(3), which produces defined
behavior for a base of 1.
Fair enough. I installed the attached Gnulib patch which addresses that
point, along with the
Hi Bruno,
On Thu, Jul 18, 2024 at 08:06:07PM GMT, Bruno Haible wrote:
> Alejandro Colomar wrote:
> > If xstrtol() was being called with a base of 1, under some conditions it
> > would invoke Undefined Behavior.
>
> Yes, sure. A numeric base of 1 makes no sense, mathematically.
>
> Thanks for the
Alejandro Colomar wrote:
> If xstrtol() was being called with a base of 1, under some conditions it
> would invoke Undefined Behavior.
Yes, sure. A numeric base of 1 makes no sense, mathematically.
Thanks for the patch; applied.
Note that I disagree with the statement from
https://github.com/voi