* tests/test-xstrtol.c (is_GNULIB_strtol): New macro.
(main): Use it in the expected test results.
* tests/test-xstrtoll.c (is_GNULIB_strtol): New macro.
+2024-08-05 Bruno Haible <bruno@clisp.org>
+
+ xstrtol, xstrtoll tests: Fix test failures.
+ * tests/test-xstrtol.c (is_GNULIB_strtol): New macro.
+ (main): Use it in the expected test results.
+ * tests/test-xstrtoll.c (is_GNULIB_strtol): New macro.
+
2024-08-05 Bruno Haible <bruno@clisp.org>
gnulib-tool.py: Fix testdirs created with --without-tests.
# define __xstrtol xstrtol
# define __strtol_t long int
# define __spec "ld"
+# define is_GNULIB_strtol GNULIB_defined_strtol_function
#endif
/* Don't show the program name in error messages. */
char *endp = NULL;
__strtol_t val = -17;
strtol_error s_err = __xstrtol (input, &endp, -1, &val, "k");
-# if !(defined __GLIBC__ || defined __CYGWIN__)
+# if !(defined __GLIBC__ || defined __CYGWIN__ || is_GNULIB_strtol)
ASSERT (s_err == LONGINT_OK);
ASSERT (endp == input + 1);
ASSERT (val == 1024);
#define __xstrtol xstrtoll
#define __strtol_t long long int
#define __spec "lld"
+#define is_GNULIB_strtol GNULIB_defined_strtoll_function
#include "test-xstrtol.c"