MB_LEN_MAX definition

Hi,

What do you think of http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=564610 ?

Thanks,
Arthur.

I suppose that given that we correctly emit UTF-8 bytes for string literals containing \u sequences, we should set MB_MAX_LEN to 4.
Expecting it to be 16 is just broken.

Sebastian

Arthur Loiret <aloiret-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org> writes:

What do you think of http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=564610 ?

The trunk looks fine (and 2.7-2 (Debian testing) matches, so maybe it's
been fixed since 2.6-1?): limits.h has

/* System headers include a number of constants from POSIX in <limits.h>. */
#include_next <limits.h>
...
#ifndef MB_LEN_MAX
#define MB_LEN_MAX 1
#endif

and /usr/include/limits.h (from libc6-dev, but eglibc seems to match)
has

/* Maximum length of any multibyte character in any locale.
   We define this value here since the gcc header does not define
   the correct value. */
#define MB_LEN_MAX 16