diff options
author | Bruno Haible <bruno@clisp.org> | 2011-02-06 13:52:11 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-02-07 23:36:06 +0100 |
commit | 214aca197fc1b600e119e0fbae8cf196b48c5276 (patch) | |
tree | b89f394980b45a25084475117936a52f17949c7d /m4 | |
parent | 5768aa52f6dd4fe3266bfa42f6a58f26b89c6c89 (diff) | |
download | gnulib-214aca197fc1b600e119e0fbae8cf196b48c5276.tar.gz |
New module 'wcschr'.
* modules/wcschr: New file.
* lib/wchar.in.h (wcschr): New declaration.
* lib/wcschr.c: New file.
* lib/wcschr-impl.h: New file, from libutf8 with modifications.
* m4/wcschr.m4: New file.
* m4/wchar_h.m4 (gl_WCHAR_H): Test whether wcschr is declared.
(gl_WCHAR_H_DEFAULTS): Initialize GNULIB_WCSCHR, HAVE_WCSCHR.
* modules/wchar (Makefile.am): Substitute GNULIB_WCSCHR, HAVE_WCSCHR.
* tests/test-wchar-c++.cc: Test the declaration of wcschr.
* doc/posix-functions/wcschr.texi: Mention the new module.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/wchar_h.m4 | 4 | ||||
-rw-r--r-- | m4/wcschr.m4 | 15 |
2 files changed, 18 insertions, 1 deletions
diff --git a/m4/wchar_h.m4 b/m4/wchar_h.m4 index ab6f553c52..bbc124a685 100644 --- a/m4/wchar_h.m4 +++ b/m4/wchar_h.m4 @@ -52,7 +52,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 wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp - wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup + wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr ]) ]) @@ -167,6 +167,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], GNULIB_WCSCOLL=0; AC_SUBST([GNULIB_WCSCOLL]) GNULIB_WCSXFRM=0; AC_SUBST([GNULIB_WCSXFRM]) GNULIB_WCSDUP=0; AC_SUBST([GNULIB_WCSDUP]) + GNULIB_WCSCHR=0; AC_SUBST([GNULIB_WCSCHR]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) @@ -197,6 +198,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], HAVE_WCSCOLL=1; AC_SUBST([HAVE_WCSCOLL]) HAVE_WCSXFRM=1; AC_SUBST([HAVE_WCSXFRM]) HAVE_WCSDUP=1; AC_SUBST([HAVE_WCSDUP]) + HAVE_WCSCHR=1; AC_SUBST([HAVE_WCSCHR]) 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/wcschr.m4 b/m4/wcschr.m4 new file mode 100644 index 0000000000..1813a06f45 --- /dev/null +++ b/m4/wcschr.m4 @@ -0,0 +1,15 @@ +# wcschr.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_WCSCHR], +[ + AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([wcschr]) + if test $ac_cv_func_wcschr = no; then + HAVE_WCSCHR=0 + AC_LIBOBJ([wcschr]) + fi +]) |