summaryrefslogtreecommitdiff
path: root/lib/wchar.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-02-06 14:02:26 +0100
committerBruno Haible <bruno@clisp.org>2011-02-07 23:36:06 +0100
commitf966b70bca56f1925c529598012eabb7d9fec5bf (patch)
tree4db1ac9c552b210041300b348d657ed911a16198 /lib/wchar.in.h
parent214aca197fc1b600e119e0fbae8cf196b48c5276 (diff)
downloadgnulib-f966b70bca56f1925c529598012eabb7d9fec5bf.tar.gz
New module 'wcsrchr'.
* modules/wcsrchr: New file. * lib/wchar.in.h (wcsrchr): New declaration. * lib/wcsrchr.c: New file. * lib/wcsrchr-impl.h: New file, from libutf8 with modifications. * m4/wcsrchr.m4: New file. * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsrchr is declared. (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSRCHR, HAVE_WCSRCHR. * modules/wchar (Makefile.am): Substitute GNULIB_WCSRCHR, HAVE_WCSRCHR. * tests/test-wchar-c++.cc: Test the declaration of wcsrchr. * doc/posix-functions/wcsrchr.texi: Mention the new module.
Diffstat (limited to 'lib/wchar.in.h')
-rw-r--r--lib/wchar.in.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index 815180f11e..8eaf4f63d6 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -787,6 +787,22 @@ _GL_WARN_ON_USE (wcschr, "wcschr is unportable - "
#endif
+/* Find the last occurrence of WC in WCS. */
+#if @GNULIB_WCSRCHR@
+# if !@HAVE_WCSRCHR@
+_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc));
+# endif
+_GL_CXXALIAS_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc));
+_GL_CXXALIASWARN (wcsrchr);
+#elif defined GNULIB_POSIXCHECK
+# undef wcsrchr
+# if HAVE_RAW_DECL_WCSRCHR
+_GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - "
+ "use gnulib module wcsrchr for portability");
+# endif
+#endif
+
+
#endif /* _GL_WCHAR_H */
#endif /* _GL_WCHAR_H */
#endif