Inferred from report by Tomasz Kłoczko <https://bugs.gnu.org/63632>.
* m4/strtol.m4 (gl_FUNC_STRTOL):
* m4/strtoll.m4 (gl_FUNC_STRTOLL):
Also test "0b", since the test cases check it.
2023-05-21 Paul Eggert <eggert@cs.ucla.edu>
+ strtol: match 'configure' to 'make check'
+ Inferred from report by Tomasz Kłoczko <https://bugs.gnu.org/63632>.
+ * m4/strtol.m4 (gl_FUNC_STRTOL):
+ * m4/strtoll.m4 (gl_FUNC_STRTOLL):
+ Also test "0b", since the test cases check it.
+
git-merge-changelog: port to size_t padding
* lib/git-merge-changelog (entry_hashcode):
As a nicety, Prefer SIZE_WIDTH to computing it ourselves.
-# strtol.m4 serial 8
+# strtol.m4 serial 9
dnl Copyright (C) 2002-2003, 2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
char *term;
/* This test fails on Minix and native Windows. */
{
- const char input[] = "0x";
- (void) strtol (input, &term, 16);
- if (term != input + 1)
- result |= 1;
+ static char const input[2][3] = {"0x", "0b"};
+ static int const base[] = {0, 2, 10};
+ int i, j;
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 3; j++)
+ {
+ (void) strtol (input[i], &term, base[j]);
+ if (term != input[i] + 1)
+ result |= 1;
+ }
}
/* This test fails on pre-C23 platforms. */
{
-# strtoll.m4 serial 10
+# strtoll.m4 serial 11
dnl Copyright (C) 2002, 2004, 2006, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
char *term;
/* This test fails on Minix and native Windows. */
{
- const char input[] = "0x";
- (void) strtoll (input, &term, 16);
- if (term != input + 1)
- result |= 1;
+ static char const input[2][3] = {"0x", "0b"};
+ static int const base[] = {0, 2, 10};
+ int i, j;
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 3; j++)
+ {
+ (void) strtoll (input[i], &term, base[j]);
+ if (term != input[i] + 1)
+ result |= 1;
+ }
}
/* This test fails on pre-C23 platforms. */
{