MB_LEN_MAX definition

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MB_LEN_MAX definition

Arthur Loiret
Hi,


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


Thanks,
Arthur.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: MB_LEN_MAX definition

Sebastian Redl

On Aug 25, 2010, at 6:07 AM, Arthur Loiret wrote:

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

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
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: MB_LEN_MAX definition

bruce.r.stephens
In reply to this post by Arthur Loiret
Arthur Loiret <[hidden email]> 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

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev