glib-1.1.12 build failure
- From: Richard Polton <richard polton db com>
- To: gtk-list redhat com
- Subject: glib-1.1.12 build failure
- Date: Fri, 15 Jan 1999 09:14:41 +0000
On AIX 3.2.5, glib-1.1.12 does not build (I am using gcc-2.8.1 and
gmake-3.77). gettimeofday is
not defined (or does not appear to be anyway). Also, the names events
and revents are macro definition for reqevents and rtnevents
respectively in sys/poll.h
/usr/include/sys/poll.h:78:#define events reqevents /* SVR3,4 pollfd
member name */
/usr/include/sys/poll.h:79:#define revents rtnevents /* SVR3,4 pollfd
member name */
gcc -DHAVE_CONFIG_H -I. -I. -I. -DG_LOG_DOMAIN=g_log_domain_glib -g -O2
-Wall -c -DPIC gmain.c
gmain.c: In function `g_get_current_time':
gmain.c:354: warning: implicit declaration of function `gettimeofday'
gmain.c: In function `g_main_poll':
gmain.c:664: structure has no member named `reqevents'
gmain.c:675: structure has no member named `reqevents'
gmain.c:675: structure has no member named `reqevents'
gmain.c:676: structure has no member named `rtnevents'
gmain.c:701: structure has no member named `rtnevents'
gmain.c:701: structure has no member named `rtnevents'
This is the offending snippet from glib.h, line 2515:
struct _GPollFD
{
gint fd;
gushort events;
gushort revents;
};
Context diffs for a successful build are attached.
--
NT? Yeah, I use it for virtual memory overflow and reboot testing.
*** glib.h Sun Jan 3 07:21:55 1999
--- /home/dv15/glib-1.1.12/glib.h Fri Jan 15 09:00:03 1999
***************
*** 2515,2522 ****
struct _GPollFD
{
gint fd;
! gushort events;
! gushort revents;
};
void g_main_add_poll (GPollFD *fd,
--- 2515,2522 ----
struct _GPollFD
{
gint fd;
! gushort _events;
! gushort _revents;
};
void g_main_add_poll (GPollFD *fd,
*** gmain.c Sat Jan 2 07:41:14 1999
--- /home/dv15/glib-1.1.12/gmain.c Fri Jan 15 09:03:18 1999
***************
*** 181,193 ****
for (f = fds; f < &fds[nfds]; ++f)
if (f->fd >= 0)
{
! if (f->events & G_IO_IN)
FD_SET (f->fd, &rset);
! if (f->events & G_IO_OUT)
FD_SET (f->fd, &wset);
! if (f->events & G_IO_PRI)
FD_SET (f->fd, &xset);
! if (f->fd > maxfd && (f->events & (G_IO_IN|G_IO_OUT|G_IO_PRI)))
maxfd = f->fd;
}
--- 181,193 ----
for (f = fds; f < &fds[nfds]; ++f)
if (f->fd >= 0)
{
! if (f->_events & G_IO_IN)
FD_SET (f->fd, &rset);
! if (f->_events & G_IO_OUT)
FD_SET (f->fd, &wset);
! if (f->_events & G_IO_PRI)
FD_SET (f->fd, &xset);
! if (f->fd > maxfd && (f->_events & (G_IO_IN|G_IO_OUT|G_IO_PRI)))
maxfd = f->fd;
}
***************
*** 199,213 ****
if (ready > 0)
for (f = fds; f < &fds[nfds]; ++f)
{
! f->revents = 0;
if (f->fd >= 0)
{
if (FD_ISSET (f->fd, &rset))
! f->revents |= G_IO_IN;
if (FD_ISSET (f->fd, &wset))
! f->revents |= G_IO_OUT;
if (FD_ISSET (f->fd, &xset))
! f->revents |= G_IO_PRI;
}
}
--- 199,213 ----
if (ready > 0)
for (f = fds; f < &fds[nfds]; ++f)
{
! f->_revents = 0;
if (f->fd >= 0)
{
if (FD_ISSET (f->fd, &rset))
! f->_revents |= G_IO_IN;
if (FD_ISSET (f->fd, &wset))
! f->_revents |= G_IO_OUT;
if (FD_ISSET (f->fd, &xset))
! f->_revents |= G_IO_PRI;
}
}
***************
*** 661,667 ****
g_strerror (errno));
wake_up_rec.fd = wake_up_pipe[0];
! wake_up_rec.events = G_IO_IN;
g_main_add_poll_unlocked (0, &wake_up_rec);
}
--- 661,667 ----
g_strerror (errno));
wake_up_rec.fd = wake_up_pipe[0];
! wake_up_rec._events = G_IO_IN;
g_main_add_poll_unlocked (0, &wake_up_rec);
}
***************
*** 672,679 ****
while (pollrec && (!use_priority || priority >= pollrec->priority))
{
fd_array[i].fd = pollrec->fd->fd;
! fd_array[i].events = pollrec->fd->events;
! fd_array[i].revents = 0;
pollrec = pollrec->next;
i++;
--- 672,679 ----
while (pollrec && (!use_priority || priority >= pollrec->priority))
{
fd_array[i].fd = pollrec->fd->fd;
! fd_array[i]._events = pollrec->fd->_events;
! fd_array[i]._revents = 0;
pollrec = pollrec->next;
i++;
***************
*** 698,704 ****
i = 0;
while (i < npoll)
{
! pollrec->fd->revents = fd_array[i].revents;
pollrec = pollrec->next;
i++;
}
--- 698,704 ----
i = 0;
while (i < npoll)
{
! pollrec->fd->_revents = fd_array[i]._revents;
pollrec = pollrec->next;
i++;
}
*** giounix.c Fri Dec 18 02:49:35 1998
--- /home/dv15/glib-1.1.12/giounix.c Fri Jan 15 09:01:35 1999
***************
*** 110,116 ****
{
GIOUnixWatch *data = source_data;
! return (data->pollfd.revents & data->condition);
}
static gboolean
--- 110,116 ----
{
GIOUnixWatch *data = source_data;
! return (data->pollfd._revents & data->condition);
}
static gboolean
***************
*** 122,128 ****
GIOUnixWatch *data = source_data;
return (*data->callback)(data->channel,
! data->pollfd.revents & data->condition,
user_data);
}
--- 122,128 ----
GIOUnixWatch *data = source_data;
return (*data->callback)(data->channel,
! data->pollfd._revents & data->condition,
user_data);
}
***************
*** 274,280 ****
watch->condition = condition;
watch->pollfd.fd = unix_channel->fd;
! watch->pollfd.events = condition;
g_main_add_poll (&watch->pollfd, priority);
--- 274,280 ----
watch->condition = condition;
watch->pollfd.fd = unix_channel->fd;
! watch->pollfd._events = condition;
g_main_add_poll (&watch->pollfd, priority);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]