From 63fa6c00c541b9462784337e15955d7c3027f2f3 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 15 Jan 2016 17:09:43 +0100 Subject: [PATCH 1/1] add config files --- m4/locale.m4 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ m4/wctype.m4 | 41 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 m4/locale.m4 create mode 100644 m4/wctype.m4 diff --git a/m4/locale.m4 b/m4/locale.m4 new file mode 100644 index 0000000..e422a92 --- /dev/null +++ b/m4/locale.m4 @@ -0,0 +1,56 @@ +PSI_CHECK_LOCALE() { + AC_CHECK_HEADERS(locale.h xlocale.h) + + PSI_STRUCT(struct lconv, [ + char *currency_symbol, + char *decimal_point, + char frac_digits, + char *grouping, + char *int_curr_symbol, + char int_frac_digits, + char int_n_cs_precedes, + char int_n_sep_by_space, + char int_n_sign_posn, + char int_p_cs_precedes, + char int_p_sep_by_space, + char int_p_sign_posn, + char *mon_decimal_point, + char *mon_grouping, + char *mon_thousands_sep, + char *negative_sign, + char n_cs_precedes, + char n_sep_by_space, + char n_sign_posn, + char *positive_sign, + char p_cs_precedes, + char p_sep_by_space, + char p_sign_posn, + char *thousands_sep]) + + PSI_CONST(LC_ALL, int) + PSI_CONST(LC_COLLATE, int) + PSI_CONST(LC_CTYPE, int) + PSI_CONST(LC_MESSAGES, int) + PSI_CONST(LC_MONETARY, int) + PSI_CONST(LC_NUMERIC, int) + PSI_CONST(LC_TIME, int) + + PSI_CONST(LC_COLLATE_MASK, int) + PSI_CONST(LC_CTYPE_MASK, int) + PSI_CONST(LC_MESSAGES_MASK, int) + PSI_CONST(LC_MONETARY_MASK, int) + PSI_CONST(LC_NUMERIC_MASK, int) + PSI_CONST(LC_TIME_MASK, int) + PSI_CONST(LC_ALL_MASK, int) + + PSI_MACRO(locale_t LC_GLOBAL_LOCALE) + + PSI_OPAQUE_TYPE(locale_t) + + PSI_DECL(locale_t duplocale, [(locale_t loc)]) + PSI_DECL(void freelocale, [(locale_t loc)]) + PSI_DECL(struct lconv *localeconv, [(void)]) + PSI_DECL(locale_t newlocale, [(int mask, const char *locale, locale_t base)]) + PSI_DECL(char *setlocale, [(int category, const char *locale)]) + PSI_DECL(locale_t uselocale, [(locale_t loc)]) +} diff --git a/m4/wctype.m4 b/m4/wctype.m4 new file mode 100644 index 0000000..319c2fc --- /dev/null +++ b/m4/wctype.m4 @@ -0,0 +1,41 @@ +PSI_CHECK_WCTYPE() { + AC_CHECK_HEADERS(wctype.h) + + PSI_TYPE(wctrans_t, int) + + PSI_DECL(int iswalnum, [(wint_t wc)]) + PSI_DECL(int iswalpha, [(wint_t wc)]) + PSI_DECL(int iswcntrl, [(wint_t wc)]) + PSI_DECL(int iswctype, [(wint_t wc, wctype_t class)]) + PSI_DECL(int iswdigit, [(wint_t wc)]) + PSI_DECL(int iswgraph, [(wint_t wc)]) + PSI_DECL(int iswlower, [(wint_t wc)]) + PSI_DECL(int iswprint, [(wint_t wc)]) + PSI_DECL(int iswpunct, [(wint_t wc)]) + PSI_DECL(int iswspace, [(wint_t wc)]) + PSI_DECL(int iswupper, [(wint_t wc)]) + PSI_DECL(int iswxdigit, [(wint_t wc)]) + PSI_DECL(wint_t towlower, [(wint_t wc)]) + PSI_DECL(wint_t towupper, [(wint_t wc)]) + PSI_DECL(wint_t towctrans, [(wint_t wc, wctrans_t desc)]) + PSI_DECL(wctype_t wctype, [(const char *name)]) + PSI_DECL(wctrans_t wctrans, [(const char *class)]) + + PSI_DECL(int iswalnum_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(int iswalpha_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(int iswcntrl_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(int iswctype_l, [(wint_t wc_l, wctype_t class, locale_t loc)]) + PSI_DECL(int iswdigit_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(int iswgraph_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(int iswlower_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(int iswprint_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(int iswpunct_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(int iswspace_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(int iswupper_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(int iswxdigit_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(wint_t towlower_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(wint_t towupper_l, [(wint_t wc, locale_t loc)]) + PSI_DECL(wint_t towctrans_l, [(wint_t wc, wctrans_t desc, locale_t loc)]) + PSI_DECL(wctype_t wctype_l, [(const char *name, locale_t loc)]) + PSI_DECL(wctrans_t wctrans_l, [(const char *class, locale_t loc)]) +} -- 2.30.2