]> 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:27:21 +0000 (15:27 +0100)
* lib/stdlib.in.h (gl_MB_CUR_MAX): Return size_t, not int,
to conform to POSIX.

ChangeLog
lib/stdlib.in.h

index bf70db8ce94e3557a3c307ebfa48e25ac07dc44c..5cb8ad64822e28f901bbf85b387fba1866af5c77 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 876839fe09d83765f198d617f84c6e2727142d2d..13dcc9cdf7d4b5b26fb557742ec3330bef472875 100644 (file)
@@ -732,8 +732,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);