aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib.in.h
diff options
context:
space:
mode:
authorPaul Eggert2024-12-23 13:55:59 -0800
committerPaul Eggert2024-12-26 16:29:02 -0800
commitcf5e58a14dedabd65dee297ee2a2abb05cd4449d (patch)
tree0774997184ada06fafff9e9a0033215d3eb725b4 /lib/stdlib.in.h
parent85ca91ff912da7c3a672e4bfe6ce103a23ddec73 (diff)
downloademacs-cf5e58a14dedabd65dee297ee2a2abb05cd4449d.tar.gz
emacs-cf5e58a14dedabd65dee297ee2a2abb05cd4449d.zip
Update from Gnulib by running admin/merge-gnulib
Diffstat (limited to 'lib/stdlib.in.h')
-rw-r--r--lib/stdlib.in.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index adbef69131b..14f45cc21e5 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -746,15 +746,20 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
746# endif 746# endif
747#endif 747#endif
748 748
749/* Return maximum number of bytes of a multibyte character. */ 749/* Return maximum number of bytes in a multibyte character in the
750 current locale. */
750#if @REPLACE_MB_CUR_MAX@ 751#if @REPLACE_MB_CUR_MAX@
751# if !GNULIB_defined_MB_CUR_MAX 752# if !GNULIB_defined_MB_CUR_MAX
752_GL_STDLIB_INLINE int 753_GL_STDLIB_INLINE size_t
753gl_MB_CUR_MAX (void) 754gl_MB_CUR_MAX (void)
754{ 755{
756# if 0 < @REPLACE_MB_CUR_MAX@
757 return @REPLACE_MB_CUR_MAX@;
758# else
755 /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */ 759 /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */
756 int gl_mb_cur_max = MB_CUR_MAX; 760 int gl_mb_cur_max = MB_CUR_MAX;
757 return gl_mb_cur_max == 3 ? 4 : gl_mb_cur_max; 761 return gl_mb_cur_max == 3 ? 4 : gl_mb_cur_max;
762# endif
758} 763}
759# undef MB_CUR_MAX 764# undef MB_CUR_MAX
760# define MB_CUR_MAX gl_MB_CUR_MAX () 765# define MB_CUR_MAX gl_MB_CUR_MAX ()