Index: usr.bin/localedef/ctype.c =================================================================== --- usr.bin/localedef/ctype.c +++ usr.bin/localedef/ctype.c @@ -120,7 +120,13 @@ ctn->ctype |= (_ISDIGIT | _ISGRAPH | _ISPRINT | _ISXDIGIT | _E4); break; case T_ISSPACE: - ctn->ctype |= _ISSPACE; + /* + * This can be troublesome as , , + * , , and are defined both + * as space and cntrl, and POSIX doesn't allow cntrl/print + * combination. We will take care of this in dump_ctype(). + */ + ctn->ctype |= (_ISSPACE | _ISPRINT); break; case T_ISCNTRL: ctn->ctype |= _ISCNTRL; @@ -372,9 +378,15 @@ ctn->ctype |= _ISPRINT; /* - * Finally, POSIX requires that certain combinations - * are invalid. We don't flag this as a fatal error, - * but we will warn about. + * POSIX requires that certain combinations are invalid. + * Try fixing the cases we know about (see add_ctype_impl()). + */ + if (ctn->ctype & _ISCNTRL) + ctn->ctype &= ~_ISPRINT; + + /* + * Finally, don't flag remaining cases as a fatal error, + * and just warn about them. */ if ((ctn->ctype & _ISALPHA) && (ctn->ctype & (_ISPUNCT|_ISDIGIT))) @@ -384,8 +396,6 @@ conflict++; if ((ctn->ctype & _ISSPACE) && (ctn->ctype & _ISGRAPH)) conflict++; - if ((ctn->ctype & _ISCNTRL) && (ctn->ctype & _ISPRINT)) - conflict++; if ((wc == ' ') && (ctn->ctype & (_ISPUNCT|_ISGRAPH))) conflict++;