fixes to #undef HAVE_POLL case

-Yosh
This commit is contained in:
Manish Singh 1998-12-08 07:11:54 +00:00
parent 21338c2910
commit 738864a1a7
10 changed files with 46 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Mon Dec 7 23:10:41 PST 1998 Manish Singh <yosh@gimp.org>
* gmain.c: fixes to #undef HAVE_POLL case
1998-12-02 Havoc Pennington <hp@pobox.com>
* gdate.c (g_date_set_month): If Julian is valid, we have to

View File

@ -1,3 +1,7 @@
Mon Dec 7 23:10:41 PST 1998 Manish Singh <yosh@gimp.org>
* gmain.c: fixes to #undef HAVE_POLL case
1998-12-02 Havoc Pennington <hp@pobox.com>
* gdate.c (g_date_set_month): If Julian is valid, we have to

View File

@ -1,3 +1,7 @@
Mon Dec 7 23:10:41 PST 1998 Manish Singh <yosh@gimp.org>
* gmain.c: fixes to #undef HAVE_POLL case
1998-12-02 Havoc Pennington <hp@pobox.com>
* gdate.c (g_date_set_month): If Julian is valid, we have to

View File

@ -1,3 +1,7 @@
Mon Dec 7 23:10:41 PST 1998 Manish Singh <yosh@gimp.org>
* gmain.c: fixes to #undef HAVE_POLL case
1998-12-02 Havoc Pennington <hp@pobox.com>
* gdate.c (g_date_set_month): If Julian is valid, we have to

View File

@ -1,3 +1,7 @@
Mon Dec 7 23:10:41 PST 1998 Manish Singh <yosh@gimp.org>
* gmain.c: fixes to #undef HAVE_POLL case
1998-12-02 Havoc Pennington <hp@pobox.com>
* gdate.c (g_date_set_month): If Julian is valid, we have to

View File

@ -1,3 +1,7 @@
Mon Dec 7 23:10:41 PST 1998 Manish Singh <yosh@gimp.org>
* gmain.c: fixes to #undef HAVE_POLL case
1998-12-02 Havoc Pennington <hp@pobox.com>
* gdate.c (g_date_set_month): If Julian is valid, we have to

View File

@ -1,3 +1,7 @@
Mon Dec 7 23:10:41 PST 1998 Manish Singh <yosh@gimp.org>
* gmain.c: fixes to #undef HAVE_POLL case
1998-12-02 Havoc Pennington <hp@pobox.com>
* gdate.c (g_date_set_month): If Julian is valid, we have to

View File

@ -1,3 +1,7 @@
Mon Dec 7 23:10:41 PST 1998 Manish Singh <yosh@gimp.org>
* gmain.c: fixes to #undef HAVE_POLL case
1998-12-02 Havoc Pennington <hp@pobox.com>
* gdate.c (g_date_set_month): If Julian is valid, we have to

View File

@ -112,6 +112,8 @@ static GPollFunc poll_func = (GPollFunc)poll;
* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
*/
#include <string.h> /* for bzero on BSD systems */
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif /* HAVE_SYS_SELECT_H_ */
@ -151,7 +153,7 @@ g_poll (GPollFD *fds, guint nfds, gint timeout)
FD_SET (f->fd, &wset);
if (f->events & G_IO_PRI)
FD_SET (f->fd, &xset);
if (f->fd > maxfd && (f->events & (POLLIN|POLLOUT|POLLPRI)))
if (f->fd > maxfd && (f->events & (G_IO_IN|G_IO_OUT|G_IO_PRI)))
maxfd = f->fd;
}
@ -597,7 +599,11 @@ g_main_set_poll_func (GPollFunc func)
if (func)
poll_func = func;
else
#ifdef HAVE_POLL
poll_func = (GPollFunc)poll;
#else
poll_func = (GPollFunc)g_poll;
#endif
}
/* Timeouts */

View File

@ -112,6 +112,8 @@ static GPollFunc poll_func = (GPollFunc)poll;
* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
*/
#include <string.h> /* for bzero on BSD systems */
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif /* HAVE_SYS_SELECT_H_ */
@ -151,7 +153,7 @@ g_poll (GPollFD *fds, guint nfds, gint timeout)
FD_SET (f->fd, &wset);
if (f->events & G_IO_PRI)
FD_SET (f->fd, &xset);
if (f->fd > maxfd && (f->events & (POLLIN|POLLOUT|POLLPRI)))
if (f->fd > maxfd && (f->events & (G_IO_IN|G_IO_OUT|G_IO_PRI)))
maxfd = f->fd;
}
@ -597,7 +599,11 @@ g_main_set_poll_func (GPollFunc func)
if (func)
poll_func = func;
else
#ifdef HAVE_POLL
poll_func = (GPollFunc)poll;
#else
poll_func = (GPollFunc)g_poll;
#endif
}
/* Timeouts */