bug-gettext
[Top][All Lists]
Advanced

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

[bug-gettext] Fix for get_lcid (localename.c) required on Windows


From: Michele Locati
Subject: [bug-gettext] Fix for get_lcid (localename.c) required on Windows
Date: Tue, 30 Apr 2019 16:58:17 +0200

I managed to compile the gettext tools for Windows, but the
executables failed to run.

By inspecting this issue, I found that this patch fixes it:

--- a/gettext-runtime/intl/localename.c
+++ b/gettext-runtime/intl/localename.c
@@ -2604,6 +2604,10 @@ get_lcid (const char *locale_name)
   static LCID last_lcid;
   static char last_locale[1000];

+  if (locale_name == NULL)
+    {
+      return 0;
+    }
   /* Lock while looking for an LCID, to protect access to static
      variables: last_lcid, last_locale, found_lcid, and lname.  */
   gl_lock_lock (get_lcid_lock);

I'm not sure that this bug-gettext mailing list is the correct one to
send this patch to, but I bet there's some GNU guru that's able to
handle it ;)
--
Michele



reply via email to

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