zsh-workers
 help / color / mirror / code / Atom feed
From: "İsmail Dönmez" <ismail@namtrac.org>
To: zsh-workers <zsh-workers@zsh.org>
Subject: Fix for ksh emulation
Date: Mon, 28 Nov 2011 09:48:08 +0100	[thread overview]
Message-ID: <CAJR5sYhCjB9_+JM6S_N4UB+SbhTwq3SR=rqvUs-LC8F7Rxo7Dg@mail.gmail.com> (raw)
In-Reply-To: <CAJR5sYjgjHm9QFxevA111NnYMGbY14+zfyo8aYtakdjt+V_uFg@mail.gmail.com>


[-- 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;
 	    }

       reply	other threads:[~2011-11-28  8:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAJR5sYjgjHm9QFxevA111NnYMGbY14+zfyo8aYtakdjt+V_uFg@mail.gmail.com>
2011-11-28  8:48 ` İsmail Dönmez [this message]
2011-11-28  9:47   ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJR5sYhCjB9_+JM6S_N4UB+SbhTwq3SR=rqvUs-LC8F7Rxo7Dg@mail.gmail.com' \
    --to=ismail@namtrac.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).