Re: _GPollFD conflicts on AIX



On Wed, 2004-02-18 at 21:49, Albert Chin wrote:
> <glib/gmain.h> defines:
>   struct _GPollFD
>   {
>     gint          fd;
>     gushort       events;
>     gushort       revents;
>   };
> 
> Unfortunately, on AIX 4.3.2 and 5.1 in <sys/poll.h> we have:
>   #define events  reqevents               /* SVR3,4 pollfd member name */
>   #define revents rtnevents               /* SVR3,4 pollfd member name */
> 
> So, if a .c file #includes <sys/poll.h> directly or indirectly and
> <glib/gmain.h>, the events/revents members get renamed. How should we
> solve this?

It should be OK unless you include <sys/poll.h> after <glib/gmain.h>;
this is one of several reasons you should include system headers
first in a .c file.

Regards,
						Owen





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