diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:56:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 08:56:01 +0000 |
commit | 502c540485a1626fce474639d572904a4e3c55fe (patch) | |
tree | c8bb1ed8bda9ce49697a30eaab650191e9462e2a /m4/strtoll.m4 | |
parent | Adding debian version 1.21.4-1. (diff) | |
download | wget-502c540485a1626fce474639d572904a4e3c55fe.tar.xz wget-502c540485a1626fce474639d572904a4e3c55fe.zip |
Merging upstream version 1.24.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/strtoll.m4')
-rw-r--r-- | m4/strtoll.m4 | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/m4/strtoll.m4 b/m4/strtoll.m4 index ec09609..130b909 100644 --- a/m4/strtoll.m4 +++ b/m4/strtoll.m4 @@ -1,5 +1,5 @@ -# strtoll.m4 serial 10 -dnl Copyright (C) 2002, 2004, 2006, 2008-2023 Free Software Foundation, Inc. +# strtoll.m4 serial 12 +dnl Copyright (C) 2002, 2004, 2006, 2008-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_STRTOLL], 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. */ { @@ -38,7 +44,7 @@ AC_DEFUN([gl_FUNC_STRTOLL], [gl_cv_func_strtoll_works=no], [case "$host_os" in # Guess no on native Windows. - mingw*) gl_cv_func_strtoll_works="guessing no" ;; + mingw* | windows*) gl_cv_func_strtoll_works="guessing no" ;; # Guess no on glibc systems. *-gnu* | gnu*) gl_cv_func_strtoll_works="guessing no" ;; # Guess no on musl systems. |