Hash :
4e38f4a0
Author :
Date :
2023-03-16T16:02:02
strtol, strtoll, strtoul, strtoull: Make ISO C 23 compliant. * lib/strtol.c (INTERNAL (strtol)): Treat 'b' and base 2 like 'x' and base 16. Based on glibc commit 64924422a99690d147a166b4de3103f3bf3eaf6c by Joseph Myers. * m4/strtol.m4 (gl_FUNC_STRTOL): Test also whether parsing binary integers works. Update cross-compilation guesses. * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise. * m4/strtoul.m4 (gl_FUNC_STRTOUL): Likewise. * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise. * tests/test-strtol.c (main): Add tests of parsing binary integers. * tests/test-strtoll.c (main): Likewise. * tests/test-strtoul.c (main): Likewise. * tests/test-strtoull.c (main): Likewise. * doc/posix-functions/strtol.texi: Mention the problem with parsing binary integers. * doc/posix-functions/strtoll.texi: Likewise. * doc/posix-functions/strtoul.texi: Likewise. * doc/posix-functions/strtoull.texi: Likewise.
@node strtoull
@section @code{strtoull}
@findex strtoull
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtoull.html}
Gnulib module: strtoull
Portability problems fixed by Gnulib:
@itemize
@item
This function is missing on some platforms:
HP-UX 11.11, MSVC 9.
@item
This function does not parse the leading @samp{0} when the input string is
@code{"0x"} and the base is 16 or 0 on some platforms:
Minix 3.3, mingw, MSVC 14.
@item
This function does not parse binary integers (with a @samp{0b} or @samp{0B}
prefix) when the base is 2 or 0 on many platforms.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@end itemize