NetBSD-Users archive

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

Trouble with 64-bit time_t on 6.0_STABLE

Hi All,

In 6.0_STABLE, time_t is now 64 bits.
My C code can be compiled certainly.
But in terms of data files, time_t was stored as 32-bit signed int in many 
struct(s) written to many data files.
So my app will always expect 32-bit time_t when reading data from the disk.
And my app has long been being used with a lot of data files in the disk.
If I recompile my app on 6.0_STABLE, it will expect 64-bit time_t when reading.
So I will end up with unusable data files.
(Now I'm still using the binaries compiled by 5.1_STABLE.)
It's good to have such a big time_t, which will never overflow during universe 
life time.
But what if this kind of problem comes up?

I will check if there is any workaround.
Any suggestions are welcome.

Pongthep Kulkrisada
"UNIX is basically a simple operating system,
but you have to be a genius to understand the simplicity."
-- Dennis M. Ritchie

Home | Main Index | Thread Index | Old Index