Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: PATCH: fix for autoloading and compiling under Cygwin
- X-seq: zsh-workers 16362
- From: Borsenkow Andrej <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: JohnW@xxxxxxxx, zsh-workers@xxxxxxxxxx
- Subject: RE: PATCH: fix for autoloading and compiling under Cygwin
- Date: Tue, 18 Dec 2001 11:10:37 +0300
- Importance: Normal
- In-reply-to: <A148C710488FD411BC4000508BD922D859F304@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
>
> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author