Re: flockfile undefined on Mingw64 platform

2017-05-11 Thread Paul Eggert
I'm really the wrong person to be fixing this sort of thing since I don't use MS-Windows. However, I installed a getopt workaround that I hope is obvious, here: http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=19fb4184b097eee0f17f16bdd40d60e3e6d91d45 Perhaps Zack can comment when he find

Re: flockfile undefined on Mingw64 platform

2017-05-11 Thread Bruno Haible
Daniel P. Berrange wrote: > gettimeofday.c:42:1: warning: 'initialize' defined but not used > [-Wunused-function] > initialize (void) > ^~ Should be fixed through the gettimeofday change of today. > I'm trying to build libvirt with the latest GNULIB git master, on Mingw64 > platform (F

gettimeofday: increase precision on mingw

2017-05-11 Thread Bruno Haible
Comparison of the two gettimeofday implementations on native Windows: * The mingw one, based on GetSystemTimeAsFileTime, produces values that jump by 15.627 milliseconds on average: delta 1494528421.290102 1494528421.305729 15627 1494528421.321355

flockfile undefined on Mingw64 platform

2017-05-11 Thread Daniel P. Berrange
I'm trying to build libvirt with the latest GNULIB git master, on Mingw64 platform (Fedora 25 based). I get compile warnings: getopt.c: In function 'process_long_option': getopt.c:281:5: warning: implicit declaration of function 'flockfile' [-Wimplicit-function-declaration] flockfile (stder

Re: [PATCH] poll: fix regression in Win32 emulation of poll function

2017-05-11 Thread Bruno Haible
Daniel P. Berrange wrote: > Perhaps I'm mis-understanding, but I was looking at this code: > > h = (HANDLE) _get_osfhandle (pfd[i].fd); > assure (h != NULL); > if (IsSocketHandle (h)) > { > int requested = FD_CLOSE; > > /* see above; socket handles ar

Re: [PATCH] poll: fix regression in Win32 emulation of poll function

2017-05-11 Thread Daniel P. Berrange
On Thu, May 11, 2017 at 04:36:46PM +0200, Bruno Haible wrote: > Daniel P. Berrange wrote: > > Perhaps I'm mis-understanding, but I was looking at this code: > > > > h = (HANDLE) _get_osfhandle (pfd[i].fd); > > assure (h != NULL); > > if (IsSocketHandle (h)) > > { > >

doc: fix select() documentation

2017-05-11 Thread Bruno Haible
The sentence from https://www.gnu.org/software/gnulib/manual/html_node/select.html "On Windows platforms (excluding Cygwin), error codes for accept are not placed in errno, and WSAGetLastError must be used instead." makes little sense to me. This patch fixes the doc. 2017-05-11 Bruno Haible

Re: [PATCH] poll: fix regression in Win32 emulation of poll function

2017-05-11 Thread Daniel P. Berrange
On Thu, May 11, 2017 at 03:15:46PM +0200, Bruno Haible wrote: > Hi Daniel, > > > it does not actually make poll() function correctly. We're still passing > > HANDLE objects to the rpl_select() method, instead of calling > > the native select() method. > > I don't agree with your reasoning. The se

Re: [PATCH] poll: fix regression in Win32 emulation of poll function

2017-05-11 Thread Bruno Haible
Hi Daniel, > it does not actually make poll() function correctly. We're still passing > HANDLE objects to the rpl_select() method, instead of calling > the native select() method. I don't agree with your reasoning. The select() calls in lib/poll.c:511 and lib/poll.c:547 is not passing a HANDLE, r

Re: [PATCH] poll: fix regression in Win32 emulation of poll function

2017-05-11 Thread Daniel P. Berrange
On Thu, May 11, 2017 at 01:02:14PM +0100, Daniel P. Berrange wrote: > The previous commit: > > commit 17f1e64f00011fb745019119e21b26e4aba65e4b > Author: Paul Eggert > Date: Tue Feb 24 16:16:19 2015 -0800 > > poll: port to MSVC v18 on MS-Windows 8.1 > > Problem reported by Gisle

[PATCH] poll: fix regression in Win32 emulation of poll function

2017-05-11 Thread Daniel P. Berrange
The previous commit: commit 17f1e64f00011fb745019119e21b26e4aba65e4b Author: Paul Eggert Date: Tue Feb 24 16:16:19 2015 -0800 poll: port to MSVC v18 on MS-Windows 8.1 Problem reported by Gisle Vanem in: http://lists.gnu.org/archive/html/bug-gnulib/2015-02/msg00139.html *