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 1:27 AM, Johannes Schindelin
> <Johannes.Schindelin@xxxxxx> wrote:
> >
> > On Thu, 22 Jan 2009, Tim Henigan wrote:
> >
> > > Use time_t for timestamps returned by approxidate() instead of 
> > > unsigned long.  All references to approxidate were checked as well 
> > > as references to OPT_DATE.
> >
> > Hmm.  I vaguely remember Linus mentioning recently that unsigned long 
> > is the appropriate data type for the Unix Epoch...
> 
> You are correct. I just found a post on this list where Linus 
> specifically rejected a similar patch from another contributor.  A quote 
> from https://kerneltrap.org/mailarchive/git/2008/11/6/4014124:
> 
>     " "time_t" is one of those totally broken unix types. The standards 
>     say that it's an "arithmetic" type, but leaves it open to be just 
>     about anything. Traditionally, it's a signed integer (bad), and in 
>     theory it could even be a floating point value, I think.
> 
>     And in _all_ such cases, it's actually better to cast it to 
>     "unsigned long" than keep time in a system-dependent format that is 
>     most likely either _already_ "unsigned long", or alternatively 
>     broken."

Thanks.  I should have searched that post myself, but I was too tired...

> 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!

> Sorry to waste your time on the patch review.

Sorry that we wasted your time by letting that page go stale...

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