aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Burgess <matthew@linuxfromscratch.org>2009-08-31 20:26:42 +1000
committermaximilian attems <max@stro.at>2010-03-22 00:29:17 +0100
commite6678205ee0b31a17018b18818442838cb6bd19a (patch)
tree73ae8d3e11a69fd3c6b0f27027bf9fa9bdc43f16
parent9c1cc1118aa69a70b3e14d3c1da4a9d72926f242 (diff)
downloadklibc-e6678205ee0b31a17018b18818442838cb6bd19a.tar.gz
[klibc] [BUILTIN] Add another missing LC_COLLATE to mkbuiltins
On Sat, Aug 15, 2009 at 06:07:16PM +0000, Matthew Burgess wrote: > > My system has Coreutils-7.4 compiled with the i18n patch from > http://cvs.fedoraproject.org/viewvc/devel/coreutils/coreutils-i18n.patch. > > Using this to compile dash, when in an en_GB.UTF-8 locale, I get the following error: > > if gcc -DHAVE_CONFIG_H -I. -I. -I.. -include ../config.h -DBSD=1 -DSHELL -DIFS_BROKEN -Wall -g -O2 -MT eval.o -MD -MP -MF ".deps/eval.Tpo" -c -o eval.o eval.c; \ > then mv -f ".deps/eval.Tpo" ".deps/eval.Po"; else rm -f ".deps/eval.Tpo"; exit 1; fi > eval.c: In function ‘evalcommand’: > eval.c:810: error: ‘EXECCMD’ undeclared (first use in this function) > eval.c:810: error: (Each undeclared identifier is reported only once > eval.c:810: error: for each function it appears in.) > eval.c:812: error: ‘COMMANDCMD’ undeclared (first use in this function) > make[3]: *** [eval.o] Error 1 > > This is because the src/mkbuiltins script ends up generating an incomplete > src/builtins.h file. This, in turn, is caused by 'sort -u -k 3,3' not > working correctly. > > The attached patch fixes/works around things by setting LC_CTYPE=C, thus > overriding the build environment (in a similar manner to the earlier call to > 'sort' in that same script). I've changed it to use LC_COLLATE. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r--usr/dash/mkbuiltins2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/dash/mkbuiltins b/usr/dash/mkbuiltins
index 6f9b0f3bc0003..e38ce4c89b87a 100644
--- a/usr/dash/mkbuiltins
+++ b/usr/dash/mkbuiltins
@@ -84,7 +84,7 @@ cat <<\!
*/
!
-sed 's/ -[a-z]*//' $temp2 | nl -v 0 | sort -u -k 3,3 |
+sed 's/ -[a-z]*//' $temp2 | nl -v 0 | LC_COLLATE=C sort -u -k 3,3 |
tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
awk '{ printf "#define %s (builtincmd + %d)\n", $3, $1}'
printf '\n#define NUMBUILTINS %d\n' $(wc -l < $temp2)