From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 100159,a6651c54e2ca158b X-Google-Attributes: gid100159,public X-Google-Thread: f53ba,a6651c54e2ca158b X-Google-Attributes: gidf53ba,public X-Google-Thread: 10e148,a6651c54e2ca158b X-Google-Attributes: gid10e148,public X-Google-Thread: 1164f8,a6651c54e2ca158b X-Google-Attributes: gid1164f8,public From: roberson@ibd.nrc.ca (Walter Roberson) Subject: Re: UNIX, UNIX everywhere... Date: 1998/09/22 Message-ID: <6u7b7b$o1b$1@canopus.cc.umanitoba.ca>#1/1 X-Deja-AN: 393541945 References: <1dflxih.1lumqqc1vbnn5sN@pec-95.au4.m.uunet.de> <6u48gr$i1i$1@vixen.cso.uiuc.edu> <6u5kbj$rlv$1@news.clinet.fi> Organization: National Research Council Canada Newsgroups: comp.sys.sgi.misc,comp.sys.mac.misc,comp.sys.ibm.pc.misc,comp.sys.dec In article <6u5kbj$rlv$1@news.clinet.fi>, Kristoffer Lawson wrote: :2038 is really not a problem. An abstract datatype has been used for :the number of seconds past epoch. Currently it's usually 32-bit, but :there's no reason to just switch to 64-bit. All well coded applications :will work fine (and who cares about badly coded?). You'd have to replace many binaries simultaneously -- you could not use your old binaries with the new time structure. At all. Unless, that is, you mark the new executables as being of a different variety, and you introduce a layer that switches system call structures according to whether an old or new executable was being used. Similar perhaps to the way SGI handled the COFF -> ELF transition: COFF binaries were actually handed back different structures than ELF binaries were for the same system calls, to accomedate widening of UIDs and such. You are going to have problems with all binary files that store timestamps as part of a record -- you have to rebuild the database using the new record width. As someone else pointed out, this includes all your filesystems. You are also going to have problems with any binaries that assume that time differences can be stored in 32 bits. Or even that time differences can be calculated at all (going to a 64 bit time_t does not imply that the system can do 64 bit arithmetic.) You might say that well-coded applications would not have assumed that times could be operated on arithmetically, but ANSI X.3-159 (aka ANSI C) explicitly requires (section 4.12.1) that clock_t and time_t are arithmetic types and POSIX.1 imports time_t from ANSI X.3-159. Thus, it has never been the case that time_t has actually been an "abstract datatype": the rule about it having to be an arithmetic type rules out any manner of structure or union or array, effectively constraining it to be a long or unsigned long (as 'long long' is an extension, not a part of ANSI C.) Thus, in standards-conformant programs, you cannot go beyond 2038 without either changing your epoch or else changing your ABI so that long is more than 32 bits.