]> Savannah Git Hosting - gnulib.git/commit
stdlib: fix MB_CUR_MAX on older Android
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 Dec 2024 20:57:12 +0000 (12:57 -0800)
committerBruno Haible <bruno@clisp.org>
Wed, 25 Dec 2024 14:35:25 +0000 (15:35 +0100)
commit81af836c91b69b4d7ede11852ff135e5967d5ea9
tree7922428ae4c4efcd9c40ec9f0d29706a9ef0103f
parent0ad821e500a192ad6f6dbee9d82863cf77ac6105
stdlib: fix MB_CUR_MAX on older Android

Android NDK r16 MB_CUR_MAX doesn’t link when compiling C.
Problem found in GNU Emacs, which worked around it this way:
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=39a7e6b79fdeafc539a36f6831d922a2622cb679
... but this ran afoul of the recent Gnulib change that
added lib/stdlib.c.
* lib/stdlib.in.h (gl_MB_CUR_MAX): If @REPLACE_MB_CUR_MAX@
is positive, use its value directly.
* m4/stdlib_h.m4 (gl_STDLIB_H): Set REPLACE_MB_CUR_MAX to (-1)
if the Solaris bug, and to 4 if the Android bug.
* tests/test-stdlib.c (main): Check that MB_CUR_MAX compiles
and is nonzero.
ChangeLog
doc/posix-headers/stdlib.texi
lib/stdlib.in.h
m4/stdlib_h.m4
tests/test-stdlib.c