> If the time() function is correctly working under Linux there shouldn't
> be any problem until 2038. time() returns the time since 00:00:00 GMT,
> January 1, 1970, measured in seconds and stores this in a 32 bit long
> int. So if everything is done right with the filesystems and other stuff
Not quite so. time(2) returns a time_t value and time_t is NOT defined to be a
32-bit integer. It is dependent on the OS what size does time_t have. So every
code which expects and uses time_t and doesn't cast it to a 32 bit (or
smaller) integer, will work just fine. The current Linux kernels use a native
integer size of the underlying architecture as the return type of the sys_time
call, but I think there should be no problem changing it to a hard-coded
64-bit integer if such need arises.
l8r, marek
--- "Little prigs and three-quarter madmen may have the conceit that the laws of nature are constantly broken for their sakes." Friedrich Nietzsche
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu