diff options
author | Bruno Haible <bruno@clisp.org> | 2011-02-05 15:15:14 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-02-07 23:36:03 +0100 |
commit | 83527ac1b14a16ad2254b81ced7457fbaa791550 (patch) | |
tree | d009281c9edf9652361cd0baa67f5421cccafcbb /m4 | |
parent | cca5dbfe86a210115de38c08749f6c4c2f07d85e (diff) | |
download | gnulib-83527ac1b14a16ad2254b81ced7457fbaa791550.tar.gz |
New module 'wcpcpy'.
* modules/wcpcpy: New file.
* lib/wchar.in.h (wcpcpy): New declaration.
* lib/wcpcpy.c: New file.
* lib/wcpcpy-impl.h: New file, from libutf8 with modifications.
* m4/wcpcpy.m4: New file.
* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcpcpy is declared.
(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCPCPY, HAVE_WCPCPY.
* modules/wchar (Makefile.am): Substitute GNULIB_WCPCPY, HAVE_WCPCPY.
* tests/test-wchar-c++.cc: Test the declaration of wcpcpy.
* doc/posix-functions/wcpcpy.texi: Mention the new module.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/wchar_h.m4 | 4 | ||||
-rw-r--r-- | m4/wcpcpy.m4 | 15 |
2 files changed, 18 insertions, 1 deletions
diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4 index 55b3bf69b6..a304d50686 100644 --- a/m4/wchar_h.m4 +++ b/m4/wchar_h.m4 @@ -51,7 +51,7 @@ AC_DEFUN([gl_WCHAR_H], ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset - wcslen wcsnlen wcscpy + wcslen wcsnlen wcscpy wcpcpy ]) ]) @@ -154,6 +154,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], GNULIB_WCSLEN=0; AC_SUBST([GNULIB_WCSLEN]) GNULIB_WCSNLEN=0; AC_SUBST([GNULIB_WCSNLEN]) GNULIB_WCSCPY=0; AC_SUBST([GNULIB_WCSCPY]) + GNULIB_WCPCPY=0; AC_SUBST([GNULIB_WCPCPY]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) @@ -172,6 +173,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], HAVE_WCSLEN=1; AC_SUBST([HAVE_WCSLEN]) HAVE_WCSNLEN=1; AC_SUBST([HAVE_WCSNLEN]) HAVE_WCSCPY=1; AC_SUBST([HAVE_WCSCPY]) + HAVE_WCPCPY=1; AC_SUBST([HAVE_WCPCPY]) HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) diff --git a/m4/wcpcpy.m4 b/m4/wcpcpy.m4 new file mode 100644 index 0000000000..5ffe1a12e0 --- /dev/null +++ b/m4/wcpcpy.m4 @@ -0,0 +1,15 @@ +# wcpcpy.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_WCPCPY], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([wcpcpy]) + if test $ac_cv_func_wcpcpy = no; then + HAVE_WCPCPY=0 + AC_LIBOBJ([wcpcpy]) + fi +]) |