[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Y2K+38 disaster in debian?



On Wed, Sep 30, 1998 at 11:01:22AM -0400, Michael Stone wrote:
> Quoting Philip Thiem (ptt@umr.edu):
> > Why would 32-bit apps be limited to 32 bit integers??  Didn't we have 32
> > bit avallible to us on the 286??  If not, I'm certain we were able to
> > get around it then.  Also if any one wants to make use of MMX registers
> > there is even a 64-bit ASM MOV command avalible. 
> > 
> > In fact on my (nonmmx)k6-processor(I don't have a chance to test on a
> > 386) this program returns 8 bytes(64 bits) just as it should;
> > 
> > #include <stdio.h>
> > #include <stdlib.h>
> > 
> > int main(void)
> > {
> >   long long test;
> >   printf("\n\n%i bytes\n\n", sizeof(test);
> >   return 0;
> > }
> 
> 1) Posix requires time_t to be a standard integer type. "long long" is
> (was?) a non-standard extension. (It was being discussed as a possible
> standard.)
> 
> 2) 64 bit math is _very_ slow on a 32 bit machine. Since time_t is used
> all over the place (e.g., the filesystem) you'd seriously slow things
> down by making it 64 bits. 

Well heres an idea...
Currently time_t only USES 31 bits. Why? because it is signed!
if we were to make time_t unsigned then it would double the amount of 
available time till the overflow
(by double I mean double from the epoch. that would mean 2038 ius the 
halfway point... which gives us another 69 years after 2038...or
2107)

of course the ramifications of this would need to be tested...
hmm... wish I had a spare machine to try it on

> 3) Since 64 bit archs already use a 64 bit time_t, this is a problem
> that will go away when 32 bit machines are phased out (I can't see most
> hardware lasting forty years.)

I agree...but...they still could be. Isn't that exactly what the people who
were writting mainframe applications a few yars ago said? :)

"Nah this system wont be in use past 93 forget about 99"

-Steve

-- 
/* -- Stephen Carpenter <sjc@delphi.com> --- <sjc@debian.org>------------ */
E-mail "Bumper Stickers":
"A FREE America or a Drug-Free America: You can't have both!"
"honk if you Love Linux"


Reply to: