bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #34930] grep 2.10 fails to build (no wide char support OS)


From: Jim Meyering
Subject: Re: [bug #34930] grep 2.10 fails to build (no wide char support OS)
Date: Mon, 12 Dec 2011 13:45:18 +0100

Alan Hourihane wrote:
> Follow-up Comment #1, bug #34930 (project grep):
>
> Seems that grep now needs to include the gnulib modules "iswctype" and
> "wcscoll".
>
>   <http://savannah.gnu.org/bugs/?34930>

Thanks for the report.
This change should fix it for you.

>From a641dbde9cff40d5930c365defd32ce8c878ea5d Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 12 Dec 2011 13:36:46 +0100
Subject: [PATCH] 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
---
 bootstrap.conf  |    2 ++
 configure.ac    |    2 +-
 src/mbsupport.h |   13 +------------
 3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index c3b7158..64e4ea6 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 6c0f29d..3eff422 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 06729e1..4529134 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
--
1.7.8.163.g9859a



reply via email to

[Prev in Thread] Current Thread [Next in Thread]