Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <200003150530.AAA24404@mail.bcpl.net> From: "J. David Bryan" Organization: Palomar Corporation To: cygwin AT sourceware DOT cygnus DOT com Date: Wed, 15 Mar 2000 00:30:41 -0500 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Permission denied with makeinfo from texinfo-4.0 In-reply-to: <20000315000856.C3982@cygnus.com> References: <200003150435 DOT XAA12288 AT mail DOT bcpl DOT net>; from dbryan AT bcpl DOT net on Tue, Mar 14, 2000 at 11:35:37PM -0500 X-mailer: Pegasus Mail for Win32 (v3.12c) On 15 Mar 2000, at 0:08, Chris Faylor wrote: > Defining -DWIN32 is not usually a good idea. It usually causes packages > to use windows specific code and workarounds which are not necessary for > cygwin. Generally sound advice. However, in this case, -DWIN32 changes the behavior of only file (files.c) of the makeinfo source. It does two things: * It works around the bug mentioned, albeit by reading the source file a character at a time instead of all in one go. * It does not use $HOME as a search path for texinfo files. The intent of my workaround was to avoid the buffer problem in makeinfo without changing the source. The proper solution, of course, is to fix the error causing the invalid buffer to be passed to "read". > Is it possible to provide a little more pinpoint control to get the > files opened with O_BINARY? > > Usually I do something like this: > > #ifndef O_BINARY > #define O_BINARY 0 > #endif > > . > . > . > open("foo", O_CREATE|O_TRUNC|O_BINARY); To avoid the problem, O_BINARY must be undefined, not simply zero. Undefining it will avoid the invalid buffer (by compiling different code) at the cost of losing the ability to process texinfo files containing Windows line ends. For anyone interested, the problem lines are in makeinfo/files.c, lines 167- 185. -- Dave Bryan -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com