Re: [PATCH] [BUILTIN] Fix corruption of reads with byte 0x81

2011-03-10 Thread Herbert Xu
On Fri, Mar 11, 2011 at 01:04:25AM +0100, Jilles Tjoelker wrote: > > That is not how ifsbreakup() works. As I have written in FreeBSD sh > expand.c: Thanks for catching this. The following patch should fix it. > Apart from that, there is corruption with byte 0x88, CTLQUOTEMARK. I > think that c

Re: [PATCH] [BUILTIN] Fix corruption of reads with byte 0x81

2011-03-10 Thread Jilles Tjoelker
On Thu, Mar 10, 2011 at 09:01:45PM +0800, Herbert Xu wrote: > On Thu, Feb 24, 2011 at 11:43:44AM +, Alexey Gladkov wrote: > > Starting with commit 55c46b dash removes CTLESC bytes ('\x81') > > from read sequence. This leads to breakage of some UTF8 > > characters. Like in commit f8231a, this ch

Re: shift "fatal error"

2011-03-10 Thread Guido Berhoerster
* Dan Muresan [2011-03-10 19:41]: > Hi, is there some consensus on whether shift should cause a "fatal > error" as reported by Herbert against bash: > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=252378 > > # doesn't print anything > dash -c 'shift 2; echo hi' > > My copy of SUSv3 doesn't

shift "fatal error"

2011-03-10 Thread Dan Muresan
Hi, is there some consensus on whether shift should cause a "fatal error" as reported by Herbert against bash: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=252378 # doesn't print anything dash -c 'shift 2; echo hi' My copy of SUSv3 doesn't seem to imply any "fatal error" handling requirement

Re: [PATCH] Reset exit status before sourcing a file.

2011-03-10 Thread Herbert Xu
On Wed, Mar 02, 2011 at 08:42:34PM +, Jonathan Nieder wrote: > Tim Allen wrote: > > > The POSIX specification for the dot command[1] states: > > > > EXIT STATUS > > Returns the value of the last command executed, or a zero exit > > status if no command is executed. > > > >

Re: [PATCH] [BUILTIN] Fix corruption of reads with byte 0x81

2011-03-10 Thread Herbert Xu
On Thu, Feb 24, 2011 at 11:43:44AM +, Alexey Gladkov wrote: > Starting with commit 55c46b dash removes CTLESC bytes ('\x81') > from read sequence. This leads to breakage of some UTF8 > characters. Like in commit f8231a, this change fixes corruption > by removing the faulty code. Thanks for the

Re: [PATCH 3/3] Port to HP-UX

2011-03-10 Thread Herbert Xu
On Wed, Jan 19, 2011 at 05:16:02AM +, Brian Koropoff wrote: > > - HP-UX needs _LARGEFILE64_SOURCE to be defined for open64() >and friends to be available. This seems to be safe to >define everywhere, so do so. Shouldn't this go into configure.ac? In fact, how can your patch have any

Re: [PATCH 2/3] Port to AIX

2011-03-10 Thread Herbert Xu
On Wed, Jan 19, 2011 at 05:15:49AM +, Brian Koropoff wrote: > - AIX lacks a WCOREDUMP macro. It's just used to > append "(core dumped)" to the crash message, so > #ifdef around it. > > - For some reason, the nl program on AIX defaults > to not printing line numbers ("-b n"), even though

Re: [PATCH 1/3] Port to Solaris

2011-03-10 Thread Herbert Xu
On Fri, Jan 21, 2011 at 01:06:02PM +, Jilles Tjoelker wrote: > > What you can do is use PRIdMAX from , normally defined as > "jd". You can then define this to "lld" or "jd" if it is not defined. > I think this makes the code uglier (just like your change), but oh well. I agree. Brian, please

Re: [PATCH] [EXPAND] Do not split the result of tilde expansion

2011-03-10 Thread Herbert Xu
On Sun, Dec 05, 2010 at 05:31:59PM +, Jilles Tjoelker wrote: > A tilde expansion generates a valid pathname. Splitting it using IFS > either leaves it unchanged or changes it to something unintended. > > This fixes FreeBSD sh test expansion/tilde1.0 and does not change the > outcome of the oth

Re: [PATCH] [PARSER] Remove backslash before } in double-quotes in variable

2011-03-10 Thread Herbert Xu
On Sun, Nov 21, 2010 at 02:42:22PM +0100, Jilles Tjoelker wrote: > The backslash prevents the closing brace from terminating the > substitution, therefore it should be removed. > > FreeBSD sh test expansion/plus-minus2.0 starts working, no other tests > are affected. > > Example: > printf "%s\n

Re: [PATCH] [REDIR] Replace GPL noclobberopen code with the FreeBSD version.

2011-03-10 Thread Herbert Xu
On Sat, Nov 20, 2010 at 02:47:33PM +, Jilles Tjoelker wrote: > Replace noclobberopen() from bash with the FreeBSD code for noclobber > opens. > > This also reduces code size by eliminating an unnecessary check. Patch applied. Thanks a lot! -- Email: Herbert Xu Home Page: http://gondor.apan

Re: [PATCH] Improved LINENO support

2011-03-10 Thread Herbert Xu
On Sat, Nov 27, 2010 at 04:56:17PM +, Harald van Dijk wrote: > > Again, comments are welcome. Thanks for working on this! Just a few minor problems to correct. Oh and please add a changelog + sign-off. > diff --git a/src/eval.c b/src/eval.c > index b966749..d85f66f 100644 > --- a/src/eval.c >