From 738864a1a758b2421211e4ecf1ce6102842428ea Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Tue, 8 Dec 1998 07:11:54 +0000 Subject: [PATCH] fixes to #undef HAVE_POLL case -Yosh --- ChangeLog | 4 ++++ ChangeLog.pre-2-0 | 4 ++++ ChangeLog.pre-2-10 | 4 ++++ ChangeLog.pre-2-12 | 4 ++++ ChangeLog.pre-2-2 | 4 ++++ ChangeLog.pre-2-4 | 4 ++++ ChangeLog.pre-2-6 | 4 ++++ ChangeLog.pre-2-8 | 4 ++++ glib/gmain.c | 8 +++++++- gmain.c | 8 +++++++- 10 files changed, 46 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f8489e3..1038bf7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Dec 7 23:10:41 PST 1998 Manish Singh + + * gmain.c: fixes to #undef HAVE_POLL case + 1998-12-02 Havoc Pennington * gdate.c (g_date_set_month): If Julian is valid, we have to diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index f8489e3..1038bf7 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,7 @@ +Mon Dec 7 23:10:41 PST 1998 Manish Singh + + * gmain.c: fixes to #undef HAVE_POLL case + 1998-12-02 Havoc Pennington * gdate.c (g_date_set_month): If Julian is valid, we have to diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f8489e3..1038bf7 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,7 @@ +Mon Dec 7 23:10:41 PST 1998 Manish Singh + + * gmain.c: fixes to #undef HAVE_POLL case + 1998-12-02 Havoc Pennington * gdate.c (g_date_set_month): If Julian is valid, we have to diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index f8489e3..1038bf7 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,7 @@ +Mon Dec 7 23:10:41 PST 1998 Manish Singh + + * gmain.c: fixes to #undef HAVE_POLL case + 1998-12-02 Havoc Pennington * gdate.c (g_date_set_month): If Julian is valid, we have to diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f8489e3..1038bf7 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,7 @@ +Mon Dec 7 23:10:41 PST 1998 Manish Singh + + * gmain.c: fixes to #undef HAVE_POLL case + 1998-12-02 Havoc Pennington * gdate.c (g_date_set_month): If Julian is valid, we have to diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f8489e3..1038bf7 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,7 @@ +Mon Dec 7 23:10:41 PST 1998 Manish Singh + + * gmain.c: fixes to #undef HAVE_POLL case + 1998-12-02 Havoc Pennington * gdate.c (g_date_set_month): If Julian is valid, we have to diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f8489e3..1038bf7 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,7 @@ +Mon Dec 7 23:10:41 PST 1998 Manish Singh + + * gmain.c: fixes to #undef HAVE_POLL case + 1998-12-02 Havoc Pennington * gdate.c (g_date_set_month): If Julian is valid, we have to diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f8489e3..1038bf7 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,7 @@ +Mon Dec 7 23:10:41 PST 1998 Manish Singh + + * gmain.c: fixes to #undef HAVE_POLL case + 1998-12-02 Havoc Pennington * gdate.c (g_date_set_month): If Julian is valid, we have to diff --git a/glib/gmain.c b/glib/gmain.c index 79c1191..1f13e90 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -112,6 +112,8 @@ static GPollFunc poll_func = (GPollFunc)poll; * Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. */ +#include /* for bzero on BSD systems */ + #ifdef HAVE_SYS_SELECT_H #include #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 */ diff --git a/gmain.c b/gmain.c index 79c1191..1f13e90 100644 --- a/gmain.c +++ b/gmain.c @@ -112,6 +112,8 @@ static GPollFunc poll_func = (GPollFunc)poll; * Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. */ +#include /* for bzero on BSD systems */ + #ifdef HAVE_SYS_SELECT_H #include #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 */ -- 2.7.4