hdr locale,wchar,wctype lib locale,localeconv,wctype,iswctype,iswblank tst note{ do wctrans/towctrans work }end output{ /* * On NetBSD, these functions exist, but simply have no effect for some reason. * So instead of simple lib/typ tests, this custom test checks if they actually work. */ #include #include #include int main() { wctrans_t toupper = wctrans("toupper"), tolower = wctrans("tolower"); int r = towctrans('q',toupper) == 'Q' && towctrans('Q',tolower) == 'q'; printf("#define _lib_wctrans\t%d\n",r); printf("#define _lib_towctrans\t%d\n",r); printf("#define _typ_wctrans_t\t%d\n",r); return !r; } }end cat{ #if _PACKAGE_ast # undef _hdr_locale # define _hdr_locale 1 #else # ifdef _hdr_locale # include # ifndef LC_MESSAGES # define LC_MESSAGES LC_ALL # endif /* LC_MESSAGES */ # endif /* _hdr_locale */ #endif /* _PACKAGE_ast */ #ifdef _hdr_locale # ifdef _lib_localeconv static struct lconv *lp; # define GETDECIMAL(x) (((lp=localeconv()) && lp->decimal_point && *lp->decimal_point) ? *lp->decimal_point : '.' ) # else # define GETDECIMAL(x) ('.') # endif /* _lib_localeconv */ #else # define GETDECIMAL(x) ('.') #endif /* _hdr_locale */ }end