GNU bug report logs - #17056
dfa.c patch for systems with no locale support

Previous Next

Package: grep;

Reported by: Aharon Robbins <arnold <at> skeeve.com>

Date: Fri, 21 Mar 2014 11:42:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Aharon Robbins <arnold <at> skeeve.com>
To: 17056 <at> debbugs.gnu.org
Subject: bug#17056: dfa.c patch for systems with no locale support
Date: Fri, 21 Mar 2014 13:40:17 +0200
Hi.

This turned up in testing on DJGPP.  Thanks,

Arnold
--------------------------
diff --git a/dfa.c b/dfa.c
index 8771bbe..813c239 100644
--- a/dfa.c
+++ b/dfa.c
@@ -820,9 +820,13 @@ using_simple_locale (void)
       static int unibyte_c = -1;
       if (unibyte_c < 0)
         {
+#ifdef LC_ALL
           char *locale = setlocale (LC_ALL, NULL);
           unibyte_c = (locale && (STREQ (locale, "C")
                                   || STREQ (locale, "POSIX")));
+#else
+          unibyte_c = 1;
+#endif
         }
       return unibyte_c;
     }




This bug report was last modified 11 years and 113 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.