From 371eaf153f33f9db15d4b00aa4d873e39afee4c1 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 21 Mar 2014 13:41:21 +0200 Subject: Fix dfa for systems without locales. --- ChangeLog | 5 +++++ dfa.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1e47e10b..310c7988 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-03-21 Arnold D. Robbins + + * dfa.c (using_simple_locale): Add ifdefs in case there is no + locale support at all. Thanks to Scott Deifik for the report. + 2014-03-17 Arnold D. Robbins * .gitignore: Add .dSYM directories for Mac OS X. diff --git a/dfa.c b/dfa.c index 8771bbee..813c239b 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; } -- cgit v1.2.1