Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
forward: fix for problem under cygwin
- X-seq: zsh-workers 16340
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: forward: fix for problem under cygwin
- Date: Sat, 15 Dec 2001 01:13:48 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
------- Forwarded Message
From: JohnW@xxxxxxxx
To: coordinator@xxxxxxx
Subject: fix for problem under cygwin
Date: Mon, 10 Dec 2001 13:52:31 -0600
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
I found a Unixism in zsh that prevents autoloading and function compilation
from working under cygwin. There are several bits of code that assume
character offsets are the same as byte offsets in files. I've fixed this by
either opening files in binary mode or relaxing the error checking. Here are
the lines I had to change:
exec.c:3473:
off_t len, textlen;
exec:c:3493:
if ((textlen = read(fd, d, len)) >= 0) {
exec.c:3497-8:
d[textlen] = '\0';
d = metafy(d, textlen, META_REALLOC);
parse.c:2408:
if ((fd = open(name, O_RDONLY | O_BINARY)) < 0) {
parse.c:2545:
int dfd, fd, hlen, tlen, flen, ona = noaliases, textlen;
parse.c:2580: (DELETED)
file[flen] = '\0';
parse.c:2581:
if ((textlen = read(fd, file, flen)) < 0) {
parse.c:2591:
file[textlen] = '\0';
file = metafy(file, textlen, META_REALLOC);
parse.c:3017:
if ((fd = open(file, O_RDONLY | O_BINARY)) < 0 ||
------- End of Forwarded Message
Messages sorted by:
Reverse Date,
Date,
Thread,
Author