Re: year 2038 problem on x86-64

Pavel Machek
2004-09-22T21:48:28Z

Hi!

> For testing (read() and write() is returning wrong value on 2.4
> kernels) I played a bit with really big numbers... And I found out we
> have year 9223372034708485227 problem ;-).

And we have some nearer problems, too.

#ifdef __ARCH_WANT_SYS_TIME

/*
* sys_time() can be implemented in user-level using
* sys_gettimeofday(). Is this for backwards compatibility? If so,
* why not move it into the appropriate arch directory (for those
* architectures that need it).
*
* XXX This function is NOT 64-bit clean!
*/
asmlinkage long sys_time(int __user * tloc)
{
int i;
struct timeval tv;

do_gettimeofday(&tv);
i = tv.tv_sec;

if (tloc) {
if (put_user(i,tloc))
i = -EFAULT;
}
return i;
}

... __ARCH_WANT_SYS_TIME actually is set on x86-64.
Pavel