about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-11-14 23:54:05 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-11-14 23:54:05 +0000
commite7523b6044525d09284b8e6071db90ba44aca638 (patch)
treea8385e395942267ee392d4b9994634393915c73e /Src
parenteac7f72d04bb91bb3f3daf9c5a07ac77654c7638 (diff)
downloadzsh-e7523b6044525d09284b8e6071db90ba44aca638.tar.gz
zsh-e7523b6044525d09284b8e6071db90ba44aca638.tar.xz
zsh-e7523b6044525d09284b8e6071db90ba44aca638.zip
Merge of 23312: ensure parse.c is updated when version.h changes in order to
pick up changes to ZWC files; memset() header of wordcode file to normalise unused words.
Diffstat (limited to 'Src')
-rw-r--r--Src/parse.c4
-rw-r--r--Src/zsh.mdd2
2 files changed, 4 insertions, 2 deletions
diff --git a/Src/parse.c b/Src/parse.c
index f53c216d8..7fb5dc871 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -2536,7 +2536,7 @@ bin_zcompile(char *nam, char **args, Options ops, UNUSED(int func))
 static Wordcode
 load_dump_header(char *nam, char *name, int err)
 {
-    int fd, v = 0;
+    int fd, v = 1;
     wordcode buf[FD_PRELEN + 1];
 
     if ((fd = open(name, O_RDONLY)) < 0) {
@@ -2625,6 +2625,8 @@ write_dump(int dfd, LinkList progs, int map, int hlen, int tlen)
     if (map == 1)
 	map = (tlen >= FD_MINMAP);
 
+    memset(pre, 0, sizeof(wordcode) * FD_PRELEN);
+
     for (ohlen = hlen; ; hlen = ohlen) {
 	fdmagic(pre) = (other ? FD_OMAGIC : FD_MAGIC);
 	fdsetflags(pre, ((map ? FDF_MAP : 0) | other));
diff --git a/Src/zsh.mdd b/Src/zsh.mdd
index e4dae2a2d..337871382 100644
--- a/Src/zsh.mdd
+++ b/Src/zsh.mdd
@@ -31,7 +31,7 @@ sigcount.h: signames.c
 
 init.o: bltinmods.list zshpaths.h zshxmods.h
 
-init.o params.o: version.h
+init.o params.o parse.o: version.h
 
 version.h: $(sdir_top)/Config/version.mk
 	echo '#define ZSH_VERSION "'$(VERSION)'"' > $@