From: Vincent Stemen <vince.lists@hightek.org>
To: zsh-workers@zsh.org
Subject: sh compatibility issue
Date: Thu, 17 Feb 2011 21:55:07 -0600 [thread overview]
Message-ID: <20110218035507.GA55814@quark.hightek.org> (raw)
Hi.
I have encountered a minor compatibility issue when using zsh in place
of /bin/sh on FreeBSD.
When attempting to compile the base system, it gets the error
/usr/src/gnu/usr.bin/binutils/ld/genscripts.sh:43: parse error near `)'
*** Error code 1
The error comes from this piece of code in genscripts.sh
# XXX: arm hack : until those file are merged back into the FSF repo,
# just
# use the version in this directory.
if !(test -f ${CUSTOMIZER_SCRIPT}"";) then
CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${EMULATION_NAME}.sh"
fi
What is happening is that zsh does not like the '!' being next to the
opening '(' without a space in the if condition. In my opinion, this is
kind of an unorthodox syntax. I'm not even sure if it is traditionally
legal sh or ksh syntax. Nevertheless, it works with BSD sh and bash.
A simple test is
if !(echo hello); then echo "XXXX"; fi
if ! (echo hello); then echo "XXXX"; fi
Zsh works fine in the second case, with a space after the '!'.
I also tested without the space under ksh on NetBSD and got a strange
result. It ran the mail utility. Weird.
My question is, is it possible and reasonable to modify zsh to work
without the space so that screwy GNU software such as this will compile?
Regards,
Vince
next reply other threads:[~2011-02-18 3:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 3:55 Vincent Stemen [this message]
2011-02-18 10:30 ` Peter Stephenson
2011-02-18 22:45 ` Vincent Stemen
2011-02-19 23:05 ` Jilles Tjoelker
2011-02-20 0:41 ` Vincent Stemen
2011-02-20 19:11 ` Peter Stephenson
2011-02-20 20:17 ` Peter Stephenson
2011-02-20 21:12 ` Vincent Stemen
[not found] ` <4D618A11.3050406@case.edu>
2011-02-22 20:02 ` Peter Stephenson
2011-02-23 1:08 ` Vincent Stemen
2011-02-23 1:51 ` Bart Schaefer
2011-02-23 2:30 ` Vincent Stemen
2011-02-23 9:25 ` Peter Stephenson
2011-03-04 13:36 ` Jilles Tjoelker
2011-03-06 20:26 ` 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=20110218035507.GA55814@quark.hightek.org \
--to=vince.lists@hightek.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).