summaryrefslogtreecommitdiff
path: root/tests/test-strtol.c
Commit message (Collapse)AuthorAgeFilesLines
* strtol, strtoll, strtoul, strtoull: Make ISO C 23 compliant.Bruno Haible2023-03-161-0/+62
| | | | | | | | | | | | | | | | | | | | * 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.
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* strtol: Work around a bug on native Windows and Minix.Bruno Haible2021-04-021-0/+62
| | | | | | | | | | | | | | | | | * lib/stdlib.in.h (strtol): New declaration. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether strtol is declared. (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_STRTOL, HAVE_STRTOL, REPLACE_STRTOL. * m4/strtol.m4 (gl_FUNC_STRTOL): Require gl_STDLIB_H_DEFAULTS. Test whether strtol works. Set REPLACE_STRTOL. * modules/stdlib (Makefile.am): Substitute GNULIB_STRTOL, HAVE_STRTOL, REPLACE_STRTOL. * modules/strtol (Status, Notice): Remove. (Depends-on): Add stdlib. (configure.ac): Test HAVE_STRTOL and REPLACE_STRTOL. Invoke gl_STDLIB_MODULE_INDICATOR. * tests/test-strtol.c (main): Add tests of hexadecimal integer syntax. * doc/posix-functions/strtol.texi: Mention the bug.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* Fix "warning: integer overflow in expression".Bruno Haible2020-08-161-1/+1
| | | | | * tests/test-strtol.c (main): Use an 'unsigned long' expression to remove a 'long' overflow.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* Tests for module 'strtol'.Bruno Haible2012-01-051-0/+181
* modules/strtol-tests: New file. * tests/test-strtol.c: New file, based on tests/test-strtoimax.c.