Subject: Re: Permission denied with makeinfo from texinfo-4.0
From: "J. David Bryan" <[email-masked]>
To: [email-masked]
Date: Wed, 15 Mar 2000 01:13:03 -0500

On 15 Mar 2000, at 0:58, Chris Faylor wrote:

> Ok.  I've got it.  Sorry.  I obviously lost the thread pretty badly.
> 
> (slinks away)

Must be a late night!  ;-)

To clarify for just a bit on the line ends part, on systems without 
O_BINARY defined, makeinfo will read the texinfo file in one go with a 
single "read" call.  It will then compare the read file size to the size 
returned by "stat".  If they don't match, then makeinfo terminates with an 
error.

Makeinfo actually compiles one of three different read calls, depending on 
a bunch of system defines.  The WIN32-specific version reads one byte at a 
time and so doesn't wind up specifying an invalid buffer.  The generic 
O_BINARY version (into which Cygwin falls) reads all in one go but is aware 
that it might get less bytes than the size of the file would indicate (due 
to \r\n -> \n translations).  However, this call specifies the invalid 
buffer.  The generic non-O_BINARY version also reads all in one go and 
doesn't specify an invalid buffer but demands that the number of bytes read 
equals the file size.

As I noted, the proper solution is to fix the invalid buffer call, but one 
can work around the problem either by defining WIN32 and accepting the 
tradeoffs (slow reads, no $HOME support) or by undefining O_BINARY and 
accepting the tradeoff (no \r\n support).

                                      -- Dave Bryan

--
Want to unsubscribe from this list?
Send a message to [email-masked]