summaryrefslogtreecommitdiff
path: root/m4/wcpncpy.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-02-05 15:32:00 +0100
committerBruno Haible <bruno@clisp.org>2011-02-07 23:36:04 +0100
commit49549725af344962f45720d4d332d9cf0699ebcd (patch)
treee8bdb8368d12ef769826ce3d2d43f3c01179da70 /m4/wcpncpy.m4
parentcde82ba3a73b7482132a950ac0d7cb0da67a2e1c (diff)
downloadgnulib-49549725af344962f45720d4d332d9cf0699ebcd.tar.gz
New module 'wcpncpy'.
* modules/wcpncpy: New file. * lib/wchar.in.h (wcpncpy): New declaration. * lib/wcpncpy.c: New file. * lib/wcpncpy-impl.h: New file, from libutf8 with modifications. * m4/wcpncpy.m4: New file. * m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcpncpy is declared. (gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCPNCPY, HAVE_WCPNCPY. * modules/wchar (Makefile.am): Substitute GNULIB_WCPNCPY, HAVE_WCPNCPY. * tests/test-wchar-c++.cc: Test the declaration of wcpncpy. * doc/posix-functions/wcpncpy.texi: Mention the new module.
Diffstat (limited to 'm4/wcpncpy.m4')
-rw-r--r--m4/wcpncpy.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/m4/wcpncpy.m4 b/m4/wcpncpy.m4
new file mode 100644
index 0000000000..939e8808f7
--- /dev/null
+++ b/m4/wcpncpy.m4
@@ -0,0 +1,15 @@
+# wcpncpy.m4 serial 1
+dnl Copyright (C) 2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_WCPNCPY],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([wcpncpy])
+ if test $ac_cv_func_wcpncpy = no; then
+ HAVE_WCPNCPY=0
+ AC_LIBOBJ([wcpncpy])
+ fi
+])