Don't set on Win32, only causes trouble.

2002-10-27  Tor Lillqvist  <tml@iki.fi>

	* configure.in (G_MODULE_LDFLAGS): Don't set on Win32, only causes
	trouble.

	* glib/gmain.c (g_poll): Fix for bug reported by Herman Bloggs
	(http://mail.gnome.org/archives/gtk-devel-list/2002-October/msg00101.html)
	and others. We waited for events only for GPollFDs whose events
	field had G_IO_IN set. We need to wait also for events for
	GPollFDs that have just G_IO_OUT set. Non-blocking sockets in the
	process of being connect()ed are one such case. Also silence a
	couple of gcc warnings.
This commit is contained in:
Tor Lillqvist 2002-10-26 22:53:21 +00:00 committed by Tor Lillqvist
parent 6e275fd54a
commit a488638747
9 changed files with 112 additions and 13 deletions

View File

@ -1,3 +1,16 @@
2002-10-27 Tor Lillqvist <tml@iki.fi>
* configure.in (G_MODULE_LDFLAGS): Don't set on Win32, only causes
trouble.
* glib/gmain.c (g_poll): Fix for bug reported by Herman Bloggs
(http://mail.gnome.org/archives/gtk-devel-list/2002-October/msg00101.html)
and others. We waited for events only for GPollFDs whose events
field had G_IO_IN set. We need to wait also for events for
GPollFDs that have just G_IO_OUT set. Non-blocking sockets in the
process of being connect()ed are one such case. Also silence a
couple of gcc warnings.
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
* glib/giochannel.c (g_io_channel_read_line_backend): avoid

View File

@ -1,3 +1,16 @@
2002-10-27 Tor Lillqvist <tml@iki.fi>
* configure.in (G_MODULE_LDFLAGS): Don't set on Win32, only causes
trouble.
* glib/gmain.c (g_poll): Fix for bug reported by Herman Bloggs
(http://mail.gnome.org/archives/gtk-devel-list/2002-October/msg00101.html)
and others. We waited for events only for GPollFDs whose events
field had G_IO_IN set. We need to wait also for events for
GPollFDs that have just G_IO_OUT set. Non-blocking sockets in the
process of being connect()ed are one such case. Also silence a
couple of gcc warnings.
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
* glib/giochannel.c (g_io_channel_read_line_backend): avoid

View File

@ -1,3 +1,16 @@
2002-10-27 Tor Lillqvist <tml@iki.fi>
* configure.in (G_MODULE_LDFLAGS): Don't set on Win32, only causes
trouble.
* glib/gmain.c (g_poll): Fix for bug reported by Herman Bloggs
(http://mail.gnome.org/archives/gtk-devel-list/2002-October/msg00101.html)
and others. We waited for events only for GPollFDs whose events
field had G_IO_IN set. We need to wait also for events for
GPollFDs that have just G_IO_OUT set. Non-blocking sockets in the
process of being connect()ed are one such case. Also silence a
couple of gcc warnings.
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
* glib/giochannel.c (g_io_channel_read_line_backend): avoid

View File

@ -1,3 +1,16 @@
2002-10-27 Tor Lillqvist <tml@iki.fi>
* configure.in (G_MODULE_LDFLAGS): Don't set on Win32, only causes
trouble.
* glib/gmain.c (g_poll): Fix for bug reported by Herman Bloggs
(http://mail.gnome.org/archives/gtk-devel-list/2002-October/msg00101.html)
and others. We waited for events only for GPollFDs whose events
field had G_IO_IN set. We need to wait also for events for
GPollFDs that have just G_IO_OUT set. Non-blocking sockets in the
process of being connect()ed are one such case. Also silence a
couple of gcc warnings.
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
* glib/giochannel.c (g_io_channel_read_line_backend): avoid

View File

@ -1,3 +1,16 @@
2002-10-27 Tor Lillqvist <tml@iki.fi>
* configure.in (G_MODULE_LDFLAGS): Don't set on Win32, only causes
trouble.
* glib/gmain.c (g_poll): Fix for bug reported by Herman Bloggs
(http://mail.gnome.org/archives/gtk-devel-list/2002-October/msg00101.html)
and others. We waited for events only for GPollFDs whose events
field had G_IO_IN set. We need to wait also for events for
GPollFDs that have just G_IO_OUT set. Non-blocking sockets in the
process of being connect()ed are one such case. Also silence a
couple of gcc warnings.
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
* glib/giochannel.c (g_io_channel_read_line_backend): avoid

View File

@ -1,3 +1,16 @@
2002-10-27 Tor Lillqvist <tml@iki.fi>
* configure.in (G_MODULE_LDFLAGS): Don't set on Win32, only causes
trouble.
* glib/gmain.c (g_poll): Fix for bug reported by Herman Bloggs
(http://mail.gnome.org/archives/gtk-devel-list/2002-October/msg00101.html)
and others. We waited for events only for GPollFDs whose events
field had G_IO_IN set. We need to wait also for events for
GPollFDs that have just G_IO_OUT set. Non-blocking sockets in the
process of being connect()ed are one such case. Also silence a
couple of gcc warnings.
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
* glib/giochannel.c (g_io_channel_read_line_backend): avoid

View File

@ -1,3 +1,16 @@
2002-10-27 Tor Lillqvist <tml@iki.fi>
* configure.in (G_MODULE_LDFLAGS): Don't set on Win32, only causes
trouble.
* glib/gmain.c (g_poll): Fix for bug reported by Herman Bloggs
(http://mail.gnome.org/archives/gtk-devel-list/2002-October/msg00101.html)
and others. We waited for events only for GPollFDs whose events
field had G_IO_IN set. We need to wait also for events for
GPollFDs that have just G_IO_OUT set. Non-blocking sockets in the
process of being connect()ed are one such case. Also silence a
couple of gcc warnings.
Fri Oct 18 13:41:30 2002 Manish Singh <yosh@gimp.org>
* glib/giochannel.c (g_io_channel_read_line_backend): avoid

View File

@ -915,7 +915,12 @@ dnl ***********************
G_MODULE_LIBS=
G_MODULE_LIBS_EXTRA=
G_MODULE_PLUGIN_LIBS=
if test x"$glib_native_win32" = xyes; then
dnl No use for this on Win32
G_MODULE_LDFLAGS=
else
G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
fi
dnl G_MODULE_IMPL= don't reset, so cmd-line can override
G_MODULE_NEED_USCORE=0
G_MODULE_BROKEN_RTLD_GLOBAL=0

View File

@ -267,8 +267,6 @@ g_poll (GPollFD *fds,
for (f = fds; f < &fds[nfds]; ++f)
if (f->fd >= 0)
{
if (f->events & G_IO_IN)
{
if (f->fd == G_WIN32_MSG_HANDLE)
poll_msgs = TRUE;
@ -280,7 +278,6 @@ g_poll (GPollFD *fds,
handles[nhandles++] = (HANDLE) f->fd;
}
}
}
if (timeout == -1)
timeout = INFINITE;
@ -327,7 +324,10 @@ g_poll (GPollFD *fds,
*/
timer = SetTimer (NULL, 0, timeout, NULL);
if (timer == 0)
{
g_warning (G_STRLOC ": SetTimer() failed");
ready = WAIT_TIMEOUT;
}
else
{
#ifdef G_MAIN_POLL_DEBUG
@ -381,7 +381,7 @@ g_poll (GPollFD *fds,
}
#ifdef G_MAIN_POLL_DEBUG
g_print ("wait returns %d%s\n",
g_print ("wait returns %ld%s\n",
ready,
(ready == WAIT_FAILED ? " (WAIT_FAILED)" :
(ready == WAIT_TIMEOUT ? " (WAIT_TIMEOUT)" :
@ -408,10 +408,13 @@ g_poll (GPollFD *fds,
else if (ready >= WAIT_OBJECT_0 && ready < WAIT_OBJECT_0 + nhandles)
for (f = fds; f < &fds[nfds]; ++f)
{
if ((f->events & G_IO_IN)
if ((f->events & (G_IO_IN | G_IO_OUT))
&& f->fd == (gint) handles[ready - WAIT_OBJECT_0])
{
if (f->events & G_IO_IN)
f->revents |= G_IO_IN;
else
f->revents |= G_IO_OUT;
#ifdef G_MAIN_POLL_DEBUG
g_print ("g_poll: got event %#x\n", f->fd);
#endif