From: Paul Eggert Date: Mon, 23 Dec 2024 20:23:22 +0000 (-0800) Subject: stdlib: MB_CUR_MAX is type size_t X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=0ad821e500a192ad6f6dbee9d82863cf77ac6105;p=gnulib.git stdlib: MB_CUR_MAX is type size_t * lib/stdlib.in.h (gl_MB_CUR_MAX): Return size_t, not int, to conform to POSIX. --- diff --git a/ChangeLog b/ChangeLog index 91cc478a27..be037c9c64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024-12-23 Paul Eggert + + stdlib: MB_CUR_MAX is type size_t + * lib/stdlib.in.h (gl_MB_CUR_MAX): Return size_t, not int, + to conform to POSIX. + 2024-12-23 Bruno Haible setlocale: Support the UTF-8 environment on native Windows. diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index d6faae11df..975052b3c0 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -707,8 +707,8 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " /* Return maximum number of bytes of a multibyte character. */ #if @REPLACE_MB_CUR_MAX@ # if !GNULIB_defined_MB_CUR_MAX -static inline -int gl_MB_CUR_MAX (void) +static inline size_t +gl_MB_CUR_MAX (void) { /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */ return MB_CUR_MAX + (MB_CUR_MAX == 3);