Re: mingw: test-poll pipe part fails

2011-06-30 Thread Paolo Bonzini
On 06/30/2011 07:56 PM, Eric Blake wrote: > Yes, Windows pipes are that broken.:( > > Using socketpair is a possibly good idea, but I would do it on > libvirtd only. I don't know exactly how libvirtd uses this pipe, but > perhaps it can be changed to an eventfd-like abstraction that can be >

[PATCH 2/5] * lib/timespec.h (timespectod): New inline function.

2011-06-30 Thread Paul Eggert
--- ChangeLog |2 +- lib/timespec.h |7 +++ 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31e04e8..0f37252 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 2011-06-30 Paul Eggert - * lib/timespec.h (timespec_sign): New

[PATCH 3/5] dtotimespec: new module

2011-06-30 Thread Paul Eggert
* lib/timespec.h (dtotimespec): New decl. * lib/dtotimespec.c, modules/dtotimespec: New files. --- ChangeLog |4 +++ lib/dtotimespec.c | 69 +++ lib/timespec.h |2 + modules/dtotimespec | 25 ++ 4 files ch

[PATCH 4/5] timespec-add, timespec-sub: new modules

2011-06-30 Thread Paul Eggert
* lib/timespec.h (timespec_add, timespec_sub): New decls. * lib/timespec-add.c, lib/timespec-sub.c: * modules/timespec-add, modules/timespec-sub: New files. --- ChangeLog|5 +++ lib/timespec-add.c | 71 + lib/timespec-sub.c |

[PATCH 5/5] xnanosleep: Rewrite to use new dtotimespec module.

2011-06-30 Thread Paul Eggert
It has the conversion code that used to be in xnanosleep. * lib/xnanosleep.c: Do not include limits.h, stdbool.h, stdio.h, assert.h, sys/types.h, or intprops.h. Include timespec.h instead. (TIME_T_MAX): Remove. (xnanosleep): Rewrite in terms of dtotimespec. * modules/xnanosleep (Depends-on): Add d

[PATCH 1/5] * lib/timespec.h (timespec_sign): New inline function.

2011-06-30 Thread Paul Eggert
--- ChangeLog |2 ++ lib/timespec.h |8 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index e68d676..31e04e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2011-06-30 Paul Eggert + * lib/timespec.h (timespec_sign): N

[PATCH]: pselect: new module

2011-06-30 Thread Paul Eggert
I pushed this; it's for Emacs, but I expect other applications can use nanosecond-resolution 'select' as well. No doubt there will be porting glitches. I've tested it on Solaris 8 (!) and Fedora 14 for starters. pselect: new module * lib/sys_select.in.h: Include , for 'sigset_t'. (pselect): New

Re: lib/poll.c bug?

2011-06-30 Thread Erik Faye-Lund
On Thu, Jun 30, 2011 at 7:51 PM, Eric Blake wrote: > On 06/29/2011 11:31 AM, Erik Faye-Lund wrote: >> POSIX says the following about poll "A value of 0 indicates that the >> call timed out and no file descriptors have been selected.". My >> interpretation is that a return value of 0 would be illeg

Re: would like to break sys_select's dependency on sys_socket

2011-06-30 Thread Paul Eggert
On 06/30/11 04:45, Simon Josefsson wrote: > Is it native Windows or MinGW? Sorry, I don't know Windows well enough to answer that question. For Emacs, Windows support is done completely differently: it doesn't use gnulib, and it is done by other people, and I try to avoid thinking about it as much

Re: lib/poll.c bug?

2011-06-30 Thread Eric Blake
On 06/29/2011 11:31 AM, Erik Faye-Lund wrote: > POSIX says the following about poll "A value of 0 indicates that the > call timed out and no file descriptors have been selected.". My > interpretation is that a return value of 0 would be illegal when > timeout = -1. > > But when I call poll(..., -1

Re: mingw: test-poll pipe part fails

2011-06-30 Thread Eric Blake
[adding libvirt] On 06/04/2011 12:24 AM, Paolo Bonzini wrote: > On Sat, Jun 4, 2011 at 00:37, Matthias Bolte > wrote: >> After testing a while and reading MSDN docs the problem seems to be >> that MsgWaitForMultipleObjects doesn't work on pipes. It doesn't >> actually wait but just returns immedi

Re: would like to break sys_select's dependency on sys_socket

2011-06-30 Thread Eric Blake
On 06/30/2011 05:45 AM, Simon Josefsson wrote: > Paul Eggert writes: > >> I am planning to make some changes to GNU Emacs which the >> gnulib sys_select module would be helpful for. But sys_select >> depends on sys_socket, and that drags in some stuff >> like m4/sockpfaf.m4 and m4/sys_uio_h.m4 t

Re: RE : Re: [PATCH] pipe, pipe2: don't corrupt fd on error

2011-06-30 Thread Eric Blake
On 06/29/2011 11:22 PM, Bastien ROUCARIES wrote: > Could we raise the same issue with socketpair to austin group ? Good point, I'll go ahead and test that scenario as well. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization library http://libvirt.org signature.asc Des

Re: would like to break sys_select's dependency on sys_socket

2011-06-30 Thread Simon Josefsson
Paul Eggert writes: > I am planning to make some changes to GNU Emacs which the > gnulib sys_select module would be helpful for. But sys_select > depends on sys_socket, and that drags in some stuff > like m4/sockpfaf.m4 and m4/sys_uio_h.m4 that I'd rather > avoid. Any objection if I remove this

Re: would like to break sys_select's dependency on sys_socket

2011-06-30 Thread Bastien ROUCARIES
On Thu, Jun 30, 2011 at 11:32 AM, Paul Eggert wrote: > I am planning to make some changes to GNU Emacs which the > gnulib sys_select module would be helpful for.  But sys_select > depends on sys_socket, and that drags in some stuff > like m4/sockpfaf.m4 and m4/sys_uio_h.m4 that I'd rather > avoid.

would like to break sys_select's dependency on sys_socket

2011-06-30 Thread Paul Eggert
I am planning to make some changes to GNU Emacs which the gnulib sys_select module would be helpful for. But sys_select depends on sys_socket, and that drags in some stuff like m4/sockpfaf.m4 and m4/sys_uio_h.m4 that I'd rather avoid. Any objection if I remove this dependency? It appears that it