[Ecls-list] Troubles with cygwin
Juan Jose Garcia-Ripoll
jjgarcia at users.sourceforge.net
Wed Dec 26 09:40:01 UTC 2007
On Dec 26, 2007 2:28 AM, Anton Vodonosov <avodonosov at yandex.ru> wrote:
> "Juan Jose Garcia-Ripoll" <jjgarcia at users.sourceforge.net> writes:
> > 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 [...]
> >
> 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.
Indeed, taken to an extreme, I have built two ECLs: one that uses
if (fputc(c, fp) == EOF)
io_error(strm);
and another one where I use for write-char
if (fwrite(&c, 1, 1, fp) < 1)
io_error(strm);
Only the second one works as expected. I think I will fill a bug
report for cygwin and move on with the release -- ECL is working fine
on any other platform, it is just this anoying behavior with cygwin
which is left.
Juanjo
--
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com
More information about the ecl-devel
mailing list