develooper Front page | perl.perl6.language.datetime | Postings from August 2000

Re: RFC 99 (v2) Standardize ALL Perl platforms on UNIX epoch

Thread Previous | Thread Next
From:
Alan Burlison
Date:
August 23, 2000 03:13
Subject:
Re: RFC 99 (v2) Standardize ALL Perl platforms on UNIX epoch
Message ID:
39A3A1DA.7E252434@uk.sun.com
Russ Allbery wrote:

> > Or, if we're gonna not go along with the standard time_t, might as well
> > make it 64.
> 
> 32 bits is clearly insufficient; I would support that.

Be aware that perl5 already will support a 64-bit time_t if it is
compiled as a 64 bit application.  This is because time_t is defined as
long, and on LP64 platforms (the majority of 64 bit platforms are I
think), long becomes 64 bit when apps are compiled to be 64 bit:

$ cat t.c
#include <sys/types.h>
int main() { printf("time_t is %d bits\n", sizeof(time_t) * 8); }
$ cc -o t t.c
$ file t
t:              ELF 32-bit MSB executable SPARC Version 1, dynamically
linked, not stripped
$ ./t
time_t is 32 bits
$ cc -o t t.c -xarch=v9
$ file t
t:              ELF 64-bit MSB executable SPARCV9 Version 1, dynamically
linked, not stripped
$ ./t
time_t is 64 bits

-- 
Alan Burlison

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About