zsh-workers
 help / color / mirror / code / Atom feed
* Fix for ksh emulation
       [not found] <CAJR5sYjgjHm9QFxevA111NnYMGbY14+zfyo8aYtakdjt+V_uFg@mail.gmail.com>
@ 2011-11-28  8:48 ` İsmail Dönmez
  2011-11-28  9:47   ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: İsmail Dönmez @ 2011-11-28  8:48 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 249 bytes --]

Hi;

We (openSUSE) imported a patch from RHEL to fix ksh emulation problem
described in https://bugzilla.redhat.com/show_bug.cgi?id=488943 . I am
attaching the patch so hopefully this can go upstream instead of rotting in
our tree.

Regards,
ismail

[-- Attachment #1.2: Type: text/html, Size: 629 bytes --]

[-- Attachment #2: zsh-4.3.12-ksh-emulation-syntax-checking.patch --]
[-- Type: text/x-patch, Size: 553 bytes --]

diff -ruN zsh-4.3.12-orig/Src/subst.c zsh-4.3.12/Src/subst.c
--- zsh-4.3.12-orig/Src/subst.c	2011-05-23 18:48:19.000000000 +0200
+++ zsh-4.3.12/Src/subst.c	2011-06-29 13:44:13.000000000 +0200
@@ -245,7 +245,10 @@
 	    if (endchar == Outpar && str2[1] == '(' && str[-2] == ')') {
 		/* Math substitution of the form $((...)) */
 		str[-2] = '\0';
-		str = arithsubst(str2 + 2, &str3, str);
+		if (isset(EXECOPT))
+		    str = arithsubst(str2 + 2, &str3, str);
+		else
+		    strncpy(str3, str2, 1);
 		setdata(node, (void *) str3);
 		continue;
 	    }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fix for ksh emulation
  2011-11-28  8:48 ` Fix for ksh emulation İsmail Dönmez
@ 2011-11-28  9:47   ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2011-11-28  9:47 UTC (permalink / raw)
  To: zsh-workers

On Mon, 28 Nov 2011 09:48:08 +0100
İsmail Dönmez <ismail@namtrac.org> wrote:
> We (openSUSE) imported a patch from RHEL to fix ksh emulation problem
> described in https://bugzilla.redhat.com/show_bug.cgi?id=488943 . I am
> attaching the patch so hopefully this can go upstream instead of rotting in
> our tree.

Thanks, it's an actual bug.  I think there are probably a few remaining
problems where NO_EXEC isn't handled consistently.  I found a number a
few months ago but we don't have a systematic check for them.

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-28  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAJR5sYjgjHm9QFxevA111NnYMGbY14+zfyo8aYtakdjt+V_uFg@mail.gmail.com>
2011-11-28  8:48 ` Fix for ksh emulation İsmail Dönmez
2011-11-28  9:47   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).