From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21751 invoked from network); 9 Jun 2001 17:43:53 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Jun 2001 17:43:53 -0000 Received: (qmail 12678 invoked by alias); 9 Jun 2001 17:43:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14827 Received: (qmail 12664 invoked from network); 9 Jun 2001 17:43:31 -0000 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to lantern@shell10.ba.best.com using -f From: "Bart Schaefer" Message-Id: <1010609174254.ZM19101@candle.brasslantern.com> Date: Sat, 9 Jun 2001 17:42:54 +0000 In-Reply-To: <002001c0f0cb$b2a32ec0$21c9ca95@mow.siemens.ru> Comments: In reply to "Andrej Borsenkow" "Cygwin failure RE: PATCH: check deleted .zwc files" (Jun 9, 2:05pm) References: <002001c0f0cb$b2a32ec0$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: "Andrej Borsenkow" , Subject: Re: Cygwin failure RE: PATCH: check deleted .zwc files MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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