+2019-11-24 Bruno Haible <bruno@clisp.org>
+
+ iswctype: Fix errors in C++ mode on mingw.
+ * lib/wctype.in.h (rpl_iswctype): Override if GNULIB_OVERRIDES_WINT_T
+ is 1.
+ * lib/iswctype.c (iswctype): Add another implementation, for the
+ GNULIB_defined_wint_t case.
+ * modules/iswctype (configure.ac): Compile iswctype.c also if
+ GNULIB_OVERRIDES_WINT_T is 1.
+
2019-11-24 Bruno Haible <bruno@clisp.org>
windows-timedmutex: Fix errors in C++ mode on mingw.
/* Specification. */
#include <wctype.h>
-#include "iswctype-impl.h"
+#if GNULIB_defined_wint_t
+
+int
+iswctype (wint_t wc, wctype_t desc)
+# undef iswctype
+{
+ return ((wchar_t) wc == wc ? iswctype ((wchar_t) wc, desc) : 0);
+}
+
+#else
+
+# include "iswctype-impl.h"
+
+#endif
The argument WC must be either a wchar_t value or WEOF.
The argument DESC must have been returned by the wctype() function. */
#if @GNULIB_ISWCTYPE@
-# if !@HAVE_WCTYPE_T@
+# if @GNULIB_OVERRIDES_WINT_T@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef iswctype
+# define iswctype rpl_iswctype
+# endif
+_GL_FUNCDECL_RPL (iswctype, int, (wint_t wc, wctype_t desc));
+_GL_CXXALIAS_RPL (iswctype, int, (wint_t wc, wctype_t desc));
+# else
+# if !@HAVE_WCTYPE_T@
_GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc));
-# endif
+# endif
_GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc));
+# endif
_GL_CXXALIASWARN (iswctype);
#elif defined GNULIB_POSIXCHECK
# undef iswctype
configure.ac:
gl_FUNC_ISWCTYPE
-if test $HAVE_WCTYPE_T = 0; then
+if test $HAVE_WCTYPE_T = 0 || test $GNULIB_OVERRIDES_WINT_T = 1; then
AC_LIBOBJ([iswctype])
fi
gl_WCTYPE_MODULE_INDICATOR([iswctype])