[bugfix] glib.h



Hello

  after I upgraded glib & gtk to 1.1.9 (from 1.1.7) I was quite surprised that
  every recompiled gtk application (testgtk,...) stopped working. So I spent
  some time with debugging (and much more time with compiling :) and finally I
  think I know the reason.

  The bug takes effect when HAVE_POLL is undefined (my case). Since G_IO_IN is
  used in such constructions as "if (f->events & G_IO_IN)" I suppose that it is
  very calamitous when its value is 0.

Dan
--- glib.h.SILLY	Fri Dec 25 18:56:10 1998
+++ glib.h	Fri Dec 25 18:57:29 1998
@@ -2303,27 +2303,39 @@
   G_IO_IN  
 #ifdef POLLIN
             = POLLIN
+#else
+           = 1 << 0
 #endif
   , G_IO_OUT  
 #ifdef POLLOUT
             = POLLOUT
+#else
+           = 1 << 1
 #endif
   , G_IO_PRI  
 #ifdef POLLPRI
             = POLLPRI
+#else
+           = 1 << 2
 #endif
 
   , G_IO_ERR  
 #ifdef POLLERR
            = POLLERR
+#else
+           = 1 << 3
 #endif
   , G_IO_HUP  
 #ifdef POLLHUP
            = POLLHUP
+#else
+           = 1 << 4
 #endif
   , G_IO_NVAL  
 #ifdef POLLNVAL
            = POLLNVAL
+#else
+           = 1 << 5
 #endif
 } GIOCondition;
 



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