diff options
author | Jim Meyering <meyering@redhat.com> | 2011-12-12 13:36:46 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-12-12 14:10:24 +0100 |
commit | 0ba89c07c583fb7bc24225f6dca66fd066169497 (patch) | |
tree | 164d7e014cc389e366318fb358b7afd581062169 | |
parent | ed071726be5758b1422d7972450a1867655268b4 (diff) | |
download | grep-0ba89c07c583fb7bc24225f6dca66fd066169497.tar.gz |
build: use gnulib's iswctype wcscoll
* bootstrap.conf (gnulib_modules): Add iswctype and wcscoll.
* configure.ac: Remove explicit checks for those functions.
* src/mbsupport.h (MBS_SUPPORT): Define to 1 if not already defined.
Remove the conditional, now that we're guaranteed by gnulib to have
wcscoll and iswctype.
Suggested by Alan Hourihane in http://savannah.gnu.org/bugs/?34930
-rw-r--r-- | bootstrap.conf | 2 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/mbsupport.h | 13 |
3 files changed, 4 insertions, 13 deletions
diff --git a/bootstrap.conf b/bootstrap.conf index c3b71586..64e4ea65 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -43,6 +43,7 @@ ignore-value intprops isblank isdir +iswctype largefile lseek locale @@ -79,6 +80,7 @@ useless-if-before-free version-etc-fsf wchar wcrtomb +wcscoll wctob wctype-h xalloc diff --git a/configure.ac b/configure.ac index 6c0f29d4..3eff422d 100644 --- a/configure.ac +++ b/configure.ac @@ -183,7 +183,7 @@ AC_HEADER_DIRENT dnl Checks for functions. AC_FUNC_CLOSEDIR_VOID -AC_CHECK_FUNCS_ONCE(isascii iswctype setlocale wcscoll) +AC_CHECK_FUNCS_ONCE(isascii setlocale) dnl I18N feature AM_GNU_GETTEXT_VERSION([0.18]) diff --git a/src/mbsupport.h b/src/mbsupport.h index 06729e17..4529134c 100644 --- a/src/mbsupport.h +++ b/src/mbsupport.h @@ -17,21 +17,10 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* This file is needed so that we test for i18n support in just one place. - This gives us a consistent definition for all uses of MBS_SUPPORT. This - follows the ``Don't Repeat Yourself'' principle from "The Pragmatic - Programmer". - - The tests should be *all* the ones that are needed for an individual - application. */ - #include <stdlib.h> -#if defined HAVE_WCSCOLL && defined HAVE_ISWCTYPE +#ifndef MBS_SUPPORT # define MBS_SUPPORT 1 -#else -# define MBS_SUPPORT 0 #endif #if ! MBS_SUPPORT |