bin/62047: Fix for non-C LC_COLLATE

Mark Daniel Reidel ports at mark.reidel.info
Wed Jan 28 14:10:43 PST 2004


>Number:         62047
>Category:       bin
>Synopsis:       Fix for non-C LC_COLLATE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 28 14:10:19 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Mark Daniel Reidel
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD alu.reidel.info 5.2-CURRENT FreeBSD 5.2-CURRENT #8: Sat Dec 13 10:12:54 CET 2003 root at alu.reidel.info:/usr/obj/usr/src/sys/MARK i386
LANG=en_US.ISO8859-15
LC_CTYPE=de_DE.ISO8859-15
LC_COLLATE=de_DE.ISO8859-15
LC_TIME=de_DE.ISO8859-15
LC_NUMERIC=de_DE.ISO8859-15
LC_MONETARY=de_DE.ISO8859-15
LC_MESSAGES="en_US.ISO8859-15"
LC_ALL=en_US.ISO8859-15
>Description:
It's impossible to make a buildworld when using LC_COLLATE other than C, because of tr '[a-z]' '[A-Z]' not leading to capitalization of a string. The attached patch fixes this by using the POSIXly correct '[:lower:]' '[:upper:]' instead which will work on just any locale-setting.
>How-To-Repeat:
cd /usr/src; /usr/bin/env LC_COLLATE=de_DE.ISO8859-15 make buildworld
>Fix:
--- tr.patch begins here ---
--- /usr/src/lib/libedit/makelist	Wed Jan 28 18:08:20 2004
+++ /usr/src/lib/libedit/makelist	Wed Jan 28 18:08:45 2004
@@ -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");
--- /usr/src/sbin/route/Makefile	Wed Jan 28 21:51:35 2004
+++ /usr/src/sbin/route/Makefile	Wed Jan 28 21:51:59 2004
@@ -11,7 +11,7 @@
 
 keywords.h: keywords
 	sed -e '/^#/d' -e '/^$$/d' ${.CURDIR}/keywords > _keywords.tmp
-	LC_ALL=C tr 'a-z' 'A-Z' < _keywords.tmp | paste _keywords.tmp - | \
+	LC_ALL=C tr '[:lower:]' '[:upper:]' < _keywords.tmp | paste _keywords.tmp - | \
 	    awk '{ \
 		if (NF > 1) \
 			printf "#define\tK_%s\t%d\n\t{\"%s\", K_%s},\n", \
--- tr.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list