RFC: time_t declaration

Bruno Haible bruno@clisp.org
Wed, 1 Dec 2004 18:08:47 +0100


Robert Millan wrote:
> Well I checked that Glibc declares
> time_t as "long int" on all linux-gnu platforms, which AFAIK is always
> 32bit. Are 64bit linux-gnu ports screwed?

Nope. On all Unix platforms, "int" is always 32 bit, and "long int" is
the same width as a "void *", namely 64-bit on 64-bit platforms.

> x86_64, sparc64 and ia64 all have int64_t.  So importing it from
> kfreebsd headers (32bit on i386/alpha/arm/powerpc and 64bit on
> x86_64/sparc64/ia64) is the way to go?

Yes, I agree.

Bruno