Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: More Configure problems



I wrote:
> Next problem with Configure... actually with the makedepend script
> that comes with it:  this assignment is failing:
> 
>     defrule=`<$mf sed -n		\
> ...
> 
> That first interestingly positioned <$mf (sometimes I wonder if people
> do this deliberately) is supposed to be a redirection, but zsh is
> treating it like $(<...).  ksh behaves like sh here, i.e. only $(<...)
> has that behaviour.  Perhaps we should follow suit.

Well, there's only about one possible fix, as follows.  The manual
page mentions $(<...) and specifically fails to mention `<...`, so I
think we're in line with that after the patch.  No other Configure
problems that I've noticed.  (This is actually non-trivial, if you
want to install perl on Linux without having to have bash around.)

*** Src/exec.c.go	Thu Aug  1 19:14:53 1996
--- Src/exec.c	Thu Aug  1 19:19:00 1996
***************
*** 1986,1998 ****
  
  /**/
  LinkList
! getoutput(char *cmd, int qt)
  {
      List list;
      int pipes[2];
      pid_t pid;
  
!     if (*cmd == '<') {
  	int stream, l;
  	char *fi, *s;
  
--- 1986,1998 ----
  
  /**/
  LinkList
! getoutput(char *cmd, int qt, int stringpar)
  {
      List list;
      int pipes[2];
      pid_t pid;
  
!     if (*cmd == '<' && stringpar) {
  	int stream, l;
  	char *fi, *s;
  
*** Src/subst.c.go	Thu Aug  1 19:14:58 1996
--- Src/subst.c	Thu Aug  1 19:22:25 1996
***************
*** 92,105 ****
  LinkNode
  stringsubst(LinkList list, LinkNode node, int ssub)
  {
!     int qt;
      char *str3 = (char *)getdata(node);
      char *str  = str3;
  
      while (!errflag && *str) {
  	if ((qt = *str == Qstring) || *str == String)
  	    if (str[1] == Inpar) {
  		str++;
  		goto comsub;
  	    } else if (str[1] == Inbrack) {
  		/* $[...] */
--- 92,107 ----
  LinkNode
  stringsubst(LinkList list, LinkNode node, int ssub)
  {
!     int qt, stringpar;
      char *str3 = (char *)getdata(node);
      char *str  = str3;
  
      while (!errflag && *str) {
+ 	stringpar = 0;
  	if ((qt = *str == Qstring) || *str == String)
  	    if (str[1] == Inpar) {
  		str++;
+ 		stringpar = 1;
  		goto comsub;
  	    } else if (str[1] == Inbrack) {
  		/* $[...] */
***************
*** 161,167 ****
  		       (qt && str[1] == '"'))))
  		    *str = ztokens[*str - Pound];
  	    str++;
! 	    if (!(pl = getoutput(str2 + 1, qt || ssub))) {
  		zerr("parse error in command substitution", NULL, 0);
  		return NULL;
  	    }
--- 163,169 ----
  		       (qt && str[1] == '"'))))
  		    *str = ztokens[*str - Pound];
  	    str++;
! 	    if (!(pl = getoutput(str2 + 1, qt || ssub, stringpar))) {
  		zerr("parse error in command substitution", NULL, 0);
  		return NULL;
  	    }

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.



Messages sorted by: Reverse Date, Date, Thread, Author