bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] stdlib: MB_CUR_MAX is type size_t


From: Paul Eggert
Subject: [PATCH 1/2] stdlib: MB_CUR_MAX is type size_t
Date: Mon, 23 Dec 2024 12:58:38 -0800

* lib/stdlib.in.h (gl_MB_CUR_MAX): Return size_t, not int,
to conform to POSIX.
---
 ChangeLog       | 6 ++++++
 lib/stdlib.in.h | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index e6d2e1d592..90a80123a2 100644
--- 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>
 
        mbrtowc tests: Test in the UTF-8 environment on native Windows.
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index adbef69131..43430dfe68 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -749,7 +749,7 @@ _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
-_GL_STDLIB_INLINE int
+_GL_STDLIB_INLINE size_t
 gl_MB_CUR_MAX (void)
 {
   /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding.  */
-- 
2.45.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]