Hi,
on platform mingw-w64 for i686 and x86_64 I noticed the poll* modules
fail to compile with slightly different errors.
For the following test command I got the below noted output.
./gnulib-tool --create-testdir --dir=/tmp/testdir poll poll-tests poll-
h poll-h-testscd /tmp/testdir./configure && make
Result for i686:
 In file included from
poll.c:39:C:/Users/hm/Documents/msys32/mingw32/i686-w64-
mingw32/include/winsock2.h:1155:16: error: redefinition of 'struct
pollfd' 1155 | typedef struct pollfd {      |                ^~~~~~In
file included from poll.c:32:./poll.h:506:8: note: originally defined
here  506 | struct pollfd      |        ^~~~~~poll.c:345:1: error:
conflicting types for 'poll'  345 | poll (struct pollfd *pfd, nfds_t
nfd, int timeout)      | ^~~~In file included from
poll.c:32:./poll.h:536:1: note: previous declaration of 'poll' was
here  536 | _GL_FUNCDECL_SYS (poll, int, (struct pollfd *pfd, nfds_t
nfd, int timeout));      | ^~~~~~~~~~~~~~~~make[4]: *** [Makefile:1459:
poll.o] Fehler 1make[4]: Verzeichnis „/tmp/testdir/gllib“ wird
verlassenmake[3]: *** [Makefile:1481: all-recursive] Fehler 1make[3]:
Verzeichnis „/tmp/testdir/gllib“ wird verlassenmake[2]: ***
[Makefile:1318: all] Fehler 2make[2]: Verzeichnis „/tmp/testdir/gllib“
wird verlassenmake[1]: *** [Makefile:1220: all-recursive] Fehler
1make[1]: Verzeichnis „/tmp/testdir“ wird verlassenmake: ***
[Makefile:1161: all] Fehler 2

Result for x86_64:

In file included from
poll.c:39:C:/Users/hm/Documents/msys32/mingw64/x86_64-w64-
mingw32/include/winsock2.h:1155:16: error: redefinition of 'struct
pollfd' 1155 | typedef struct pollfd {      |                ^~~~~~In
file included from poll.c:32:./poll.h:506:8: note: originally defined
here  506 | struct pollfd      |        ^~~~~~poll.c:345:1: error:
conflicting types for 'poll'  345 | poll (struct pollfd *pfd, nfds_t
nfd, int timeout)      | ^~~~In file included from
poll.c:32:./poll.h:536:1: note: previous declaration of 'poll' was
here  536 | _GL_FUNCDECL_SYS (poll, int, (struct pollfd *pfd, nfds_t
nfd, int timeout));      | ^~~~~~~~~~~~~~~~poll.c: In function
'poll':poll.c:519:39: warning: passing argument 5 of 'select' from
incompatible pointer type [-Wincompatible-pointer-types]  519 |   if
(select (0, &rfds, &wfds, &xfds, &tv0) >
0)      |                                       ^~~~      |            
                           |      |                                    
   struct rpl_timeval *In file included from
poll.c:39:C:/Users/th18mn/Documents/msys32/mingw64/x86_64-w64-
mingw32/include/winsock2.h:995:116: note: expected 'PTIMEVAL' {aka
'struct timeval * const'} but argument is of type 'struct rpl_timeval
*'  995 |   WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set
*readfds,fd_set *writefds,fd_set *exceptfds,const PTIMEVAL
timeout);      |                                                       
                                              ~~~~~~~~~~~~~~~^~~~~~~pol
l.c:555:37: warning: passing argument 5 of 'select' from incompatible
pointer type [-Wincompatible-pointer-types]  555 |     select (0,
&rfds, &wfds, &xfds,
&tv0);      |                                     ^~~~      |          
                           |      |                                    
 struct rpl_timeval *In file included from
poll.c:39:C:/Users/th18mn/Documents/msys32/mingw64/x86_64-w64-
mingw32/include/winsock2.h:995:116: note: expected 'PTIMEVAL' {aka
'struct timeval * const'} but argument is of type 'struct rpl_timeval
*'  995 |   WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set
*readfds,fd_set *writefds,fd_set *exceptfds,const PTIMEVAL
timeout);      |                                                       
                                              ~~~~~~~~~~~~~~~^~~~~~~mak
e[4]: *** [Makefile:1459: poll.o] Fehler 1make[4]: Verzeichnis
„/tmp/testdir-64/gllib“ wird verlassenmake[3]: *** [Makefile:1481: all-
recursive] Fehler 1make[3]: Verzeichnis „/tmp/testdir-64/gllib“ wird
verlassenmake[2]: *** [Makefile:1318: all] Fehler 2make[2]: Verzeichnis
„/tmp/testdir-64/gllib“ wird verlassenmake[1]: *** [Makefile:1221: all-
recursive] Fehler 1make[1]: Verzeichnis „/tmp/testdir-64“ wird
verlassenmake: *** [Makefile:1162: all] Fehler 2
I very much appreciate a fix. Thanks!

Reply via email to