diff options
| author | Paul Eggert | 2024-12-23 13:55:59 -0800 |
|---|---|---|
| committer | Paul Eggert | 2024-12-26 16:29:02 -0800 |
| commit | cf5e58a14dedabd65dee297ee2a2abb05cd4449d (patch) | |
| tree | 0774997184ada06fafff9e9a0033215d3eb725b4 /m4 | |
| parent | 85ca91ff912da7c3a672e4bfe6ce103a23ddec73 (diff) | |
| download | emacs-cf5e58a14dedabd65dee297ee2a2abb05cd4449d.tar.gz emacs-cf5e58a14dedabd65dee297ee2a2abb05cd4449d.zip | |
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/stdint.m4 | 4 | ||||
| -rw-r--r-- | m4/stdlib_h.m4 | 53 |
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 @@ | |||
| 1 | # stdint.m4 | 1 | # stdint.m4 |
| 2 | # serial 63 | 2 | # serial 64 |
| 3 | dnl Copyright (C) 2001-2024 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2001-2024 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -158,7 +158,7 @@ uintmax_t j = UINTMAX_MAX; | |||
| 158 | || defined __clang__) | 158 | || defined __clang__) |
| 159 | int k = _Generic (SIZE_MAX, size_t: 0); | 159 | int k = _Generic (SIZE_MAX, size_t: 0); |
| 160 | #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \ | 160 | #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \ |
| 161 | || (0x5110 <= __SUNPRO_C && !__STDC__)) | 161 | || (0x5110 <= __SUNPRO_C && !__STDC__) || 1939 <= _MSC_VER) |
| 162 | extern size_t k; | 162 | extern size_t k; |
| 163 | extern __typeof__ (SIZE_MAX) k; | 163 | extern __typeof__ (SIZE_MAX) k; |
| 164 | #endif | 164 | #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 @@ | |||
| 1 | # stdlib_h.m4 | 1 | # stdlib_h.m4 |
| 2 | # serial 82 | 2 | # serial 84 |
| 3 | dnl Copyright (C) 2007-2024 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2007-2024 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| @@ -41,20 +41,21 @@ AC_DEFUN_ONCE([gl_STDLIB_H], | |||
| 41 | AC_REQUIRE([gt_LOCALE_EN_UTF8]) | 41 | AC_REQUIRE([gt_LOCALE_EN_UTF8]) |
| 42 | AC_CACHE_CHECK([whether MB_CUR_MAX is correct], | 42 | AC_CACHE_CHECK([whether MB_CUR_MAX is correct], |
| 43 | [gl_cv_macro_MB_CUR_MAX_good], | 43 | [gl_cv_macro_MB_CUR_MAX_good], |
| 44 | [ | 44 | [AC_LINK_IFELSE( |
| 45 | dnl Initial guess, used when cross-compiling or when no suitable locale | 45 | [AC_LANG_PROGRAM([[#include <stdlib.h> |
| 46 | dnl is present. | 46 | ]], |
| 47 | changequote(,)dnl | 47 | [[return !!MB_CUR_MAX;]]) |
| 48 | case "$host_os" in | 48 | ], |
| 49 | # Guess no on Solaris and Haiku. | 49 | [dnl Initial guess, used when cross-compiling or when no suitable locale |
| 50 | solaris* | haiku*) gl_cv_macro_MB_CUR_MAX_good="guessing no" ;; | 50 | dnl is present. |
| 51 | # Guess yes otherwise. | 51 | # Guess no on Solaris and Haiku, yes otherwise. |
| 52 | *) gl_cv_macro_MB_CUR_MAX_good="guessing yes" ;; | 52 | AS_CASE([$host_os], |
| 53 | esac | 53 | [solaris* | haiku*], |
| 54 | changequote([,])dnl | 54 | [gl_cv_macro_MB_CUR_MAX_good="guessing no"], |
| 55 | if test "$LOCALE_EN_UTF8" != none; then | 55 | [gl_cv_macro_MB_CUR_MAX_good="guessing yes"]) |
| 56 | AC_RUN_IFELSE( | 56 | if test "$LOCALE_EN_UTF8" != none; then |
| 57 | [AC_LANG_SOURCE([[ | 57 | AC_RUN_IFELSE( |
| 58 | [AC_LANG_SOURCE([[ | ||
| 58 | #include <locale.h> | 59 | #include <locale.h> |
| 59 | #include <stdlib.h> | 60 | #include <stdlib.h> |
| 60 | int main () | 61 | int main () |
| @@ -67,15 +68,21 @@ int main () | |||
| 67 | } | 68 | } |
| 68 | return result; | 69 | return result; |
| 69 | }]])], | 70 | }]])], |
| 70 | [gl_cv_macro_MB_CUR_MAX_good=yes], | 71 | [gl_cv_macro_MB_CUR_MAX_good=yes], |
| 71 | [gl_cv_macro_MB_CUR_MAX_good=no], | 72 | [gl_cv_macro_MB_CUR_MAX_good=no], |
| 72 | [:]) | 73 | [:]) |
| 73 | fi | 74 | fi |
| 75 | ], | ||
| 76 | [gl_cv_macro_MB_CUR_MAX_good="link failed - so no"]) | ||
| 74 | ]) | 77 | ]) |
| 75 | case "$gl_cv_macro_MB_CUR_MAX_good" in | 78 | AS_CASE([$gl_cv_macro_MB_CUR_MAX_good], |
| 76 | *yes) ;; | 79 | [*yes], |
| 77 | *) REPLACE_MB_CUR_MAX=1 ;; | 80 | [], |
| 78 | esac | 81 | ["link failed - so no"], |
| 82 | [# 4 suffices as a workaround in Android NDK 16, | ||
| 83 | # the only known platform with the bug. | ||
| 84 | REPLACE_MB_CUR_MAX=4], | ||
| 85 | [REPLACE_MB_CUR_MAX="(-1)"]) | ||
| 79 | 86 | ||
| 80 | AC_CHECK_DECLS_ONCE([ecvt]) | 87 | AC_CHECK_DECLS_ONCE([ecvt]) |
| 81 | if test $ac_cv_have_decl_ecvt = no; then | 88 | if test $ac_cv_have_decl_ecvt = no; then |