texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Patrice Dumas
Date: Tue, 24 Dec 2024 04:11:30 -0500 (EST)

branch: master
commit 4dfee4eee90283c144afaeb73af86ff7222e415d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Dec 24 09:57:26 2024 +0100

    Run gnulib --add-import under tp/Texinfo/XS.
---
 ChangeLog                                    |  4 ++++
 tp/Texinfo/XS/gnulib/lib/intprops-internal.h |  9 +++----
 tp/Texinfo/XS/gnulib/lib/stdlib.in.h         |  9 +++++--
 tp/Texinfo/XS/gnulib/m4/stdint.m4            |  4 ++--
 tp/Texinfo/XS/gnulib/m4/stdlib_h.m4          | 36 ++++++++++++++++------------
 5 files changed, 39 insertions(+), 23 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8a65920d12..cae2241b3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-12-24  Patrice Dumas  <pertusus@free.fr>
+
+       Run gnulib --add-import under tp/Texinfo/XS.
+
 2024-12-23  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/converter.c (free_converter_paths_information)
diff --git a/tp/Texinfo/XS/gnulib/lib/intprops-internal.h 
b/tp/Texinfo/XS/gnulib/lib/intprops-internal.h
index c8cc0e2019..0b7e1f539a 100644
--- a/tp/Texinfo/XS/gnulib/lib/intprops-internal.h
+++ b/tp/Texinfo/XS/gnulib/lib/intprops-internal.h
@@ -77,10 +77,11 @@
 
 /* Does the __typeof__ keyword work?  This could be done by
    'configure', but for now it's easier to do it by hand.  */
-#if (2 <= __GNUC__ \
-     || (4 <= __clang_major__) \
-     || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
-     || (0x5110 <= __SUNPRO_C && !__STDC__))
+#if ((defined __GNUC__ && 2 <= __GNUC__) \
+     || (defined __clang_major__ && 4 <= __clang_major__) \
+     || (defined __IBMC__ && 1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
+     || (defined __SUNPRO_C && 0x5110 <= __SUNPRO_C && !__STDC__) \
+     || (defined _MSC_VER && 1939 <= _MSC_VER))
 # define _GL_HAVE___TYPEOF__ 1
 #else
 # define _GL_HAVE___TYPEOF__ 0
diff --git a/tp/Texinfo/XS/gnulib/lib/stdlib.in.h 
b/tp/Texinfo/XS/gnulib/lib/stdlib.in.h
index adbef69131..14f45cc21e 100644
--- a/tp/Texinfo/XS/gnulib/lib/stdlib.in.h
+++ b/tp/Texinfo/XS/gnulib/lib/stdlib.in.h
@@ -746,15 +746,20 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant 
everywhere - "
 # endif
 #endif
 
-/* Return maximum number of bytes of a multibyte character.  */
+/* Return maximum number of bytes in a multibyte character in the
+   current locale.  */
 #if @REPLACE_MB_CUR_MAX@
 # if !GNULIB_defined_MB_CUR_MAX
-_GL_STDLIB_INLINE int
+_GL_STDLIB_INLINE size_t
 gl_MB_CUR_MAX (void)
 {
+#  if 0 < @REPLACE_MB_CUR_MAX@
+  return @REPLACE_MB_CUR_MAX@;
+#  else
   /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding.  */
   int gl_mb_cur_max = MB_CUR_MAX;
   return gl_mb_cur_max == 3 ? 4 : gl_mb_cur_max;
+#  endif
 }
 #  undef MB_CUR_MAX
 #  define MB_CUR_MAX gl_MB_CUR_MAX ()
diff --git a/tp/Texinfo/XS/gnulib/m4/stdint.m4 
b/tp/Texinfo/XS/gnulib/m4/stdint.m4
index 0a078e64d5..1f3062a890 100644
--- a/tp/Texinfo/XS/gnulib/m4/stdint.m4
+++ b/tp/Texinfo/XS/gnulib/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/tp/Texinfo/XS/gnulib/m4/stdlib_h.m4 
b/tp/Texinfo/XS/gnulib/m4/stdlib_h.m4
index 87b63ff54e..f1192e3d25 100644
--- a/tp/Texinfo/XS/gnulib/m4/stdlib_h.m4
+++ b/tp/Texinfo/XS/gnulib/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
 # stdlib_h.m4
-# serial 82
+# serial 83
 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,17 +41,17 @@ 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
+    [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.
-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
+      # 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([[
@@ -71,11 +71,17 @@ int main ()
           [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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]