summaryrefslogtreecommitdiff
path: root/lib/wctype.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-02-06 23:59:34 +0100
committerBruno Haible <bruno@clisp.org>2011-02-09 20:54:31 +0100
commiteb944d1d03d408d829b4fa68eefd3a1ae94f9eb5 (patch)
treee1a48f744ceb64201641501d99fc987cb8487eb9 /lib/wctype.in.h
parent896cde703cb740a97353474e0156b46119b69640 (diff)
downloadgnulib-eb944d1d03d408d829b4fa68eefd3a1ae94f9eb5.tar.gz
New module 'iswctype'.
* modules/iswctype: New file. * lib/wctype.in.h (iswctype): New declaration. * lib/iswctype.c: New file. * lib/iswctype-impl.h: New file. * m4/iswctype.m4: New file. * m4/wctype_h.m4 (gl_WCTYPE_H): Test whether iswctype is declared. (gl_WCTYPE_H_DEFAULTS): Initialize GNULIB_ISWCTYPE. * modules/wctype-h (Makefile.am): Substitute GNULIB_ISWCTYPE. * tests/test-wctype-h-c++.cc: Test the declaration of iswctype. * doc/posix-functions/iswctype.texi: Mention the new module and the HP-UX 11.00 problem.
Diffstat (limited to 'lib/wctype.in.h')
-rw-r--r--lib/wctype.in.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/wctype.in.h b/lib/wctype.in.h
index f88e506b9e..a295a091fc 100644
--- a/lib/wctype.in.h
+++ b/lib/wctype.in.h
@@ -399,6 +399,23 @@ _GL_WARN_ON_USE (wctype, "wctype is unportable - "
# endif
#endif
+/* Test whether a wide character has a given property.
+ 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@
+_GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc));
+# endif
+_GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc));
+_GL_CXXALIASWARN (iswctype);
+#elif defined GNULIB_POSIXCHECK
+# undef iswctype
+# if HAVE_RAW_DECL_ISWCTYPE
+_GL_WARN_ON_USE (iswctype, "iswctype is unportable - "
+ "use gnulib module iswctype for portability");
+# endif
+#endif
+
#if @REPLACE_ISWCNTRL@ || defined __MINGW32__
_GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc));
_GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc));