From: Tor Lillqvist Date: Wed, 30 Mar 2005 12:01:27 +0000 (+0000) Subject: Always claim file descriptors open to devices are readable, since we can't X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=3e78c3c95dfd782c82c01f373d9ee8204a5a7e75;p=dana%2Fcg-glib.git Always claim file descriptors open to devices are readable, since we can't 2005-03-30 Tor Lillqvist * glib/giowin32.c (g_io_win32_fd_get_flags_internal): Always claim file descriptors open to devices are readable, since we can't know. fstat() doesn't gve any useful information. --- diff --git a/ChangeLog b/ChangeLog index 12dc208c..0dd9ef41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-03-30 Tor Lillqvist + + * glib/giowin32.c (g_io_win32_fd_get_flags_internal): Always claim + file descriptors open to devices are readable, since we can't + know. fstat() doesn't gve any useful information. + 2005-03-29 Tor Lillqvist * glib/gmain.c (g_poll): [Win32] If the event fired, assign diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 12dc208c..0dd9ef41 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2005-03-30 Tor Lillqvist + + * glib/giowin32.c (g_io_win32_fd_get_flags_internal): Always claim + file descriptors open to devices are readable, since we can't + know. fstat() doesn't gve any useful information. + 2005-03-29 Tor Lillqvist * glib/gmain.c (g_poll): [Win32] If the event fired, assign diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 12dc208c..0dd9ef41 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +2005-03-30 Tor Lillqvist + + * glib/giowin32.c (g_io_win32_fd_get_flags_internal): Always claim + file descriptors open to devices are readable, since we can't + know. fstat() doesn't gve any useful information. + 2005-03-29 Tor Lillqvist * glib/gmain.c (g_poll): [Win32] If the event fired, assign diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 12dc208c..0dd9ef41 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2005-03-30 Tor Lillqvist + + * glib/giowin32.c (g_io_win32_fd_get_flags_internal): Always claim + file descriptors open to devices are readable, since we can't + know. fstat() doesn't gve any useful information. + 2005-03-29 Tor Lillqvist * glib/gmain.c (g_poll): [Win32] If the event fired, assign diff --git a/glib/giowin32.c b/glib/giowin32.c index 9d541870..769a83f3 100644 --- a/glib/giowin32.c +++ b/glib/giowin32.c @@ -1450,9 +1450,9 @@ g_io_win32_fd_get_flags_internal (GIOChannel *channel, { /* XXX Seems there is no way to find out the readability of file * handles to device files (consoles, mostly) without doing a - * blocking read. So punt, use st->st_mode. + * blocking read. So punt, say it's readable. */ - channel->is_readable = !!(st->st_mode & _S_IREAD); + channel->is_readable = TRUE; channel->is_writeable = (WriteFile ((HANDLE) _get_osfhandle (win32_channel->fd), &c, 0, &count, NULL) != 0);