Re: GIOChannel diff committed



Hans Breuer <hans breuer org> writes:

> At 13:22 20.07.01 -0700, Ron Steinke wrote:
> >	I've committed the big GIOChannel diff I had. This goes a long
> >way towards getting the new GIOChannel API working. Additionally,
> >with any luck, the win32 implementation should now compile
> >(win32 developers, please confirm). I'm eagerly awaiting the bug reports.
> >
> I've just commited a first implementation. iochannel-test runs, at least once:
> D:\devel\my-gtk\glib\tests>iochannel-test
> 
> (process:4294812219): ** WARNING **: Channel set flags unsupported
>  BLOCKING TRUE
> 
> : Line one
> 
> : Line two
> 
> : Line three
> 
> : /* Hello */
> 
> : \x1234\x567890\x6666
> 
> read 62 bytes, wrote 62 bytes
> 
> The second time it stumbles over it own output, because there is a
> read-only version of 'iochannel-test-outfile' still around. Is this a cross
> platform feature?
> 
> D:\devel\my-gtk\glib\tests>iochannel-test
> 
> (process:4294721143): ** WARNING **: Permission denied
> 
> (process:4294721143): ** WARNING **: Unable to open file
> iochannel-test-outfile

    gio_w = g_io_channel_new_file( "iochannel-test-outfile", "w", &gerr);

/**
 * g_io_channel_new_file:
 * @filename: A string containing the name of a file.
 * @mode: One of "r", "w", "a", "r+", "w+", "a+". These have
 *        the same meaning as in fopen().
 * @error: A location to return an error of type %G_IO_FILE_ERROR.
 *
    `w'
          Open the file for writing only.  If the file already exists,
          it is truncated to zero length.  Otherwise a new file is
          created.

(This is the GNU libc definition, but I'm sure it corresponds
to the ISO standard)

So, probably some fix is needed in your g_io_channel_new_file()...
since the code looks like the Unix version, it may be that
the Win32 implementation of open() is buggy in its handling
of 
       flags = O_WRONLY | O_TRUNC | O_CREAT;

But I"m not really in a position to suggestion an alternate way
of doing things or a workaround.

Regards,
                                        Owen




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