Re: Allow dash to build with i18n version of Coreutils

2009-08-31 Thread Herbert Xu
On Mon, Aug 31, 2009 at 08:19:24AM -0600, Matthew Burgess wrote: > > su-4.0$ echo $LANG > en_GB.UTF-8 > > su-4.0$ sort -u -k 3,3 builtins > 0 . -s dotcmd > > su-4.0$ LC_ALL=C sort -u -k 3,3 builtins > 21 local -a localcmd > 14 export -as exportcmd > 3

Re: Allow dash to build with i18n version of Coreutils

2009-08-31 Thread Matthew Burgess
On Mon, 31 Aug 2009 20:27:28 +1000, Herbert Xu wrote: > Thank you. I've applied the patch but replaced LC_CTYPE with > LC_COLLATE. Hi Herbert, for some reason, 'sort' doesn't appear to be honouring LC_COLLATE; only LC_ALL & LC_CTYPE appears to get things working with this particular invocatio

Re: bugs in cd

2009-08-31 Thread Eric Blake
Herbert Xu gondor.apana.org.au> writes: > > In other words, if CDPATH is "/", then you should not append any > > additional characters, such that you end up checking for the > > existence of "/foo", not "//foo". > > Fair enough. However, I noticed that they haven't fixed up PATH > to do the sa

Re: bugs in cd

2009-08-31 Thread Herbert Xu
On Mon, Aug 31, 2009 at 06:23:27AM -0600, Eric Blake wrote: > > Which version of POSIX are you looking at? POSIX 2008 added quite a few > clarifications about the handling of // that were not listed in POSIX 2001. > > http://www.opengroup.org/onlinepubs/9699919799/utilities/cd.html > > "5. Start

Re: bugs in cd

2009-08-31 Thread Eric Blake
According to Herbert Xu on 8/31/2009 6:18 AM: > On Tue, Jul 14, 2009 at 09:39:03PM +, Eric Blake wrote: >> Furthermore, POSIX requires that if the element in CDPATH ends in slash, >> that >> no additional slashes are added while forming the candidate curpath. In >> light >> of the fact tha

Re: bugs in cd

2009-08-31 Thread Herbert Xu
On Tue, Jul 14, 2009 at 09:39:03PM +, Eric Blake wrote: > > Furthermore, POSIX requires that if the element in CDPATH ends in slash, that > no additional slashes are added while forming the candidate curpath. In > light > of the fact that //home need not be the same directory as /home (and

Re: bugs in cd

2009-08-31 Thread Herbert Xu
On Tue, Jul 14, 2009 at 09:39:03PM +, Eric Blake wrote: > For the cd command, POSIX 2008 requires that after all pathnames in CDPATH > have > been tested and failed in step 5, then step 6 interprets the directory > argument > relative to PWD. In other words, this demonstrates a bug: > > $

Re: bug with $? after .

2009-08-31 Thread Herbert Xu
On Thu, Jul 09, 2009 at 09:09:11PM +, Eric Blake wrote: > According to POSIX, the status of . shall be 0 if no command was executed > during > the sourced script. Therefore, this is a bug: > > $ dash -c 'false; . /dev/null; echo $?' > 1 > > and should be fixed to output 0. It's on my todo

Re: avoid compiler warning

2009-08-31 Thread Herbert Xu
On Mon, Aug 31, 2009 at 05:30:18AM -0600, Eric Blake wrote: > > Ping. Or do we want to go with an alternate patch of defining our own > version of ISDIGIT that handles the entire range of int and avoids > checking the current locale, since POSIX guarantees that isdigit can only > return true for

Re: avoid compiler warning

2009-08-31 Thread Eric Blake
According to Herbert Xu on 8/11/2009 3:56 PM: > On Tue, Aug 11, 2009 at 09:33:43AM -0700, H. Peter Anvin wrote: >> Herbert... the *type* is int, but the *value* has to be in the range >> [-1,UCHAR_MAX] or the behavior is undefined in both the C and POSIX >> standards. > > Good point. I'll apply t

Re: bug with $? after .

2009-08-31 Thread Eric Blake
According to Eric Blake on 7/9/2009 3:09 PM: > According to POSIX, the status of . shall be 0 if no command was executed > during > the sourced script. Therefore, this is a bug: > > $ dash -c 'false; . /dev/null; echo $?' > 1 > > and should be fixed to output 0. Ping. -- Don't work too hard,

Re: bugs in cd

2009-08-31 Thread Eric Blake
According to Eric Blake on 7/14/2009 3:39 PM: > For the cd command, POSIX 2008 requires that after all pathnames in CDPATH > have > been tested and failed in step 5, then step 6 interprets the directory > argument > relative to PWD. In other words, this demonstrates a bug: > > $ dash -c 'cd /

Re: Allow dash to build with i18n version of Coreutils

2009-08-31 Thread Herbert Xu
On Sat, Aug 15, 2009 at 06:07:16PM +, 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 erro

Re: Rergession in readcmd (commit 55c46b7)

2009-08-31 Thread Herbert Xu
Alexey Gladkov wrote: > Greeting! > > readcmd put trash in the variables. > > Test case: > > $ cat /tmp/conf > Include common.conf > FullSpeedCPU yes > > $ cat /tmp/z.sh > while read option params; do > printf '[%s] [%s]\n' "$option" "$params" > done < /tmp/conf > > Result: > > $ dash /tmp/