Re: [PATCH] copy_file_file: Use binary mode when opening the source/destination file

> > Maybe it is a good idea to write  mc_open as a wraper function (now it
> is
> > macro) , and in this function always set O_BINARY, something like this:
> > int mc_open(char * filename, int flags)
> > {
> >     return open(filename, flags | O_BINARY);
> > }
> > 
> > Pavel R. , what do you think about this?
> This would essentially force using VFS under Cygwin.  mc_open() is the 
> same as open() if VFS is disabled.
> If we do such hacks, it will be harder to replace our VFS with GNOME VFS 
> when the later is ready.

There is another way to do this on Cygwin, but it is a bit hackish too.. You
can link a special object file provided by Cygwin (binmode.o) which will
make the resulting executable to open all the files in binary mode. As I say in
a my previous mail isn't it better to evaluate all open () calls and decide
which of them would need to be added the O_BINARY flag ?

GMX - Die Kommunikationsplattform im Internet.

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