startup: warn about a strange character size only in the UTF-8 case

This addresses https://savannah.gnu.org/bugs/?50897.
Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
master
Benno Schulenberg 2017-04-30 11:14:02 +02:00
parent c1ebfa04ae
commit a8a60b29e6
1 changed files with 2 additions and 0 deletions

View File

@ -2011,9 +2011,11 @@ int main(int argc, char **argv)
textdomain(PACKAGE); textdomain(PACKAGE);
#endif #endif
#ifdef ENABLE_UTF8
if (MB_CUR_MAX > MAXCHARLEN) if (MB_CUR_MAX > MAXCHARLEN)
fprintf(stderr, "Unexpected large character size: %i bytes" fprintf(stderr, "Unexpected large character size: %i bytes"
" -- please report a bug\n", (int)MB_CUR_MAX); " -- please report a bug\n", (int)MB_CUR_MAX);
#endif
#if defined(DISABLE_NANORC) && defined(DISABLE_ROOTWRAPPING) #if defined(DISABLE_NANORC) && defined(DISABLE_ROOTWRAPPING)
/* If we don't have rcfile support, --disable-wrapping-as-root is /* If we don't have rcfile support, --disable-wrapping-as-root is