From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12028 invoked from network); 15 Dec 2001 01:12:14 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (?etVJPky+P4jbzAP0BGR+bq15X04kom91?@203.24.36.3) by ns1.primenet.com.au with SMTP; 15 Dec 2001 01:12:14 -0000 Received: (qmail 2738 invoked from network); 15 Dec 2001 01:12:13 -0000 Received: from sunsite.dk (130.225.247.90) by proxy.melb.primenet.com.au with SMTP; 15 Dec 2001 01:12:13 -0000 Received: (qmail 21907 invoked by alias); 15 Dec 2001 01:12:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16340 Received: (qmail 21896 invoked from network); 15 Dec 2001 01:12:07 -0000 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 From: Peter Stephenson Message-Id: <20011215011353.948E114280@pwstephenson.fsnet.co.uk> ------- 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