Hi all,

Here's a small oneliner patch to fix xserver's build using locales that
have latin-based alphabets but have different uppercasing/lowercasing
rules as Western languages, such as Turkish [1].

Basically, this patch forces LC_ALL=C when running awk to generate
hw/xfree86/common/xf86DefModeSet.c to force English lowercasing rules.

This patch is currently applied in Gentoo on top of 1.5.2.

Thanks

[1] http://en.wikipedia.org/wiki/Dotted_and_dotless_I#In_computing

-- 
Rémi Cardona
LRI, INRIA
[EMAIL PROTECTED]
[EMAIL PROTECTED]
>From 8918c50440de301887af8006f2dc72d64adf9f9c Mon Sep 17 00:00:00 2001
From: Remi Cardona <[EMAIL PROTECTED]>
Date: Sat, 18 Oct 2008 12:23:51 +0200
Subject: [PATCH] force LC_ALL=C when running awk
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

This bug was reported by a user trying to build the server with a
Turkish locale (tr_TR). The problem is that the Turkish alphabet is
latin-based, but not entirely similar. The bug comes from vesamodes
which has "Interlaced", which is then converted to lowercase by
modelines2c.awk. Execept that with a Turkish locale
tolower("Interlaced") is not "interlaced" but "ınterlaced", which the
rest of the script fails to understand.

This patch forces LC_ALL=C when running the awk script to always get the
intended latin en_US alphabet.
---
 hw/xfree86/common/Makefile.am |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index 0f44075..723973a 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -24,7 +24,7 @@ BUSSOURCES = xf86isaBus.c xf86pciBus.c xf86fbBus.c 
xf86noBus.c $(SBUS_SOURCES)
 MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes
 
 xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES)
-       cat $(MODEDEFSOURCES) | $(AWK) -f $(srcdir)/modeline2c.awk > $@
+       cat $(MODEDEFSOURCES) | LC_ALL=C $(AWK) -f $(srcdir)/modeline2c.awk > $@
 
 BUILT_SOURCES = xf86DefModeSet.c
 
-- 
1.6.0.2

_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to