fnmatch: Overcome wchar_t limitations. * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Set REPLACE_FNMATCH to 1 on AIX in 32-bit mode. * lib/fnmatch.c: Include <uchar.h>. Conditionally include unistr.h. (UCHAR_TO_WCHAR): Renamed from BTOWC. (WCHAR_T, WINT_T, BTOWC, MBSRTOWCS, WCSLEN, WCSCAT, WMEMPCPY, WMEMCHR, TOWLOWER, WCTYPE_T, WCTYPE, ISWCTYPE): New macros. (IS_CHAR_CLASS): Use WCTYPE instead of wctype. (UCHAR_TO_WCHAR): Use BTOWC instead of btowc. (FOLD): Use TOWLOWER instead of towlower. (CHAR): Use WCHAR_T instead of wchar_t. (UCHAR, INT): Use WINT_T instead of wint_t. (STRLEN): Use WCSLEN instead of wcslen. (STRCAT): Use WCSCAT instead of wcscat. (MEMPCPY): Use WMEMPCPY instead of wmempcpy. (MEMCHR): Use WMEMCHR instead of wmemchr. (is_char_class): Use WCTYPE_T instead of wctype_t, WCHAR_T instead of wchar_t, WCTYPE instead of wctype. (fnmatch): Use WCHAR_T instead of wchar_t, MBSRTOWCS instead of mbsrtowcs. * lib/fnmatch_loop.c (FCT): Use WCTYPE_T instead of wctype_t, ISWCTYPE instead of iswctype. Update for renamed BTOWC. * modules/fnmatch (Depends-on): Add btoc32, c32tolower, c32_get_type_test, c32_apply_type_test, mbsrtoc32s, unistr/u32-chr, unistr/u32-pcpy, unistr/u32-strcat, unistr/u32-strlen. (Link): Add $(LIBUNISTRING). * modules/fnmatch-tests (Makefile.am): Link test-fnmatch with $(LIBUNISTRING). * doc/posix-functions/fnmatch.texi: Move the Cygwin, mingw, MSVC, AIX bug descriptions to the "fixed by Gnulib" section.