bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: "Hannes Müller" <h.c.f.mueller@gmx.de>
To: bug-gnulib@gnu.org
Subject: modules poll* fail on mingw-w64 for i686 and x86_64
Date: Sat, 29 Jun 2019 08:54:30 +0200	[thread overview]
Message-ID: <1561791270.1634.5.camel@gmx.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 4970 bytes --]

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!

[-- Attachment #2: Type: text/html, Size: 11437 bytes --]

             reply	other threads:[~2019-06-29 12:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-29  6:54 Hannes Müller [this message]
2019-06-29 14:06 ` modules poll* fail on mingw-w64 for i686 and x86_64 Bruno Haible
2019-06-29 18:32   ` Hannes Müller
2019-06-30 12:46     ` Bruno Haible
2019-07-01 18:16       ` Patch: Fix warning for timeval in poll.c on mingw-w64 for x86_64 Hannes Müller
2019-07-01 23:51         ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1561791270.1634.5.camel@gmx.de \
    --to=h.c.f.mueller@gmx.de \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).