Mike Frysinger wrote: > i dont see any checks/replacements for when MB_CUR_MAX does not exist
This is because MB_CUR_MAX is part of ANSI C + amendment 1 (ca. 1995), and no platforms are known that lack it (see gnulib/doc/posix-headers/stdlib.texi). Likewise for mbtowc(): It's present on all platforms we care about, see gnulib/doc/posix-functions/mbtowc.texi. > (like in a uClibc build where all multibyte > related stuff has been disabled). for example, zile falls apart like so: > ../../zile-2.3.7/lib/mbrtowc.c: In function ‘rpl_mbrtowc’: > ../../zile-2.3.7/lib/mbrtowc.c:96: warning: implicit declaration of function > ‘mbtowc’ > ../../zile-2.3.7/lib/mbrtowc.c:124: error: ‘MB_CUR_MAX’ undeclared (first use > in this function) There is an easy way out: just don't disable all multibyte related stuff in uClibc. uClibc has this code, that's what you're saying. Therefore there's no point in gnulib to duplicate this functionality. All other platforms have ANSI C + amendment 1. > after all, gnulib is providing the multibyte functions itself No, gnulib is not providing the whole locale and multibyte layer from scratch. It provides the reasonable set of multibyte functions, assuming the foundations are already implemented in the system libc. Bruno