RE: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-05-17 Thread Dave Korn
On 16 May 2006 21:36, Christian Franke wrote: > René Berber wrote: >>> Is there a more appropriate place to report patch bugs? >>> >> >> No, that address is the one listed (even if patch now is part of >> diffutils), see: >> >> http://www.gnu.org/software/diffutils/manual/html_node/Bugs.html

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-05-16 Thread Christian Franke
René Berber wrote: Is there a more appropriate place to report patch bugs? No, that address is the one listed (even if patch now is part of diffutils), see: http://www.gnu.org/software/diffutils/manual/html_node/Bugs.html#Bugs Page comment is "This manual is for GNU Diffutils (ver

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-05-16 Thread Eric Blake
> > Would you mind to discuss this on bug-patch AT gnu DOT org? As far > > as my opinion counts, I'd think that aligning its behaviour with tar > > would be a good thing. But the core developers might have an entirely > > different opinion... > > > > bug-patch is not listed at http://lists.gn

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-05-16 Thread René Berber
Christian Franke wrote: > bug-patch is not listed at http://lists.gnu.org/mailman/listinfo/. > Sending the report direct to bug-patch AT gnu DOT org, I've seen no > observable difference to /dev/null ;-) > > Is there a more appropriate place to report patch bugs? No, that address is the one list

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-05-16 Thread Christian Franke
Corinna Vinschen wrote: ... Would you mind to discuss this on bug-patch AT gnu DOT org? As far as my opinion counts, I'd think that aligning its behaviour with tar would be a good thing. But the core developers might have an entirely different opinion... bug-patch is not listed at http://l

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-04-26 Thread Christian Franke
Corinna Vinschen wrote: > I don't see what this has to do with gmtime/localtime since both > functions create a struct tm from a time_t, not the other way around. maketime() calculates time_t from tm by an iterative method using the inverse function. > > I just tested your testcase with patch-2.

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-04-26 Thread Corinna Vinschen
On Apr 26 11:14, Christian Franke wrote: > Peter Ekberg wrote: > > > If you thought about all that, maybe you also thought about leap > seconds? > > Isn't it valid to have 60 in the seconds field when a leap second is > added? > > Yes, this should be valid. > But maketime() does not provide porta

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-04-26 Thread Christian Franke
Peter Ekberg wrote: > If you thought about all that, maybe you also thought about leap seconds? > Isn't it valid to have 60 in the seconds field when a leap second is added? Yes, this should be valid. But maketime() does not provide portable support for it, because it relies on gmtime/localtime o

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-04-26 Thread Peter Ekberg
On Tue, Apr 25, 2006 at 11:33:52PM +0200, Christian Franke wrote: > Dave Korn wrote: > >... > >diff -rup patch-2.5.8-8.orig/partime.c patch-2.5.8-8/partime.c > >--- patch-2.5.8-8.orig/partime.c 2002-12-15 21:37:32.00100 +0100 > >+++ patch-2.5.8-8/partime.c 2006-04-25 12:14:59.797168500 +02

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-04-25 Thread Christian Franke
Dave Korn wrote: ... diff -rup patch-2.5.8-8.orig/partime.c patch-2.5.8-8/partime.c --- patch-2.5.8-8.orig/partime.c2002-12-15 21:37:32.00100 +0100 +++ patch-2.5.8-8/partime.c 2006-04-25 12:14:59.797168500 +0200 @@ -753,6 +753,8 @@ parse_pattern_letter (s, c, t) int frac;

RE: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-04-25 Thread Dave Korn
On 25 April 2006 12:16, Christian Franke wrote: > Hi, > > the patch 2.5.8-8 options -Z and -T do not set filetime if the seconds > part > of the timestamp is greater or equal 59.5 > This is because maketime() does not handle "denormalized" times and > returns an error on tm_sec = 60. > The attach

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-04-25 Thread Christian Franke
Corinna Vinschen wrote: On Apr 25 16:17, Christian Franke wrote: Corinna Vinschen wrote: Can you tell me exactly where the problem happens which leads to this patch, please? partime.c: ... parse_pattern_letter (s, c, t) ... case 's': /* second [00-60 followed by optional fractio

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-04-25 Thread Corinna Vinschen
On Apr 25 16:17, Christian Franke wrote: > Corinna Vinschen wrote: > > Can you tell me exactly where the problem > > happens which leads to this patch, please? > > partime.c: > ... > parse_pattern_letter (s, c, t) > ... > case 's': /* second [00-60 followed by optional fraction] */ > { > int

[OT] RE: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-04-25 Thread Dave Korn
On 25 April 2006 15:17, Christian Franke wrote: [ Note F-ups set ] > Corinna Vinschen wrote: > >> This doesn't look like a Cygwin specific problem. > > Agree, but the RCSID "$Id: partime.c,v ... corinna ...$" encourages me > to report the problem to this list first ;-) Then you're misinterpr

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-04-25 Thread Christian Franke
Corinna Vinschen wrote: > This doesn't look like a Cygwin specific problem. Agree, but the RCSID "$Id: partime.c,v ... corinna ...$" encourages me to report the problem to this list first ;-) > I don't see this in > patch-2.5.9, nor in any patched version from Fedora Core or SuSE Linux. > Did y

Re: [Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-04-25 Thread Corinna Vinschen
On Apr 25 13:15, Christian Franke wrote: > Hi, > > the patch 2.5.8-8 options -Z and -T do not set filetime if the seconds > part > of the timestamp is greater or equal 59.5 > This is because maketime() does not handle "denormalized" times and > returns an error on tm_sec = 60. > The attached patch

[Patch] patch -Z not working if timestamp contains seconds >=59.5

2006-04-25 Thread Christian Franke
Hi, the patch 2.5.8-8 options -Z and -T do not set filetime if the seconds part of the timestamp is greater or equal 59.5 This is because maketime() does not handle "denormalized" times and returns an error on tm_sec = 60. The attached patch is a quick fix (and a testcase ;-) for this issue. Chri