This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MB_LEN_MAX conflict between gcc's limits.h and newlib's sys/config.h


"J. Johnston" wrote:
> The second issue is that the gcc default value does not consider that multibyte
> support may exist.  According to ANSI, the value of MB_CUR_MAX (which
> is found in stdlib.h) is never larger than MB_LEN_MAX.  This isn't true
> as MB_CUR_MAX can be set up to 8 for Japanese JIS, for example, when
> newlib is configured with the --enable-newlib-mb option.  Perhaps gcc
> could look for this configuration option when building a cross-compiler and
> set MB_LEN_MAX appropriately.

gcc's limits.h generation has a check if there is a target limits.h header,
and if so, that is included first, and MB_LEN_MAX is only defined by gcc's limits.h
if it hasn't been defined before by the target.
But for this to work, newlib would have to have a limits.h file to start with, and
gcc would have to find it in $(SYSTEM_HEADER_DIR) .
	
-- 
--------------------------
SuperH (UK) Ltd.
2430 Aztec West / Almondsbury / BRISTOL / BS32 4AQ
T:+44 1454 462330


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]