diff options
author | Bruno Haible <bruno@clisp.org> | 2011-02-06 14:19:57 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-02-07 23:36:07 +0100 |
commit | 09eadbc764eae5d1bf87c24b057664c8cfa6302b (patch) | |
tree | 376cd8c2c9cf45c4e4ff2b831f99f0f7809e552a /m4 | |
parent | 1692395a63b2795a9d5c8e048e776f2e342fe2bb (diff) | |
download | gnulib-09eadbc764eae5d1bf87c24b057664c8cfa6302b.tar.gz |
New module 'wcsspn'.
* modules/wcsspn: New file.
* lib/wchar.in.h (wcsspn): New declaration.
* lib/wcsspn.c: New file.
* lib/wcsspn-impl.h: New file, from libutf8 with modifications.
* m4/wcsspn.m4: New file.
* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcsspn is declared.
(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSSPN, HAVE_WCSSPN.
* modules/wchar (Makefile.am): Substitute GNULIB_WCSSPN, HAVE_WCSSPN.
* tests/test-wchar-c++.cc: Test the declaration of wcsspn.
* doc/posix-functions/wcsspn.texi: Mention the new module.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/wchar_h.m4 | 4 | ||||
-rw-r--r-- | m4/wcsspn.m4 | 15 |
2 files changed, 18 insertions, 1 deletions
diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4 index c86c9e920a..84be7259a2 100644 --- a/m4/wchar_h.m4 +++ b/m4/wchar_h.m4 @@ -53,7 +53,7 @@ AC_DEFUN([gl_WCHAR_H], wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr - wcscspn + wcscspn wcsspn ]) ]) @@ -171,6 +171,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], GNULIB_WCSCHR=0; AC_SUBST([GNULIB_WCSCHR]) GNULIB_WCSRCHR=0; AC_SUBST([GNULIB_WCSRCHR]) GNULIB_WCSCSPN=0; AC_SUBST([GNULIB_WCSCSPN]) + GNULIB_WCSSPN=0; AC_SUBST([GNULIB_WCSSPN]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) @@ -204,6 +205,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], HAVE_WCSCHR=1; AC_SUBST([HAVE_WCSCHR]) HAVE_WCSRCHR=1; AC_SUBST([HAVE_WCSRCHR]) HAVE_WCSCSPN=1; AC_SUBST([HAVE_WCSCSPN]) + HAVE_WCSSPN=1; AC_SUBST([HAVE_WCSSPN]) 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/wcsspn.m4 b/m4/wcsspn.m4 new file mode 100644 index 0000000000..1225adcf96 --- /dev/null +++ b/m4/wcsspn.m4 @@ -0,0 +1,15 @@ +# wcsspn.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_WCSSPN], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([wcsspn]) + if test $ac_cv_func_wcsspn = no; then + HAVE_WCSSPN=0 + AC_LIBOBJ([wcsspn]) + fi +]) |