Hash :
cbff21f9
Author :
Date :
2021-04-02T19:56:28
strtoul: Work around a bug on native Windows and Minix. Reported by Eric Blake <eblake@redhat.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00082.html>. * lib/stdlib.in.h (strtoul): New declaration. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtoul is declared. (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOUL, HAVE_STRTOUL, REPLACE_STRTOUL. * m4/strtoul.m4 (gl_FUNC_STRTOUL): Require gl_STDLIB_H_DEFAULTS. Test whether strtoul works. Set REPLACE_STRTOUL. * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOUL, HAVE_STRTOUL, REPLACE_STRTOUL. * modules/strtoul (Status, Notice): Remove. (Depends-on): Add stdlib. (configure.ac): Test HAVE_STRTOUL and REPLACE_STRTOUL. Invoke gl_STDLIB_MODULE_INDICATOR. * tests/test-strtoul.c (main): Add tests of hexadecimal integer syntax. * doc/posix-functions/strtoul.texi: Mention the bug.
@node strtoul
@section @code{strtoul}
@findex strtoul
POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/strtoul.html}
Gnulib module: strtoul
Portability problems fixed by Gnulib:
@itemize
@item
This function is missing on some old platforms.
@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.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
@end itemize