From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5209 invoked from network); 18 Dec 2001 08:11:06 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 18 Dec 2001 08:11:06 -0000 Received: (qmail 22808 invoked by alias); 18 Dec 2001 08:10:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16362 Received: (qmail 22795 invoked from network); 18 Dec 2001 08:10:57 -0000 From: Borsenkow Andrej To: JohnW@bops.com, zsh-workers@sunsite.dk Subject: RE: PATCH: fix for autoloading and compiling under Cygwin Date: Tue, 18 Dec 2001 11:10:37 +0300 Message-ID: <000e01c1879b$7a145cc0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 x-mimeole: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: Importance: Normal > > I was actually overlooking writing of zwc files in my first fix. Here's a > new patch that really fixes the problem, with a test case, too. I've done > two things here: > > * I added the O_BINARY flag to all calls to 'open' on zwc files. That is needed in any case and is not harmful at all. Any system that does not support this flag? Should probably add #ifndef O_BINARY #define O_BINARY 0 #endif somewhere in ... zsh.h? > * For text files, I changed the code to treat the result of 'seek' as an > upper bound on the length of the file. For the actual length, the return > value of 'read' is used. Checks that 'seek' and 'read' return the same thing > have been changed to check that 'seek' and 'read' both return nonnegative > values. > I have mixed feelings about it. It needed to be under #ifdef __CYGWIN__ in the first place. It also defeats error checking completely. Have you looked how bash on Cygwin does it? -andrej