Permission denied with makeinfo from texinfo-4.0

J. David Bryan
Tue Mar 14 21:30:00 GMT 2000

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 

 * 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-

                                      -- Dave Bryan

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list