Re: [PATCH] Use time_t for timestamps returned by approxidate() instead of unsigned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sat, 24 Jan 2009, Tim Henigan wrote:

> On Sat, Jan 24, 2009 at 11:58 AM, Johannes Schindelin
> <Johannes.Schindelin@xxxxxx> wrote:
>
> >> Should I update the GitWiki page to remove this Janitor task or do 
> >> you keep it as a test to see if people are properly searching the 
> >> mail archives?
> >
> > Yes, please!
> 
> I did some more digging and found this last comment on the subject by 
> Linus: https://kerneltrap.org/mailarchive/git/2008/11/6/4014344
> 
> Given this, should the janitor task simply be deleted (since using 
> unsigned longs are safe until year 2038 is considered) or should it be 
> updated to change all timestamps to 64-bit values?
> 
> Also, there are still ~37 references to time_t in the code (e.g. the 
> index_state struct in cache.h).  Should these be phased out in favor of 
> unsigned longs (or perhaps 64-bit types)?

Correct me if I am wrong: there are two different uses of times.  One to 
output dates (which is where we use unsigned long), and one where we 
compare dates in file stats (where we use time_t).

I haven't looked at the code, though, so this might be incorrect.

If it is correct, though, I think that we should stay with time_t for the 
cases where we have to compare to time_t anyway (as the stat() calls give 
us the time in that datatype).

BTW the Janitor task was added by Pasky, so he should say something.  
Pasky?

Ciao,
Dscho

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux