]> 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)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 23 Dec 2024 20:58:20 +0000 (12:58 -0800)
commit8ed83a352225ea494db4d8a5d995729106104c18
tree32f905eef23d81a0754238ee37c49505528f9d42
parent63eaf65372eba92729bdb4205f2ec7fc9f861015
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.  Use AS_CASE
so that Emacs can navigate this code better.
* 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