]> Savannah Git Hosting - gnulib.git/commitdiff
stdlib: MB_CUR_MAX is type size_t
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 Dec 2024 20:23:22 +0000 (12:23 -0800)
committerBruno Haible <bruno@clisp.org>
Wed, 25 Dec 2024 14:34:18 +0000 (15:34 +0100)
* lib/stdlib.in.h (gl_MB_CUR_MAX): Return size_t, not int,
to conform to POSIX.

ChangeLog
lib/stdlib.in.h

index 91cc478a27508faae3db311ab23c2a72682b68e5..be037c9c64df4485f0698611db2e48f919c500de 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-12-23  Paul Eggert  <eggert@cs.ucla.edu>
+
+       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  <bruno@clisp.org>
 
        setlocale: Support the UTF-8 environment on native Windows.
index d6faae11dfd69a73b7607ad802fdaafa68b6477b..975052b3c0ae335fcd17cbc669ca5d86d15872ef 100644 (file)
@@ -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);