From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f53ba,a6651c54e2ca158b X-Google-Attributes: gidf53ba,public X-Google-Thread: 100159,a6651c54e2ca158b X-Google-Attributes: gid100159,public X-Google-Thread: 10e148,a6651c54e2ca158b X-Google-Attributes: gid10e148,public X-Google-Thread: 1164f8,a6651c54e2ca158b X-Google-Attributes: gid1164f8,public From: Kristoffer Lawson Subject: Re: UNIX, UNIX everywhere... Date: 1998/09/22 Message-ID: <6u7h8t$kd7$1@news.clinet.fi>#1/1 X-Deja-AN: 393561029 References: <1dflxih.1lumqqc1vbnn5sN@pec-95.au4.m.uunet.de> <6u48gr$i1i$1@vixen.cso.uiuc.edu> <6u5kbj$rlv$1@news.clinet.fi> <6u7b7b$o1b$1@canopus.cc.umanitoba.ca> Organization: Clinet, Espoo, Finland. User-Agent: tin/pre-1.4-971106 (UNIX) (IRIX/6.3 (IP32)) Newsgroups: comp.sys.sgi.misc,comp.sys.mac.misc,comp.sys.ibm.pc.misc,comp.sys.dec In comp.sys.sgi.misc Walter Roberson wrote: : 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. Is it not feasible that the libraries use 64bit values bit but with applications that use 32bit time_ts you would then only see the lower 32 bits. Obviously then you would have wrong dates with all old applications after 2038 (unless the interpretation of time_t was changed) but at least they would run. I'd say the change to 64bit time_t should be done a decade ahead of time. Plenty of time to recompile any problematic programs. : 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. True, but doing this well in advance solves the problem with relatively little hassle (XFS2, or whatever SGI would want to call it). : 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. Well actually the C9X standard will include long long as an arithmetic type. This is IMO unfortunate as it's an ugly kludge and mainly exists in the first place for applications which have been written incorrectly (changing the implementation so that long was 64bits would be cleaner). Still, it will be there and although nothing guarantees long long will be 64bits, in most cases it will allow an implementation to define time_t as a long long. Really I don't see a problem even if long long didn't exist as after some time pretty much all computers will have processors supporting 64bit arithmetics so just changing long to be 64bits would solve that problem. Of course there will be hassle with this particular issue but we can only hope UNIX vendors have the sense to deal with it well before the critical date. -- - ---------- = = ---------//--+ | / Kristoffer Lawson | www.fishpool.com +-> | setok@fishpool.com | - - --+ |-- Fishpool Creations Ltd - / | +-------- = - - - = --------- /~setok/