bug-guile
[Top][All Lists]
Advanced

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

Re: Binary file mode not supported


From: Gary Houston
Subject: Re: Binary file mode not supported
Date: 12 Nov 2000 11:08:22 -0000

> From: George Caswell <address@hidden>
> Date: Wed, 8 Nov 2000 13:02:00 -0500
> 
>    OK, yeah, CR/LF is lame - but I'm on a Win32 system here and am lucky
> enough to have installed Cygwin and Guile.  The problem is I need to use
> Guile to write some binary files with uniform-vector-write, etc - and any
> time I write a 0x0a byte it gets a 0x0d prepended to it.  There are ways to
> avoid this in CygWin (forcing binary mode) - but there are also ways around
> it in C, and that's where it should be addressed.
> 
>    I've attached a CVS patch addressing the problem - it patches
> scm_open_file to support the "b" flag with O_BINARY - pretty simple.

Thanks.  We should check what (pipe) and (socket) do too.

Maybe what should be done in future is set binary mode on all file
descriptors and treat the CR/LF differences as character encoding
translations in the port system.  However the port system doesn't
yet have this capability.



reply via email to

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