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

Re: zsh 4.3.4 released



Peter Stephenson <pws@xxxxxxx> wrote:
> I think I've found the problem: parse.c doesn't get recompiled when
> version.h changes, so zcompile might output the wrong version, so the shell
> can't check properly when the ZWC file is loaded.

Errm... and, in fact, it doesn't even when it can.  And if it did, and
error checking was on, the error message would be wrong.  Presumably this
has always been broken.

Index: Src/parse.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/parse.c,v
retrieving revision 1.62
diff -u -r1.62 parse.c
--- Src/parse.c	23 Apr 2007 16:55:00 -0000	1.62
+++ Src/parse.c	23 Apr 2007 17:04:02 -0000
@@ -2617,9 +2617,10 @@
     }
     if (read(fd, buf, (FD_PRELEN + 1) * sizeof(wordcode)) !=
 	((FD_PRELEN + 1) * sizeof(wordcode)) ||
-	(v = (fdmagic(buf) != FD_MAGIC && fdmagic(buf) != FD_OMAGIC))) {
+	(v = (fdmagic(buf) != FD_MAGIC && fdmagic(buf) != FD_OMAGIC)) ||
+	strcmp(fdversion(buf), ZSH_VERSION)) {
 	if (err) {
-	    if (v) {
+	    if (!v) {
 		zwarnnam(nam, "zwc file has wrong version (zsh-%s): %s",
 			 fdversion(buf), name);
 	    } else

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

To get further information regarding CSR, please visit our Investor Relations page at http://ir.csr.com/csr/about/overview



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