1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Update from Gnulib by running admin/merge-gnulib

This commit is contained in:
Paul Eggert 2024-12-23 13:55:59 -08:00
parent 85ca91ff91
commit cf5e58a14d
14 changed files with 136 additions and 88 deletions

View file

@ -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 ()