Re: [gtk-list] Re: GTK+/GLib patch for systems without poll() (like RedHat 4.x)



Alex Roberts wrote:
> Quoting Andrew Vajoczki (vajoczki@interlog.com):
> > This patch fixes the "GTK+/GLib frozen event loop bug"  
> > in systems that do not have the poll() system call 
> > (such as RedHat 4.x).  It seems that POLLIN and the gang 
> > were not defined, ultimately causing g_poll() to hang in 
> > select() forever (since the first enum value, G_IO_IN, would 
> > be equal to zero).

> > You must "make clean" and "make uninstall" and rebuild 
> > both GLib and GTK+ after you apply this patch. 

> Hrmm... so, does this fix that gtk/glib 1.1.x segfault bug in gEdit then?
> (if so, it seems Debian doesnt have this poll() thing either.. havent
> checked)..
> if this works, does anyone mind if i merge it into the glib cvs tree?

Please don't, this is already fixed in GLib dev CVS.

(though I have no clue why the glibconfig.h constants are defined
 with '=' in them -- IMHO it should be " = GLIB_SYSDEF_xxx" in glib.h)

	Jeff





glib.h:
typedef enum
{
  G_IO_IN       GLIB_SYSDEF_POLLIN,
  G_IO_OUT      GLIB_SYSDEF_POLLOUT,
  G_IO_PRI      GLIB_SYSDEF_POLLPRI,
  G_IO_ERR      GLIB_SYSDEF_POLLERR,
  G_IO_HUP      GLIB_SYSDEF_POLLHUP,
  G_IO_NVAL     GLIB_SYSDEF_POLLNVAL
} GIOCondition;

glibconfig.h:
#define GLIB_SYSDEF_POLLIN =1
#define GLIB_SYSDEF_POLLOUT =4
#define GLIB_SYSDEF_POLLPRI =2
#define GLIB_SYSDEF_POLLERR =8
#define GLIB_SYSDEF_POLLHUP =16
#define GLIB_SYSDEF_POLLNVAL =32

	Jeff






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