On Sun, Feb 04, 2007 at 01:10:26AM +0100, Paul Slootman <[EMAIL PROTECTED]>
wrote:
> > Fascinatingly enough, stat -c%Y says -1 seconds since the epoch.
>
> I think
wrong on all accounts :)
> that epoch - 1 is not really defined
well, it works on every unix system you'll find (except maybe the most
exotic ones). otherwise the famous year 2038 problem would not exist.
> presented with this is undefined...
You are contradicting yourself, too. When you interpret this 32 bit value as
unsigned its no longer -1, so you think of it both as undefined _and_ as
defined.
> > stat -c%Y says 4294967295 (0xffffffff, or less precisely, -1 & (2**32-1)).
> >
> > the source system is 32 bit, while the remote system is 64 bit, btw.
>
> time_t is actually an unsigned value I believe, so interpreting the
> 0xffffffff as a positive value would be the correct behaviour.
... while above you say its undefined.
In fact, there is little known about time_t regarding standards, it might
be a floating point type as well. All commo unix systems define it as a
signed type and handle it correctly, though.
> That said, I agree that rsync shouldn't repeatedly transfer this file.
Yes, its certainly a big in rsync, even if rsync adopts the (wrong)
assumption that time_t is always unsigned it it should not transfer the
file, so likely it does something like compare time_t with an unsigned
variable, which could easily lead to this bug. gcc has a warning option to
warn about such bug sources, which are pretty common.
> I'll investigate what the best course of action would be.
well, fix rsync to cope with time_t, or ignore the bug. there is little
else to do :) Of course, depending on how rsync works it might require a
protocol change. I don't know anything about that, and its certainly not a
major problem, so thanks a lot for your time and efforts in making rsync
so great as it is :)
--
The choice of a
-----==- _GNU_
----==-- _ generation Marc Lehmann
---==---(_)__ __ ____ __ [EMAIL PROTECTED]
--==---/ / _ \/ // /\ \/ / http://schmorp.de/
-=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]