]> 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:27:21 +0000 (15:27 +0100)
commit2273c854ca1979c2073edd5d97cfccb933148eab
tree40e5371ef608948fc6e46107036a665b95f6d873
parent6bc19a524b123f1b7627a6e0d75619b5b0117902
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