summaryrefslogtreecommitdiffstats
path: root/m4/strtol.m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:56:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 08:56:12 +0000
commit5fc9e0f4acbb0647b6564d091257340b4ce800f1 (patch)
tree7c2ae9ffc1d5f93f36444e153ddaed2434612f9e /m4/strtol.m4
parentReleasing progress-linux version 1.21.4-1~progress7.99u1. (diff)
downloadwget-5fc9e0f4acbb0647b6564d091257340b4ce800f1.tar.xz
wget-5fc9e0f4acbb0647b6564d091257340b4ce800f1.zip
Merging upstream version 1.24.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/strtol.m4')
-rw-r--r--m4/strtol.m420
1 files changed, 13 insertions, 7 deletions
diff --git a/m4/strtol.m4 b/m4/strtol.m4
index 5cdd86a..d5c6079 100644
--- a/m4/strtol.m4
+++ b/m4/strtol.m4
@@ -1,5 +1,5 @@
-# strtol.m4 serial 8
-dnl Copyright (C) 2002-2003, 2006, 2009-2023 Free Software Foundation, Inc.
+# strtol.m4 serial 10
+dnl Copyright (C) 2002-2003, 2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -19,10 +19,16 @@ AC_DEFUN([gl_FUNC_STRTOL],
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. */
{
@@ -38,7 +44,7 @@ AC_DEFUN([gl_FUNC_STRTOL],
[gl_cv_func_strtol_works=no],
[case "$host_os" in
# Guess no on native Windows.
- mingw*) gl_cv_func_strtol_works="guessing no" ;;
+ mingw* | windows*) gl_cv_func_strtol_works="guessing no" ;;
# Guess no on glibc systems.
*-gnu* | gnu*) gl_cv_func_strtol_works="guessing no" ;;
# Guess no on musl systems.