Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Simon Josefsson
"Richard W.M. Jones" <[EMAIL PROTECTED]> writes: > I have a general question: Does Gnulib get any sort of nightly > build/test? On [real] Windows machines? http://autobuild.josefsson.org/gnulib/ There is a mingw+wine build, but not a real Windows build. If you or anyone can setup and maintain

Re: [PATCH] fts.m4: correct the test for statfs.f_type

2008-10-01 Thread Bruno Haible
Hi Jim, > If someone is interested enough to time things on HP-UX > and finds that there's a file system type (probably memory backed) > that it'd be good to exempt, then it might be worthwhile to > pursue this. I didn't mean to discuss for which filesystems on HP-UX which optimization may be wor

posix_spawn on AIX

2008-10-01 Thread Bruno Haible
Hi, posix_spawn exists on AIX 5.3 and 6.1, but it is unusable. Rainer Tammer identified two bugs: - failure to execute any program in the child process, when the parent program uses POSIX threads. - when the child process fails to execute the given program, it outputs the stdio buffers

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Bruno Haible
Jim Meyering wrote: > > Should this also depend on the errno module? > > I wondered, but figured it's not needed since the code is > windows-specific. The 'errno' module is useful on mingw, but is also useful on Unix platforms like OpenBSD and OSF/1. The 'errno' module is not needed here because

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Bruno Haible
Richard W.M. Jones wrote: > This patch implements fsync for Windows. Nice and quite well done. Bravo for having understood the many idioms used in gnulib. Just two minor comments: - The phrase "cross-compilers like MinGW" is misleading. MinGW is is often used natively, not cross-compiled.

fts: bug fixes

2008-10-01 Thread Jim Meyering
This propagates a change from coreutils and also fixes a typo in fts.m4: diff --git a/lib/fts.c b/lib/fts.c index 95d0c7a..a55a98d 100644 --- a/lib/fts.c +++ b/lib/fts.c @@ -934,8 +934,8 @@ fts_children (register FTS *sp, int instr) return (sp->fts_child); } -#if defined HAVE_SYS_VFS_H &

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Richard W.M. Jones
I have a general question: Does Gnulib get any sort of nightly build/test? On [real] Windows machines? And a general comment: Some work colleagues and I are working on a Windows cross-compiler project for Fedora[1]. The number one big porting problem has been lack of flock/lockf/fcntl file locki

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Richard W.M. Jones
On Wed, Oct 01, 2008 at 05:51:23PM +, Eric Blake wrote: > Richard W.M. Jones redhat.com> writes: > > > > > Like the earlier patch, but this relicenses to LGPLv2+, includes > > license text, and assigns everything to the FSF. > > Do you have copyright on file for gnulib yet? No, but the gen

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Jim Meyering
Jim Meyering <[EMAIL PROTECTED]> wrote: > Eric Blake <[EMAIL PROTECTED]> wrote: >> Richard W.M. Jones redhat.com> writes: >>> Like the earlier patch, but this relicenses to LGPLv2+, includes >>> license text, and assigns everything to the FSF. > > Addressing Eric's feedback, and tweaking copyright

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Jim Meyering
Eric Blake <[EMAIL PROTECTED]> wrote: > Richard W.M. Jones redhat.com> writes: >> Like the earlier patch, but this relicenses to LGPLv2+, includes >> license text, and assigns everything to the FSF. Addressing Eric's feedback, and tweaking copyright and a comment, FYI, this is the incremental I'm

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Jim Meyering
Eric Blake <[EMAIL PROTECTED]> wrote: > Richard W.M. Jones redhat.com> writes: >> Like the earlier patch, but this relicenses to LGPLv2+, includes >> license text, and assigns everything to the FSF. > > Do you have copyright on file for gnulib yet? No. Technically he doesn't need it, since the wo

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Eric Blake
Richard W.M. Jones redhat.com> writes: > > Like the earlier patch, but this relicenses to LGPLv2+, includes > license text, and assigns everything to the FSF. Do you have copyright on file for gnulib yet? > --- a/NEWS > +++ b/NEWS > @@ -6,6 +6,8 @@ User visible incompatible changes > > Date

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Jim Meyering
"Richard W.M. Jones" <[EMAIL PROTECTED]> wrote: > Like the earlier patch, but this relicenses to LGPLv2+, includes > license text, and assigns everything to the FSF. This looks fine. Thanks, Rich. I'll wait for feedback, then push tomorrow morning.

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Richard W.M. Jones
Like the earlier patch, but this relicenses to LGPLv2+, includes license text, and assigns everything to the FSF. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my OCaml programming blog: http://camltastic.blogspot.com/ Fedora now supports 68 OCaml pack

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Richard W.M. Jones
Updated patch, including Jim's tests and also a note pointing to the original sources in sqlite. Rich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones Read my OCaml programming blog: http://camltastic.blogspot.com/ Fedora now supports 68 OCaml packages (the OPEN a

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Richard W.M. Jones
On Wed, Oct 01, 2008 at 06:06:31PM +0200, Jim Meyering wrote: > To make gnulib-tool's --with-tests option work, you can add > this to your change set: OK, I tried your suggested patch and the tests passed under Linux and under the Fedora cross-compiler / Wine environment. I'm unable to test it on

Re: [PATCH] Implementation of fsync for Windows

2008-10-01 Thread Jim Meyering
"Richard W.M. Jones" <[EMAIL PROTECTED]> wrote: > This patch implements fsync for Windows. > > I tested it using MinGW cross-compiler from a Fedora host, and wine > instead of Windows: > > ./gnulib-tool --create-testdir --dir=/tmp/testdir fsync > > [Verify it configures & builds normally on Lin

Re: [PATCH] fts.m4: correct the test for statfs.f_type

2008-10-01 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: >> I noticed that the configure-time test for the f_type member >> of struct statfs was failing on some systems. >> >> It didn't include . >> I've pushed the obvious fix: > > This introduces a regression on HP-UX. > > The use of HAVE_STRUCT_STATFS_F_TYPE is p

[PATCH] Implementation of fsync for Windows

2008-10-01 Thread Richard W.M. Jones
This patch implements fsync for Windows. I tested it using MinGW cross-compiler from a Fedora host, and wine instead of Windows: ./gnulib-tool --create-testdir --dir=/tmp/testdir fsync [Verify it configures & builds normally on Linux, then ...] [Create a test program, test.c (attached).

Re: [PATCH v2] implement full-blown select(2) for winsock

2008-10-01 Thread Paolo Bonzini
Bruno Haible wrote: > Paolo Bonzini wrote: >> I agree, but it seems like pipe WaitForSingleObject is broken. You'd >> need a thread polling with PeekNamedPipe, or a busy-waiting loop in the >> main thread altogether. > > Maybe we need to reset the pipe from "signaled" to "non-signaled" state > af

Re: [PATCH v2] implement full-blown select(2) for winsock

2008-10-01 Thread Bruno Haible
Paolo Bonzini wrote: > I agree, but it seems like pipe WaitForSingleObject is broken. You'd > need a thread polling with PeekNamedPipe, or a busy-waiting loop in the > main thread altogether. Maybe we need to reset the pipe from "signaled" to "non-signaled" state after [Msg]WaitFor..Objects retur

Re: [PATCH v2] implement full-blown select(2) for winsock

2008-10-01 Thread Paolo Bonzini
> No, please. I don`t need sockets. For communication with a subprocess, all > I need is a pipe. Sockets would be an overkill for that. I agree, but it seems like pipe WaitForSingleObject is broken. You'd need a thread polling with PeekNamedPipe, or a busy-waiting loop in the main thread altoget

[PATCH] fts.c: adjust a new interface to be more generally useful

2008-10-01 Thread Jim Meyering
I'm preparing to pull this code out into its own module, since it's already used by coreutils' remove.c. >From 2c65e30590ff468ad1e94df2c30ca4bfa9ce98d5 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[EMAIL PROTECTED]> Date: Wed, 1 Oct 2008 09:22:11 +0200 Subject: [PATCH] fts.c: adjust a new interfac