zsh-users
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: Martijn Dekker <martijn@inlv.org>
Cc: zsh-users@zsh.org
Subject: Re: Zsh requires Bash? 2002 revisited
Date: Sun, 7 Jan 2018 08:48:34 +0000	[thread overview]
Message-ID: <20180107084834.GB17598@chaz.gmail.com> (raw)
In-Reply-To: <4e96813d-3762-da35-f681-2546c0265982__30442.5932620235$1515274776$gmane$org@inlv.org>

2018-01-06 22:21:36 +0100, Martijn Dekker:
[...]
> However, posh is non-compliant, bug-ridden, unmaintained, generally
> broken, and should not be used. Your problem would be solved by deleting
> posh and using dash for /bin/sh instead.
[...]

One of those bugs at least causes the wrong options for yodl to
be used and "-s" (strip) to be used.

$ posh -c 'case abc in *"b"*) echo yes; esac'
$ posh -c 'case abc in *b*) echo yes; esac'
yes

The patch below works around those, but it still doesn't build
with posh. I'd tend to agree it's probably not worth the effort
working around those if posh is no longer maintained.

diff --git a/configure.ac b/configure.ac
index 1a498f8..e73c4d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -515,21 +515,21 @@ sed=':1
      s/ *$//'
 
 case " $LDFLAGS " in
-  *" -s "*) strip_exeldflags=true strip_libldflags=true
+  *\ -s\ *) strip_exeldflags=true strip_libldflags=true
     LDFLAGS=`echo " $LDFLAGS " | sed "$sed"` ;;
   *) strip_exeldflags=false strip_libldflags=false ;;
 esac
 
 case " ${EXELDFLAGS+$EXELDFLAGS }" in
   " ") ;;
-  *" -s "*) strip_exeldflags=true
+  *\ -s\ *) strip_exeldflags=true
     EXELDFLAGS=`echo " $EXELDFLAGS " | sed "$sed"` ;;
   *) strip_exeldflags=false ;;
 esac
 
 case " ${LIBLDFLAGS+$LIBLDFLAGS }" in
   " ") ;;
-  *" -s "*) strip_libldflags=true
+  *\ -s\ *) strip_libldflags=true
     LIBLDFLAGS=`echo " $LIBLDFLAGS " | sed "$sed"` ;;
   *) strip_libldflags=false ;;
 esac
@@ -626,9 +626,9 @@ AC_CHECK_PROGS([YODL], [yodl], [: yodl])
 YODL_OPTIONS=''
 if test "x$ac_cv_prog_YODL" = xyodl; then
     case `yodl --version` in
-      *"version 2."*) YODL_OPTIONS='-k' ;;
-      *"version 3."*) YODL_OPTIONS='-k -L' ;;
-      *"version 4."*) YODL_OPTIONS='-k -L' ;;
+      *version\ 2.*) YODL_OPTIONS='-k' ;;
+      *version\ 3.*) YODL_OPTIONS='-k -L' ;;
+      *version\ 4.*) YODL_OPTIONS='-k -L' ;;
     esac
 fi
 AC_SUBST(YODL_OPTIONS)
@@ -3223,7 +3223,7 @@ dnl $result is the default output for config.modules.  We generate
 dnl code to check if we should use this.
 cat <<EOM >> ${CONFIG_MODULES}.sh
 case "\$userlist" in
-  *" $name "*) grep "^name=$name " \${CONFIG_MODULES}.old;;
+  *\ $name\ *) grep "^name=$name " \${CONFIG_MODULES}.old;;
   *) echo "$result";;
 esac
 EOM


  parent reply	other threads:[~2018-01-07  8:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-06 13:47 Jim
2018-01-06 17:23 ` Bart Schaefer
2018-01-06 20:36   ` Jim
2018-01-06 20:57     ` Bart Schaefer
2018-01-07 20:41       ` Jim
2018-01-06 21:21     ` Martijn Dekker
     [not found]     ` <4e96813d-3762-da35-f681-2546c0265982__30442.5932620235$1515274776$gmane$org@inlv.org>
2018-01-07  8:10       ` Stephane Chazelas
2018-01-07 20:40         ` Bart Schaefer
2018-01-07  8:48       ` Stephane Chazelas [this message]
2018-01-07 15:14         ` Stephane Chazelas

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=20180107084834.GB17598@chaz.gmail.com \
    --to=stephane.chazelas@gmail.com \
    --cc=martijn@inlv.org \
    --cc=zsh-users@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).