summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2024-12-23 13:55:59 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2024-12-26 16:29:02 -0800
commitcf5e58a14dedabd65dee297ee2a2abb05cd4449d (patch)
tree0774997184ada06fafff9e9a0033215d3eb725b4 /m4
parent85ca91ff912da7c3a672e4bfe6ce103a23ddec73 (diff)
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'm4')
-rw-r--r--m4/stdint.m44
-rw-r--r--m4/stdlib_h.m453
2 files changed, 32 insertions, 25 deletions
diff --git a/m4/stdint.m4 b/m4/stdint.m4
index 0a078e64d58..1f3062a8900 100644
--- a/m4/stdint.m4
+++ b/m4/stdint.m4
@@ -1,5 +1,5 @@
# stdint.m4
-# serial 63
+# serial 64
dnl Copyright (C) 2001-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,
@@ -158,7 +158,7 @@ uintmax_t j = UINTMAX_MAX;
|| defined __clang__)
int k = _Generic (SIZE_MAX, size_t: 0);
#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
- || (0x5110 <= __SUNPRO_C && !__STDC__))
+ || (0x5110 <= __SUNPRO_C && !__STDC__) || 1939 <= _MSC_VER)
extern size_t k;
extern __typeof__ (SIZE_MAX) k;
#endif
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 87b63ff54e3..ba56a9480b3 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
# stdlib_h.m4
-# serial 82
+# serial 84
dnl Copyright (C) 2007-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,
@@ -41,20 +41,21 @@ AC_DEFUN_ONCE([gl_STDLIB_H],
AC_REQUIRE([gt_LOCALE_EN_UTF8])
AC_CACHE_CHECK([whether MB_CUR_MAX is correct],
[gl_cv_macro_MB_CUR_MAX_good],
- [
- dnl Initial guess, used when cross-compiling or when no suitable locale
- dnl is present.
-changequote(,)dnl
- case "$host_os" in
- # Guess no on Solaris and Haiku.
- solaris* | haiku*) gl_cv_macro_MB_CUR_MAX_good="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_macro_MB_CUR_MAX_good="guessing yes" ;;
- esac
-changequote([,])dnl
- if test "$LOCALE_EN_UTF8" != none; then
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <stdlib.h>
+ ]],
+ [[return !!MB_CUR_MAX;]])
+ ],
+ [dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+ # Guess no on Solaris and Haiku, yes otherwise.
+ AS_CASE([$host_os],
+ [solaris* | haiku*],
+ [gl_cv_macro_MB_CUR_MAX_good="guessing no"],
+ [gl_cv_macro_MB_CUR_MAX_good="guessing yes"])
+ if test "$LOCALE_EN_UTF8" != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
#include <locale.h>
#include <stdlib.h>
int main ()
@@ -67,15 +68,21 @@ int main ()
}
return result;
}]])],
- [gl_cv_macro_MB_CUR_MAX_good=yes],
- [gl_cv_macro_MB_CUR_MAX_good=no],
- [:])
- fi
+ [gl_cv_macro_MB_CUR_MAX_good=yes],
+ [gl_cv_macro_MB_CUR_MAX_good=no],
+ [:])
+ fi
+ ],
+ [gl_cv_macro_MB_CUR_MAX_good="link failed - so no"])
])
- case "$gl_cv_macro_MB_CUR_MAX_good" in
- *yes) ;;
- *) REPLACE_MB_CUR_MAX=1 ;;
- esac
+ AS_CASE([$gl_cv_macro_MB_CUR_MAX_good],
+ [*yes],
+ [],
+ ["link failed - so no"],
+ [# 4 suffices as a workaround in Android NDK 16,
+ # the only known platform with the bug.
+ REPLACE_MB_CUR_MAX=4],
+ [REPLACE_MB_CUR_MAX="(-1)"])
AC_CHECK_DECLS_ONCE([ecvt])
if test $ac_cv_have_decl_ecvt = no; then