[Ecls-list] Troubles with cygwin

Anton Vodonosov avodonosov at yandex.ru
Wed Dec 26 01:28:24 UTC 2007

"Juan Jose Garcia-Ripoll" <jjgarcia at users.sourceforge.net> writes:
> Hi,
> I am really having troubles with this port. So much that I am
> seriously thinking about declaring it broken and moving on.
> The issue is the following one. I have this piece of code
> (si::system "rm -f foo")
> (LET ((S (OPEN "foo" :direction :IO :if-does-not-exist :create)))
>   (write-char #\h s)
>   (force-output s)
>   (close s))
> (si::system "cat foo; echo")
> It is intented to create a file with a single character. Well, it
> simply does not work. It does create a file, but the character is
> lost. Using TERPRI before CLOSE solves the problem. It also does it if
> I replace :IO with :OUTPUT. So it seems the problems are related to
> the flags "w+b" which I use to open the files.
> I have been reading the POSIX manual page for fopen. It states that
> when changing from reads to writes and viceversa one has to use flush
> and fseek in between. I have even modified the code in ECL to do that!
> Does anybody have the same problem? Could you please test it with your
> own version of Cygwin? Does this only happen in my computer?
I've just reproduced the same behaviour. I'm using ECL 0.9i.
Note, if you replace (write-char #\h s) by (write-sequence "h" s), it works.

> Or if, nobody cares about this port, can I forget about it? :-)

As for me, if you have something with higher priority, this may be a "known issue".

Best regards,

More information about the ecl-devel mailing list