bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bugs found on bison/m4 on windows


From: Paul Eggert
Subject: Re: bugs found on bison/m4 on windows
Date: Wed, 30 Jun 2004 15:27:36 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Kees Dekker <address@hidden> writes:

> 1. m4 is not able to open a file from a directory with spaces if
> BISON_PKGDATADIR dir contains spaces. I guess this could be easily fixed by
> escaping the arguments when m4 is called from bison in output.c, function
> output().

This sounds like a bug in the Microsoft Windows port, not in Bison
itself.  Bison simply passes the strings to execvp, and if they
contain spaces execvp should do the correct thing with them.  My guess
is that your execve is busted, or your modified version of Bison
didn't use execve, or something like that.  Please contact the people
who did your Microsoft Windows port and notify them of the problem.

> 1. open files in m4 in text mode instead of binary mode

Yes, that sounds like the correct fix to the second problem.  I
suspect the problem is that Bison is creating these streams with the
"pipe" system call, and that on Microsoft Windows "pipe" initially
puts file descriptors in binary mode, but when Bison uses fdopen (fd,
"r") and reads the files in (stdio) text mode, the resulting behavior
is undefined.  Does this diagnosis appear correct to you?  If so, I'll
modify Bison to change the pipe file-descriptors to use text mode,
before invoking fdopen.

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]