From ue@nathan.ruhr.de  Sat Feb 28 07:50:11 2004
Return-Path: <ue@nathan.ruhr.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 18A1916A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Feb 2004 07:50:11 -0800 (PST)
Received: from mail.ruhr.de (in-ruhr4.ruhr.de [62.80.13.2])
	by mx1.FreeBSD.org (Postfix) with SMTP id C0B0E43D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Feb 2004 07:50:09 -0800 (PST)
	(envelope-from ue@nathan.ruhr.de)
Received: (qmail 6133 invoked by uid 10); 28 Feb 2004 15:50:07 -0000
Received: from nathan.internal (localhost.internal [127.0.0.1])
	by nathan.internal (8.12.11/8.12.11) with ESMTP id i1SFiB2P004457
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Feb 2004 16:44:11 +0100 (CET)
	(envelope-from ue@nathan.internal)
Received: (from ue@localhost)
	by nathan.internal (8.12.11/8.12.10/Submit) id i1SFiAE1004456;
	Sat, 28 Feb 2004 16:44:10 +0100 (CET)
	(envelope-from ue)
Message-Id: <200402281544.i1SFiAE1004456@nathan.internal>
Date: Sat, 28 Feb 2004 16:44:10 +0100 (CET)
From: Udo Erdelhoff <ue@nathan.ruhr.de>
Reply-To: Udo Erdelhoff <ue@nathan.ruhr.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] buildworld breaks with some locales due to tr change
X-Send-Pr-Version: 3.113
X-GNATS-Notify: ache

>Number:         63501
>Category:       misc
>Synopsis:       [patch] buildworld breaks with some locales due to tr change
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 28 07:50:13 PST 2004
>Closed-Date:    Tue Mar 09 06:59:57 PST 2004
>Last-Modified:  Tue Mar 09 06:59:57 PST 2004
>Originator:     Udo Erdelhoff
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD nathan.internal 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sat Feb 28 10:25:37 CET 2004 root@nathan.internal:/home/data/obj/home/data/src/sys/NATHAN i386

>Description:
The problem occurs during "make buildworld" if the user executing the
command has locales set in his environment.  The problem was noticed with
de_DE.ISO8859-1 and de_DE.ISO8859-15, but seems to occur with some other
locales, as well.

The symptom is that "make buildworld" breaks in src/lib/libedit due
to missing definitions.  This is caused by corruption of the contents
of the generated file fcns.h.  The root cause is a bad call of tr,
using a-z A-Z as parameters.  There is an attempted fix by setting
LC_ALL=C, but this does not help.

The thread "weird locale problems" on -current has more background
about the tr behaviour.

>How-To-Repeat:

Set your shell to the de_DE.ISO8859-15 locale
Go to src/lib/libedit
make a backup copy of fcns.h
make clean fcns.h
compare new and old file

>Fix:


cvs diff -u makelist
Index: makelist
===================================================================
RCS file: /home/ncvs/src/lib/libedit/makelist,v
retrieving revision 1.8
diff -u -r1.8 makelist
--- makelist    4 Aug 2003 21:31:51 -0000       1.8
+++ makelist    28 Feb 2004 15:32:46 -0000
@@ -146,7 +146,7 @@
 #
 -fh)
     cat $FILES | $AWK '/el_action_t/ { print $3 }' | \
-    sort | LC_ALL=C tr 'a-z' 'A-Z' | $AWK '
+    sort | LC_ALL=C tr '[:lower:]' '[:upper:]' | $AWK '
        BEGIN {
            printf("/* Automatically generated file, do not edit */\n");
            printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n");

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Tue Mar 9 06:57:56 PST 2004 
State-Changed-Why:  
Was a bug in setlocale(3); fixed recently. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63501 
>Unformatted:
