emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#17056: closed (dfa.c patch for systems with no loc


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#17056: closed (dfa.c patch for systems with no locale support)
Date: Sun, 23 Mar 2014 21:17:02 +0000

Your message dated Sun, 23 Mar 2014 14:16:47 -0700
with message-id <address@hidden>
and subject line Re: bug#17056: dfa.c patch for systems with no locale support
has caused the debbugs.gnu.org bug report #17056,
regarding dfa.c patch for systems with no locale support
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
17056: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17056
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: dfa.c patch for systems with no locale support Date: Fri, 21 Mar 2014 13:40:17 +0200 User-agent: Heirloom mailx 12.5 6/20/10
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;
     }



--- End Message ---
--- Begin Message --- Subject: Re: bug#17056: dfa.c patch for systems with no locale support Date: Sun, 23 Mar 2014 14:16:47 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
Aharon Robbins wrote:

See the original report below

I downloaded the DJGPP sources. LC_ALL is defined unless one compiles as a freestanding environment, in which case neither LC_ALL nor setlocale are declared. So my guess is that your correspondent is using a freestanding environment somehow, and the patch that I suggested should work. It's better to avoid #ifdefs inside functions so I installed this into the grep master (see attached) and am marking this as done; we can always resurrect it if my guess is wrong.

Attachment: 0001-dfa-port-to-freestanding-DJGPP-Bug-17056.patch
Description: Text document


--- End Message ---

reply via email to

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