On Mon, 5 Oct 2020, Christian Weisgerber wrote:

There's an #ifdef __LP64__ ...

Yes. That is not to oversee, but I oversaw it, because I wanted to
oversee it.

For lazyness I use snprintf to fill the mtime field of a component of
a v7 tar file I generate:

snprintf(&hd[136],12,"%011lo", time(NULL));

This was not a problem in FreeBSD, where I wrote the program.
But when I compiled it in OpenBSD, I got an error: time(NULL)
is long long, lo is only long. I thought (without thinking too
much) that this is because sizes are different, and I saw the
included files (without seeing too much) and found a (false)
explanation.

Back to tar files: there is place for 11 octal digits, that is
only twice the time you can count with 32 bits, in years:

2^33/(60*60*24*365.25*2)=136.09930083403047126524

Also not too much. Is it not a better solution to begin a new epoch
every 68.05 years? We can do a big celebration at the beginning of
each new epoch.

Rod.

Reply via email to