Re: [libvirt] [PATCH] Pass a correct pointer type to localtime_r(3).

2012-09-04 Thread Eric Blake
On 09/04/2012 11:03 AM, Paul Eggert wrote: > > For this particular case, though, how about if we avoid > the problem entirely? libvirt doesn't need to use struct > timeval here at all. I'd use the following (untested) patch: > it makes libvirt smaller and probably faster, and it ports > to OpenB

Re: [libvirt] [PATCH] Pass a correct pointer type to localtime_r(3).

2012-09-04 Thread Jasper Lievisse Adriaanse
On Tue, Sep 04, 2012 at 10:03:41AM -0700, Paul Eggert wrote: > On 09/04/2012 08:20 AM, Eric Blake wrote: > > tv_sec is required by POSIX to be > > of type time_t; so this is a bug in the OpenBSD header > > Most likely this problem arose because of the patch I pushed > in gnulib commit e07d7c40f3ca

Re: broken OpenBSD [was: [libvirt] [PATCH] Include some extra headers needed for OpenBSD.]

2012-09-04 Thread Jasper Lievisse Adriaanse
On Tue, Sep 04, 2012 at 11:08:30AM -0600, Eric Blake wrote: > [adding gnulib] > > On 09/04/2012 10:52 AM, Jasper Lievisse Adriaanse wrote: > >> I'd still like to know the compiler error you got when > >> was not present, but just guessing from the source code, I see one call > >> of socket() (pro

Re: [libvirt] [PATCH] Pass a correct pointer type to localtime_r(3).

2012-09-04 Thread Jasper Lievisse Adriaanse
On Tue, Sep 04, 2012 at 09:20:24AM -0600, Eric Blake wrote: > [adding bug-gnulib] > > On 09/04/2012 08:49 AM, Jasper Lievisse Adriaanse wrote: > >>From b53dc971cc50b5ac397e4568449d25041477c8d6 Mon Sep 17 00:00:00 2001 > > From: Jasper Lievisse Adriaanse > > Date: Tue, 4 Sep 2012 16:47:26 +0200 >

Re: broken OpenBSD [was: [libvirt] [PATCH] Include some extra headers needed for OpenBSD.]

2012-09-04 Thread Eric Blake
On 09/04/2012 11:23 AM, Jasper Lievisse Adriaanse wrote: > On Tue, Sep 04, 2012 at 11:08:30AM -0600, Eric Blake wrote: >> [adding gnulib] >> >> Ouch. The POSIX definition of doesn't include any interface >> that needs to use struct sockaddr. Which OpenBSD extension function is >> triggering this

broken OpenBSD [was: [libvirt] [PATCH] Include some extra headers needed for OpenBSD.]

2012-09-04 Thread Eric Blake
[adding gnulib] On 09/04/2012 10:52 AM, Jasper Lievisse Adriaanse wrote: >> I'd still like to know the compiler error you got when >> was not present, but just guessing from the source code, I see one call >> of socket() (protected behind #if defined(HAVE_NET_IF_H) && >> defined(SIOCBRADDBR), but

Re: [libvirt] [PATCH] Pass a correct pointer type to localtime_r(3).

2012-09-04 Thread Paul Eggert
On 09/04/2012 08:20 AM, Eric Blake wrote: > tv_sec is required by POSIX to be > of type time_t; so this is a bug in the OpenBSD header Most likely this problem arose because of the patch I pushed in gnulib commit e07d7c40f3ca5ec410cf5aa6fa03cfe51e712039. Previously, gnulib required timeval's tv_se

Re: [libvirt] [PATCH] Pass a correct pointer type to localtime_r(3).

2012-09-04 Thread Eric Blake
On 09/04/2012 10:32 AM, Jasper Lievisse Adriaanse wrote: > On Tue, Sep 04, 2012 at 09:20:24AM -0600, Eric Blake wrote: >> [adding bug-gnulib] >> >> NACK from the libvirt point of view. tv_sec is required by POSIX to be >> of type time_t; so this is a bug in the OpenBSD header, and gnulib >> shoul

Re: [libvirt] [PATCH] Pass a correct pointer type to localtime_r(3).

2012-09-04 Thread Eric Blake
[adding bug-gnulib] On 09/04/2012 08:49 AM, Jasper Lievisse Adriaanse wrote: >>From b53dc971cc50b5ac397e4568449d25041477c8d6 Mon Sep 17 00:00:00 2001 > From: Jasper Lievisse Adriaanse > Date: Tue, 4 Sep 2012 16:47:26 +0200 > Subject: [PATCH] Pass a correct pointer type to localtime_r(3). > > Fix

Re: [PATCH] fts: reduce two or more trailing spaces to just one, usually

2012-09-04 Thread Jim Meyering
Eric Blake wrote: > On 09/04/2012 04:57 AM, Eric Blake wrote: >>> * lib/fts.c (fts_open): Upon initialization, if a name ends in two >>> or more slashes, trim all but the final one. But if a name consists >>> solely of two or more slashes, reduce it to "//", not to "/". >> >> For two slashes, tha

Re: [PATCH] fts: reduce two or more trailing spaces to just one, usually

2012-09-04 Thread Eric Blake
On 09/04/2012 05:09 AM, Jim Meyering wrote: > Eric Blake wrote: >> On 09/04/2012 04:57 AM, Eric Blake wrote: * lib/fts.c (fts_open): Upon initialization, if a name ends in two or more slashes, trim all but the final one. But if a name consists solely of two or more slashes, reduce i

Re: [PATCH] fts: reduce two or more trailing spaces to just one, usually

2012-09-04 Thread Jim Meyering
Eric Blake wrote: > On 09/04/2012 04:57 AM, Eric Blake wrote: >>> * lib/fts.c (fts_open): Upon initialization, if a name ends in two >>> or more slashes, trim all but the final one. But if a name consists >>> solely of two or more slashes, reduce it to "//", not to "/". >>> >> >> For two slashes,

Re: [PATCH] fts: reduce two or more trailing spaces to just one, usually

2012-09-04 Thread Jim Meyering
Eric Blake wrote: > On 09/04/2012 04:57 AM, Eric Blake wrote: >>> * lib/fts.c (fts_open): Upon initialization, if a name ends in two >>> or more slashes, trim all but the final one. But if a name consists >>> solely of two or more slashes, reduce it to "//", not to "/". >>> >> >> For two slashes,

Re: [PATCH] fts: reduce two or more trailing spaces to just one, usually

2012-09-04 Thread Eric Blake
On 09/04/2012 04:57 AM, Eric Blake wrote: >> * lib/fts.c (fts_open): Upon initialization, if a name ends in two >> or more slashes, trim all but the final one. But if a name consists >> solely of two or more slashes, reduce it to "//", not to "/". >> > > For two slashes, that is correct. But tri

Re: [PATCH] fts: reduce two or more trailing spaces to just one, usually

2012-09-04 Thread Eric Blake
On 09/04/2012 04:24 AM, Jim Meyering wrote: >>From 99376a06eed07ded17919384cf1d633e43ad1bd0 Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Tue, 4 Sep 2012 11:36:38 +0200 > Subject: [PATCH] fts: reduce two or more trailing spaces to just one, usually > > * lib/fts.c (fts_open): Upon initial

Re: [PATCH] fts: when there is no risk of overlap, use memcpy, not memmove

2012-09-04 Thread Jim Meyering
Stefano Lattarini wrote: > On 09/04/2012 12:21 PM, Jim Meyering wrote: >> While investigating the rm-vs-slash-decorated-symlink-to-dir problem, >> I noticed this: >> >> From 9322cc5db3a6efe4c19f274512a28767872384e4 Mon Sep 17 00:00:00 2001 >> From: Jim Meyering >> Date: Tue, 4 Sep 2012 11:31:09 +

Re: [PATCH] fts: when there is no risk of overlap, use memcpy, not memmove

2012-09-04 Thread Stefano Lattarini
On 09/04/2012 12:21 PM, Jim Meyering wrote: > While investigating the rm-vs-slash-decorated-symlink-to-dir problem, > I noticed this: > > From 9322cc5db3a6efe4c19f274512a28767872384e4 Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Tue, 4 Sep 2012 11:31:09 +0200 > Subject: [PATCH] fts: when

Re: [PATCH] fts: reduce two or more trailing spaces to just one, usually

2012-09-04 Thread Jim Meyering
Jim Meyering wrote: ... > Subject: [PATCH] fts: reduce two or more trailing spaces to just one, usually Glad I noticed the typo in that summary before pushing: s/spaces/slashes/

[PATCH] fts: reduce two or more trailing spaces to just one, usually

2012-09-04 Thread Jim Meyering
FYI, this is part of the solution to a minor problem with rm: it would print a bogus ELOOP diagnostic when failing to remove the slash-decorated name of a symlink-to-directory: $ mkdir d && ln -s d s && env rm -r s/ rm: cannot remove 's': Too many levels of symbolic links With the change

[PATCH] fts: when there is no risk of overlap, use memcpy, not memmove

2012-09-04 Thread Jim Meyering
While investigating the rm-vs-slash-decorated-symlink-to-dir problem, I noticed this: >From 9322cc5db3a6efe4c19f274512a28767872384e4 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 4 Sep 2012 11:31:09 +0200 Subject: [PATCH] fts: when there is no risk of overlap, use memcpy, not memmove *