[Slackbuilds-users] 32-bit fails

B. Watson urchlay at slackware.uk
Sun Mar 27 15:24:32 UTC 2022



On Sun, 27 Mar 2022, B. Watson wrote:

> Actually... I looked into it a bit more... we *have* 64-bit time_t
> support in glibc, on Slackware 15.0. It works like large file
> support, you "#define _TIME_BITS 64" before including <sys/types.h>
> or <time.h>. Doesn't break the ABI, it causes your code to be
> compiled with 64-bit versions of the time-related functions (e.g.
> you write "gettimeofday" and what really gets compiled is a call to a
> gettimeofday64() function).

Grrrr. Ignore all that I said in that email. It doesn't actually
work, we would need a newer glibc for that.

I was looking at the manual for glibc-2.35, but our glibc is 2.33.

And I thought it worked because I was doing my test compile in the
wrong terminal: *not* the one for my 32-bit chroot. Of course my test
program said sizeof(time_t) is 8, I was running it on 64-bit.

On an *actual* 32-bit Slackware 15.0 system, sizeof(time_t) is
still 4 bytes (32-bit), regardless of any -D_FILE_OFFSET_BITS=64
-D_TIME_BITS=64 stuff.

This is why I shouldn't try to think before I've digested at least 2
cups of coffee.


More information about the SlackBuilds-users mailing list