diff --git a/ChangeLog b/ChangeLog index faff35bc6..7cdcb34d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,15 @@ +2001-09-22 Hans Breuer + + * glib/giowin32.c : simply setting is_readable and is_writeable + to TRUE does make Gimp plug-ins work again. Still no API known + to request this info on Win32 (see #57690) + 2001-09-21 Hans Breuer * makefile.msc : added rule for glibconfig.h * glib/giowin32.c (g_io_channel_new_file) : always open - in binary mode + in binary mode (fix for #57695) * glib/glib.def : updated externals diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index faff35bc6..7cdcb34d7 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,9 +1,15 @@ +2001-09-22 Hans Breuer + + * glib/giowin32.c : simply setting is_readable and is_writeable + to TRUE does make Gimp plug-ins work again. Still no API known + to request this info on Win32 (see #57690) + 2001-09-21 Hans Breuer * makefile.msc : added rule for glibconfig.h * glib/giowin32.c (g_io_channel_new_file) : always open - in binary mode + in binary mode (fix for #57695) * glib/glib.def : updated externals diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index faff35bc6..7cdcb34d7 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,9 +1,15 @@ +2001-09-22 Hans Breuer + + * glib/giowin32.c : simply setting is_readable and is_writeable + to TRUE does make Gimp plug-ins work again. Still no API known + to request this info on Win32 (see #57690) + 2001-09-21 Hans Breuer * makefile.msc : added rule for glibconfig.h * glib/giowin32.c (g_io_channel_new_file) : always open - in binary mode + in binary mode (fix for #57695) * glib/glib.def : updated externals diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index faff35bc6..7cdcb34d7 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,9 +1,15 @@ +2001-09-22 Hans Breuer + + * glib/giowin32.c : simply setting is_readable and is_writeable + to TRUE does make Gimp plug-ins work again. Still no API known + to request this info on Win32 (see #57690) + 2001-09-21 Hans Breuer * makefile.msc : added rule for glibconfig.h * glib/giowin32.c (g_io_channel_new_file) : always open - in binary mode + in binary mode (fix for #57695) * glib/glib.def : updated externals diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index faff35bc6..7cdcb34d7 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,9 +1,15 @@ +2001-09-22 Hans Breuer + + * glib/giowin32.c : simply setting is_readable and is_writeable + to TRUE does make Gimp plug-ins work again. Still no API known + to request this info on Win32 (see #57690) + 2001-09-21 Hans Breuer * makefile.msc : added rule for glibconfig.h * glib/giowin32.c (g_io_channel_new_file) : always open - in binary mode + in binary mode (fix for #57695) * glib/glib.def : updated externals diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index faff35bc6..7cdcb34d7 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,9 +1,15 @@ +2001-09-22 Hans Breuer + + * glib/giowin32.c : simply setting is_readable and is_writeable + to TRUE does make Gimp plug-ins work again. Still no API known + to request this info on Win32 (see #57690) + 2001-09-21 Hans Breuer * makefile.msc : added rule for glibconfig.h * glib/giowin32.c (g_io_channel_new_file) : always open - in binary mode + in binary mode (fix for #57695) * glib/glib.def : updated externals diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index faff35bc6..7cdcb34d7 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,9 +1,15 @@ +2001-09-22 Hans Breuer + + * glib/giowin32.c : simply setting is_readable and is_writeable + to TRUE does make Gimp plug-ins work again. Still no API known + to request this info on Win32 (see #57690) + 2001-09-21 Hans Breuer * makefile.msc : added rule for glibconfig.h * glib/giowin32.c (g_io_channel_new_file) : always open - in binary mode + in binary mode (fix for #57695) * glib/glib.def : updated externals diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index faff35bc6..7cdcb34d7 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,9 +1,15 @@ +2001-09-22 Hans Breuer + + * glib/giowin32.c : simply setting is_readable and is_writeable + to TRUE does make Gimp plug-ins work again. Still no API known + to request this info on Win32 (see #57690) + 2001-09-21 Hans Breuer * makefile.msc : added rule for glibconfig.h * glib/giowin32.c (g_io_channel_new_file) : always open - in binary mode + in binary mode (fix for #57695) * glib/glib.def : updated externals diff --git a/glib/giowin32.c b/glib/giowin32.c index 417779c83..f00ca4c78 100644 --- a/glib/giowin32.c +++ b/glib/giowin32.c @@ -1337,10 +1337,22 @@ g_io_channel_win32_new_fd (gint fd) win32_channel->fd = fd; - channel->is_readable = !!(st.st_mode & _S_IREAD); - channel->is_writeable = !!(st.st_mode & _S_IWRITE); - /* XXX: pipes aren't seeakable, are they ? */ - channel->is_seekable = !(st.st_mode & _S_IFIFO); + /* fstat doesn't deliver senseful values, but + * fcntl isn't available, so guess ... + */ + if (st.st_mode & _S_IFIFO) + { + channel->is_readable = TRUE; + channel->is_writeable = TRUE; + channel->is_seekable = FALSE; + } + else + { + channel->is_readable = !!(st.st_mode & _S_IREAD); + channel->is_writeable = !!(st.st_mode & _S_IWRITE); + /* XXX: pipes aren't seeakable, are they ? */ + channel->is_seekable = !(st.st_mode & _S_IFIFO); + } return channel; }