From: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: forward: fix for problem under cygwin
Date: Sat, 15 Dec 2001 01:13:48 +0000 [thread overview]
Message-ID: <20011215011353.948E114280@pwstephenson.fsnet.co.uk> (raw)
------- Forwarded Message
From: JohnW@bops.com
To: coordinator@zsh.org
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
next reply other threads:[~2001-12-15 1:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-15 1:13 Peter Stephenson [this message]
2001-12-17 14:43 ` Borsenkow Andrej
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011215011353.948E114280@pwstephenson.fsnet.co.uk \
--to=pws@pwstephenson.fsnet.co.uk \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).