Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Cygwin failure RE: PATCH: check deleted .zwc files
- X-seq: zsh-workers 14827
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>, <zsh-workers@xxxxxxxxxx>
- Subject: Re: Cygwin failure RE: PATCH: check deleted .zwc files
- Date: Sat, 9 Jun 2001 17:42:54 +0000
- In-reply-to: <002001c0f0cb$b2a32ec0$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <002001c0f0cb$b2a32ec0$21c9ca95@xxxxxxxxxxxxxx>
On Jun 9, 2:05pm, Andrej Borsenkow wrote:
} Subject: Cygwin failure RE: PATCH: check deleted .zwc files
}
} gcc -c -I. -DHAVE_CONFIG_H -Wall -Wno-implicit -Wmissing-prototypes -ggdb
} -o parse.o /tools/src/zsh/Src/parse.c
} /tools/src/zsh/Src/parse.c: In function `try_dump_file':
} /tools/src/zsh/Src/parse.c:2858: `dumps' undeclared (first use in this
} function)
}
} dumps is defined under USE_MMAP that is not defined on Cygwin (we do not
} support memory mapping here).
There's no mention of FuncDump objects anywhere outside parse.c, and no
reason that I can tell for putting zwcstat() into utils.c, and therefore
also no reason to export it.
Index: Src/parse.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Src/parse.c,v
retrieving revision 1.3
diff -u -r1.3 parse.c
--- parse.c 2001/06/09 17:29:35 1.3
+++ parse.c 2001/06/09 17:38:14
@@ -2775,6 +2775,24 @@
static FuncDump dumps;
+/**/
+static int
+zwcstat(char *filename, struct stat *buf, FuncDump dumps)
+{
+ FuncDump f;
+
+ if (stat(filename, buf)) {
+#ifdef HAVE_FSTAT
+ for (f = dumps; f; f = f->next) {
+ if (!strncmp(filename, f->filename, strlen(f->filename)) &&
+ !fstat(f->fd, buf))
+ return 0;
+ }
+#endif
+ return 1;
+ } else return 0;
+}
+
/* Load a dump file (i.e. map it). */
static void
@@ -2829,6 +2847,10 @@
d->count = 0;
d->filename = ztrdup(dump);
}
+
+#else
+
+#define zwcstat(f, b, d) stat(f, b)
#endif
Index: Src/utils.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Src/utils.c,v
retrieving revision 1.5
diff -u -r1.5 utils.c
--- utils.c 2001/06/09 17:29:35 1.5
+++ utils.c 2001/06/09 17:33:41
@@ -3830,22 +3830,3 @@
return 0;
}
#endif
-
-/**/
-mod_export int
-zwcstat(char *filename, struct stat *buf, FuncDump dumps)
-{
- FuncDump f;
-
- if (stat(filename, buf)) {
-#ifdef HAVE_FSTAT
- for (f = dumps; f; f = f->next) {
- if (!strncmp(filename, f->filename, strlen(f->filename)) &&
- !fstat(f->fd, buf))
- return 0;
- }
-#endif
- return 1;
- } else return 0;
-
-}
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author