Re: time_t size: The year 2038 bug?

From: Glen Turner (glen.turner@aarnet.edu.au)
Date: Wed Jan 05 2000 - 22:00:32 EST


Hannu Savolainen wrote:
>
> Another approach is making time_t to be 32 bit unsigned int which gives
> about 70 more years.

ANSI/ISO C defines time_t as a signed arithmetic type, so
such a change would break correct code.

Note that the use of types not listed in the standard
as the base type for time_t will also break correct code.
This includes _long _long.

Personally, I'd wait for the new ISO C's "long long" type
and use that as the base type of time_t. This would be 64
bits on a 32 bit architecture.

doug@springer.net wrote:
>
> Why the heck can't we just fix the issue now?

Fixing the problem now requires increasing the size of "long"
where it is currently 32 bits. This probably isn't a good idea.

-- 
 Glen Turner                                 Network Engineer
 (08) 8303 3936      Australian Academic and Research Network
 glen.turner@aarnet.edu.au          http://www.aarnet.edu.au/
--
 Earth is a single point of failure

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jan 07 2000 - 21:00:05 EST