From patchwork Sun May 17 23:15:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fredrik Fornwall X-Patchwork-Id: 6425411 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-dash@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A28D99F1C1 for ; Sun, 17 May 2015 23:15:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A242620611 for ; Sun, 17 May 2015 23:15:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3DCCA20605 for ; Sun, 17 May 2015 23:15:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750787AbbEQXPx (ORCPT ); Sun, 17 May 2015 19:15:53 -0400 Received: from mail-la0-f45.google.com ([209.85.215.45]:36595 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750770AbbEQXPx (ORCPT ); Sun, 17 May 2015 19:15:53 -0400 Received: by lagv1 with SMTP id v1so194577232lag.3 for ; Sun, 17 May 2015 16:15:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=Rc3yWZUxubXS/f584TiKJJw8Q7S6W9kJnfwd9aZku/8=; b=cvHPq8FJkbT/s/VMrvvLWnLH7vCiKpUX4NE3AbAFzULlEj0QagG4ODi1E2WAdDFyT0 iKvqVkNDVBAVm7VRf0fod5pMmuJwPiJqvRn1i3Nn5S129RBCzTCyZctpPwqApfIfSgO+ ROXX+KQ/rdyd0iR9YOSywGhXmEiud8AYUwO653sD1PuaWxwlPhl1o8xZJrw1HoL1uxS8 HoCQdLFn4q/48A2tdFt7vYiWgRUTTH+mbYSmwMg2h/owjBgO/YwWCBkf2zUXsHrpp4hA NEDFTNm/Ido5u66M0uiGMNdp+3smBK1Qzy/7hlDGxy8lEKFc4IJlkJQSTIl+3fiFKur8 PWbA== X-Gm-Message-State: ALoCoQmiLlv+v/nqeKeafNdGF3zXbRswm8GWBHuEt5oXTPNdDg5C4GMp50U7GQLe8jaJ0xrf+Yiu MIME-Version: 1.0 X-Received: by 10.152.5.225 with SMTP id v1mr1564678lav.111.1431904551299; Sun, 17 May 2015 16:15:51 -0700 (PDT) Received: by 10.112.82.225 with HTTP; Sun, 17 May 2015 16:15:51 -0700 (PDT) Date: Mon, 18 May 2015 01:15:51 +0200 Message-ID: Subject: [PATCH] Set LC_ALL instead LC_COLLATE in mkbuiltins From: Fredrik Fornwall To: dash@vger.kernel.org Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In mkbuiltins LC_COLLATE is set, but since "The value of the LC_ALL environment variable has precedence over any of the other environment variables starting with LC_" (http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html), this has no effect when LC_ALL is set. This breaks when having e.g. LC_ALL=en_US.UTF-8 during make, which causes the test case dash -c : to fail, probably due to broken ordering in builtins.c. The patch corrects that by setting LC_ALL instead of LC_COLLATE. Fredrik $ diff -u -r ../dash-0.5.8/ . --- To unsubscribe from this list: send the line "unsubscribe dash" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -u -r ../dash-0.5.8/src/mkbuiltins ./src/mkbuiltins --- ../dash-0.5.8/src/mkbuiltins 2014-09-28 04:19:32.000000000 -0400 +++ ./src/mkbuiltins 2015-05-17 19:08:00.076452891 -0400 @@ -78,7 +78,7 @@ if ($i ~ /^-/) line = $(++i) "\t" line print line - }}' $temp | LC_COLLATE=C sort -k 1,1 | tee $temp2 | awk '{ + }}' $temp | LC_ALL=C sort -k 1,1 | tee $temp2 | awk '{ opt = "" if (NF > 2) { opt = substr($2, 2) @@ -97,7 +97,7 @@ */ ! -sed 's/ -[a-z]*//' $temp2 | nl -b a -v 0 | LC_COLLATE=C sort -u -k 3,3 | +sed 's/ -[a-z]*//' $temp2 | nl -b a -v 0 | LC_ALL=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)