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

Re: zsh 4.0.2 (powerpc-apple-darwin1.4)



Borsenkow Andrej wrote:
> > cc  -s  -o zsh main.o  `cat stamp-modobjs`   -lm  -lc
> > /usr/bin/ld: warning unused multiple definitions of symbol _glob
> > glob.o definition of _glob in section (__TEXT,__text)
> 
> On the second thought, it is conflict of glob() in Src/glob.c with
> system glob(). Such conflict is always bad (and I wonder, is it possible
> that mysterious globbing failures that were reported are related).
> 
> At first glance it is used just in two places:
> 
>   File    Function Line
> 0 exec.c  execcmd  1760 glob(args, firstnode(args), 0);
> 1 subst.c globlist  236 glob(list, node, nountok);
> 
> so what about just renaming it into zglob or like?

We've had to avoid a few library functions with generic names, and it's
certainly more future-proof.

I'll put this on both branches.

Is anyone keeping track of 4.0 patches or should I go through the log
myself?  (`Anyone' means Bart, obviously.)

Index: Src/exec.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/exec.c,v
retrieving revision 1.37
diff -u -r1.37 exec.c
--- Src/exec.c	2001/09/24 10:12:51	1.37
+++ Src/exec.c	2001/10/08 08:03:38
@@ -1757,7 +1757,7 @@
 	    if (!(cflags & BINF_NOGLOB))
 		while (!checked && !errflag && args && nonempty(args) &&
 		       has_token((char *) peekfirst(args)))
-		    glob(args, firstnode(args), 0);
+		    zglob(args, firstnode(args), 0);
 	    else if (!unglobbed) {
 		for (node = firstnode(args); node; incnode(node))
 		    untokenize((char *) getdata(node));
Index: Src/glob.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/glob.c,v
retrieving revision 1.21
diff -u -r1.21 glob.c
--- Src/glob.c	2001/07/09 16:05:14	1.21
+++ Src/glob.c	2001/10/08 08:03:38
@@ -920,7 +920,7 @@
 
 /**/
 void
-glob(LinkList list, LinkNode np, int nountok)
+zglob(LinkList list, LinkNode np, int nountok)
 {
     struct qual *qo, *qn, *ql;
     LinkNode node = prevnode(np);
Index: Src/subst.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/subst.c,v
retrieving revision 1.23
diff -u -r1.23 subst.c
--- Src/subst.c	2001/09/25 17:37:55	1.23
+++ Src/subst.c	2001/10/08 08:03:38
@@ -233,7 +233,7 @@
     badcshglob = 0;
     for (node = firstnode(list); !errflag && node; node = next) {
 	next = nextnode(node);
-	glob(list, node, nountok);
+	zglob(list, node, nountok);
     }
     if (badcshglob == 1)
 	zerr("no match", NULL, 0);

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



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