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

On Tue, 23 Jul 2002, Alexander Varakin wrote:

> It looks like we will end up adding O_BINARY flag to all mc_open calls (I
> did the same change for editor).
> 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.

Maybe we can introduce another level of redirection, so that mc_open()  
would go to src/ and would do some useful things like adding O_BINARY and 
then would call either open() or vfs_open() dependent on whether VFS is 
enabled.  Whatever is cuttently called mc_open() would become vfs_open().

Pavel Roskin

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