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: 1164f8,a6651c54e2ca158b X-Google-Attributes: gid1164f8,public X-Google-Thread: 10e148,a6651c54e2ca158b X-Google-Attributes: gid10e148,public From: peter@baileynm.com (Peter da Silva) Subject: The Year 2038 problem. Re: UNIX, UNIX everywhere... Date: 1998/09/22 Message-ID: <6u85mb$sc7@web.nmti.com>#1/1 X-Deja-AN: 393626404 References: <6u48gr$i1i$1@vixen.cso.uiuc.edu> <6u5kbj$rlv$1@news.clinet.fi> <6u7b7b$o1b$1@canopus.cc.umanitoba.ca> Organization: Bailey Network Management Newsgroups: comp.sys.sgi.misc,comp.sys.mac.misc,comp.sys.ibm.pc.misc,comp.sys.dec In article <6u7b7b$o1b$1@canopus.cc.umanitoba.ca>, Walter Roberson wrote: >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. The latter is true, but the former isn't. You just assign new system call numbers to the "wide time" system calls, and after enough time you stop providing the old ones. There's nothing sacred or magic about system call numbers, and the major/minor shared library version handles the system library routines that know about times. The tough part as you say are binary file formats. I think a flag day there is inevitable. >You are also going to have problems with any binaries that assume that >time differences can be stored in 32 bits. There shouldn't be too many of those. There are a lot of programs that assume time differences can be stored in "a long", but hopefully the LP64 model for 64-bit UNIX will be standard by 2038. Hell, by 2038 we'll probably have arguments about 128 bit longs. 2038 is a long way off, and the odds that 32 bit longs will be anything but a memory by then are slim. I mean, look... that's ten years longer than UNIX has existed. Go back half that time: Version 7 had just come out. Version 6 had a 16-bit system call model, lseek was new in V7... I think unsigned integers and longs were new in V7. They'd just gone through the same sort of transition we're talking about, with the old interfaces left hanging around for a while. The shift from 32 to 64 bit file offsets, at least in BSD, was a lot less traumatic. We could go to 32 bit time in BSD right now. There's two main BSDs: Digital UNIX and the various 4.4-lite derivitives. They all use 64 bit off_t, and they could handle 64 bit time_t quite handily. I imagine some platforms will make a mess of it... we went through hell when we got Solaris boxes in and had to deal with their off_t botches. But it's not inherently nearly as much of a problem as the year 2000... -- In hoc signo hack, Peter da Silva `-_-' "Milloin halasit viimeksi suttasi?" 'U` "Tell init(8) to lock-n-load, we're goin' zombie slaying!"