diff options
author | Bruno Haible <bruno@clisp.org> | 2019-11-17 04:02:22 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-11-17 04:02:22 +0100 |
commit | 7e22b59a5f0506e4c2a53aad451e72cea6c4ad67 (patch) | |
tree | 84342586f5b0792e547e1a32755e9ae1100c3e5c /m4 | |
parent | b7bf9f4361c8d78ccfda7a30ff31f7a406ea972e (diff) | |
download | gnulib-7e22b59a5f0506e4c2a53aad451e72cea6c4ad67.tar.gz |
wctype-h: When overriding wint_t, override also the related functions.
Reported by Christian Biesinger <cbiesinger@google.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00027.html>.
* m4/wctype_h.m4 (gl_WCTYPE_H): When GNULIB_OVERRIDES_WINT_T is 1, set
REPLACE_ISWCNTRL to 1.
* lib/wctype.in.h (rpl_iswalnum, rpl_iswalpha, rpl_iswblank,
rpl_iswcntrl, rpl_iswdigit, rpl_iswgraph, rpl_iswlower, rpl_iswprint,
rpl_iswpunct, rpl_iswspace, rpl_iswupper, rpl_iswxdigit, rpl_towlower,
rpl_towupper): New definitions when GNULIB_OVERRIDES_WINT_T is 1.
* doc/posix-headers/wchar.texi: Mention that wint_t is also overridden
on mingw.
* doc/posix-headers/wctype.texi: Likewise.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/wctype_h.m4 | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/m4/wctype_h.m4 b/m4/wctype_h.m4 index 6903d7583c..d5acb72d6b 100644 --- a/m4/wctype_h.m4 +++ b/m4/wctype_h.m4 @@ -1,4 +1,4 @@ -# wctype_h.m4 serial 21 +# wctype_h.m4 serial 22 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it. @@ -69,10 +69,14 @@ AC_DEFUN([gl_WCTYPE_H], fi AC_SUBST([HAVE_WCTYPE_H]) - case "$gl_cv_func_iswcntrl_works" in - *yes) REPLACE_ISWCNTRL=0 ;; - *) REPLACE_ISWCNTRL=1 ;; - esac + if test $GNULIB_OVERRIDES_WINT_T = 1; then + REPLACE_ISWCNTRL=1 + else + case "$gl_cv_func_iswcntrl_works" in + *yes) REPLACE_ISWCNTRL=0 ;; + *) REPLACE_ISWCNTRL=1 ;; + esac + fi AC_SUBST([REPLACE_ISWCNTRL]) if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then |