mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Matthias Classen's patch to give g_io_channel_flush() the correct sense
* glib/giochannel.c: Matthias Classen's patch to give g_io_channel_flush() the correct sense when testing whether the buffer is empty * glib/giounix.c: Matthias Classen's patch to set the mode of a file created with g_io_channel_new_file()
This commit is contained in:
parent
9599c06203
commit
e669b218a1
@ -1,3 +1,11 @@
|
||||
2001-07-29 Ron Steinke <rsteinke@w-link.net>
|
||||
|
||||
* glib/giochannel.c: Matthias Classen's patch to give
|
||||
g_io_channel_flush() the correct sense when testing
|
||||
whether the buffer is empty
|
||||
* glib/giounix.c: Matthias Classen's patch to set
|
||||
the mode of a file created with g_io_channel_new_file()
|
||||
|
||||
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-07-29 Ron Steinke <rsteinke@w-link.net>
|
||||
|
||||
* glib/giochannel.c: Matthias Classen's patch to give
|
||||
g_io_channel_flush() the correct sense when testing
|
||||
whether the buffer is empty
|
||||
* glib/giounix.c: Matthias Classen's patch to set
|
||||
the mode of a file created with g_io_channel_new_file()
|
||||
|
||||
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-07-29 Ron Steinke <rsteinke@w-link.net>
|
||||
|
||||
* glib/giochannel.c: Matthias Classen's patch to give
|
||||
g_io_channel_flush() the correct sense when testing
|
||||
whether the buffer is empty
|
||||
* glib/giounix.c: Matthias Classen's patch to set
|
||||
the mode of a file created with g_io_channel_new_file()
|
||||
|
||||
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-07-29 Ron Steinke <rsteinke@w-link.net>
|
||||
|
||||
* glib/giochannel.c: Matthias Classen's patch to give
|
||||
g_io_channel_flush() the correct sense when testing
|
||||
whether the buffer is empty
|
||||
* glib/giounix.c: Matthias Classen's patch to set
|
||||
the mode of a file created with g_io_channel_new_file()
|
||||
|
||||
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-07-29 Ron Steinke <rsteinke@w-link.net>
|
||||
|
||||
* glib/giochannel.c: Matthias Classen's patch to give
|
||||
g_io_channel_flush() the correct sense when testing
|
||||
whether the buffer is empty
|
||||
* glib/giounix.c: Matthias Classen's patch to set
|
||||
the mode of a file created with g_io_channel_new_file()
|
||||
|
||||
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-07-29 Ron Steinke <rsteinke@w-link.net>
|
||||
|
||||
* glib/giochannel.c: Matthias Classen's patch to give
|
||||
g_io_channel_flush() the correct sense when testing
|
||||
whether the buffer is empty
|
||||
* glib/giounix.c: Matthias Classen's patch to set
|
||||
the mode of a file created with g_io_channel_new_file()
|
||||
|
||||
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-07-29 Ron Steinke <rsteinke@w-link.net>
|
||||
|
||||
* glib/giochannel.c: Matthias Classen's patch to give
|
||||
g_io_channel_flush() the correct sense when testing
|
||||
whether the buffer is empty
|
||||
* glib/giounix.c: Matthias Classen's patch to set
|
||||
the mode of a file created with g_io_channel_new_file()
|
||||
|
||||
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
|
||||
|
@ -1,3 +1,11 @@
|
||||
2001-07-29 Ron Steinke <rsteinke@w-link.net>
|
||||
|
||||
* glib/giochannel.c: Matthias Classen's patch to give
|
||||
g_io_channel_flush() the correct sense when testing
|
||||
whether the buffer is empty
|
||||
* glib/giounix.c: Matthias Classen's patch to set
|
||||
the mode of a file created with g_io_channel_new_file()
|
||||
|
||||
Sun Jul 29 16:08:17 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* glib/gscanner.[hc]: removed deprecated g_scanner_stat_mode().
|
||||
|
@ -821,7 +821,7 @@ g_io_channel_flush (GIOChannel *channel,
|
||||
g_return_val_if_fail (channel != NULL, G_IO_STATUS_ERROR);
|
||||
g_return_val_if_fail ((error == NULL) || (*error == NULL), G_IO_STATUS_ERROR);
|
||||
|
||||
if (channel->write_buf && channel->write_buf->len > 0)
|
||||
if (channel->write_buf == NULL || channel->write_buf->len == 0)
|
||||
return G_IO_STATUS_NORMAL;
|
||||
|
||||
do
|
||||
|
@ -410,6 +410,7 @@ g_io_channel_new_file (const gchar *filename,
|
||||
GError **error)
|
||||
{
|
||||
int fid, flags;
|
||||
mode_t create_mode;
|
||||
GIOChannel *channel;
|
||||
enum { /* Cheesy hack */
|
||||
MODE_R = 1 << 0,
|
||||
@ -479,7 +480,8 @@ g_io_channel_new_file (const gchar *filename,
|
||||
flags = 0;
|
||||
}
|
||||
|
||||
fid = open (filename, flags);
|
||||
create_mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
|
||||
fid = open (filename, flags, create_mode);
|
||||
if (fid < 0)
|
||||
{
|
||||
g_set_error (error, G_FILE_ERROR,
|
||||
|
Loading…
Reference in New Issue
Block a user