Mail Archives: djgpp-workers/2001/09/14/14:05:33
--0__=05256AC70062ADAB8f9e8a93df938690918c05256AC70062ADAB
Content-type: text/plain; charset=us-ascii
Everything you say makes sense, ...
but it clashes with my actual experience.
Attached are two files:
tx.c is a program
tx.lp is output from that program
As you can see, time_t seems to "flip"
at the 2038 barrier.
(See attached file: tx.c)(See attached file: tx.lp)
---------------------- Forwarded by Randall E Hess/US/Raytheon on
09/14/2001 12:57 PM ---------------------------
"DJ Delorie" <dj AT delorie DOT com> on 09/14/2001 10:38:16 AM
To: Randall_E_Hess AT raytheon DOT com
cc: (bcc: Randall E Hess/US/Raytheon)
Subject: Re: time functions
time_t is unsigned. It will not fail until 2106. I don't expect
there to be any 32-bit computers left by then, except perhaps in
digital watches.
--0__=05256AC70062ADAB8f9e8a93df938690918c05256AC70062ADAB
Content-type: application/octet-stream;
name="tx.c"
Content-Disposition: attachment; filename="tx.c"
Content-transfer-encoding: base64
I2luY2x1ZGUgPHN0ZGxpYi5oPgojaW5jbHVkZSA8c3RkaW8uaD4KI2luY2x1ZGUgPHRpbWUuaD4K
CgoKdm9pZCBtYWluICh2b2lkKSAgLyoqKioqKioqKiogcHJvZ3JhbSB0eCAqKioqKioqKioqLwp7
CgogIHN0cnVjdCB0bSAqdGltZTA7CgogIHN0cnVjdCB0bSAqdGltZTE7CgogIHRpbWVfdCB0aW1l
MHg7CiAgdGltZV90IHRpbWUxeDsKIAogIGludCBkZWx0YTsKICBpbnQgbjsKCiAgdGltZTAgPSAo
c3RydWN0IHRtKikgbWFsbG9jKHNpemVvZiAoc3RydWN0IHRtKSk7CgogIHRpbWUwLT50bV9zZWMg
ID0gMTI7CiAgdGltZTAtPnRtX21pbiAgPSA0NTsKICB0aW1lMC0+dG1faG91ciA9ICA3OwogIHRp
bWUwLT50bV9tb24gID0gIDk7CiAgdGltZTAtPnRtX21kYXkgPSAxMTsKCiAgdGltZTAtPnRtX3ll
YXIgPSAyMDAxLTE5MDA7CgogIHRpbWUweCA9IG1rdGltZSh0aW1lMCk7CiAgcHJpbnRmKCJcbnRp
bWVfdCB2YWx1ZSB3YXMgJXVcbiIsIHRpbWUweCk7CgogIHRpbWUwLT50bV95ZWFyID0gMjAwMi0x
OTAwOwogIHRpbWUxeCA9IG1rdGltZSh0aW1lMCk7CiAgcHJpbnRmKCJcbnRpbWVfdCB2YWx1ZSB3
YXMgJXVcbiIsIHRpbWUxeCk7CgogIGRlbHRhID0gdGltZTF4LXRpbWUweDsKCiAgcHJpbnRmKCJc
bmRlbHRhID0gJXUiLCBkZWx0YSk7CgogIHRpbWUwLT50bV95ZWFyID0gMjAzMy0xOTAwOwogIHRp
bWUxeCA9IG1rdGltZSh0aW1lMCk7CgogIHByaW50ZigiXG5cbkJlZ2luIEZpcnN0IExvb3AiKTsK
CiAgZm9yKG49MDsgbjwxMTsgKytuKQogIHsKICAgIHRpbWUxeCArPSBkZWx0YTsKICAgIHRpbWUx
ID0gbG9jYWx0aW1lKCZ0aW1lMXgpOwogICAgcHJpbnRmKCJcblxubmV3IHRpbWUgaXMgJXU6JXU6
JXUgb24gJXUvJXUvJXUiLAogICAgICAgICAgIHRpbWUxLT50bV9ob3VyLCB0aW1lMS0+dG1fbWlu
LCAgdGltZTEtPnRtX3NlYywgCiAgICAgICAgICAgdGltZTEtPnRtX21vbiwgIHRpbWUxLT50bV9t
ZGF5LCB0aW1lMS0+dG1feWVhcisxOTAwKTsKICB9Ci8qCiAgdGltZV94ID0gdGltZTF4ICsgOCpk
ZWx0YV94OwoKICBwcmludGYoIlxuXG5CZWdpbiBTZWNvbmQgTG9vcFxuIik7CgogIGZvcihuPTA7
IG48NzsgKytuKQogIHsKICAgIHRpbWVfeCArPSB0aW1lMngtdGltZTF4OwogICAgQ29udmVydF9H
TVRfVG9fVVRDICh0aW1lX3gpOwogIH0KKi8KICBwcmludGYoIlxuXG4iKTsKfQo=
--0__=05256AC70062ADAB8f9e8a93df938690918c05256AC70062ADAB
Content-type: application/octet-stream;
name="tx.lp"
Content-Disposition: attachment; filename="tx.lp"
Content-transfer-encoding: base64
CnRpbWVfdCB2YWx1ZSB3YXMgMTAwMjgwNDMxMgoKdGltZV90IHZhbHVlIHdhcyAxMDM0MzQwMzEy
CgpkZWx0YSA9IDMxNTM2MDAwCgpCZWdpbiBGaXJzdCBMb29wCgpuZXcgdGltZSBpcyA3OjQ1OjEy
IG9uIDkvMTEvMjAzNAoKbmV3IHRpbWUgaXMgNzo0NToxMiBvbiA5LzExLzIwMzUKCm5ldyB0aW1l
IGlzIDc6NDU6MTIgb24gOS8xMC8yMDM2CgpuZXcgdGltZSBpcyA3OjQ1OjEyIG9uIDkvMTAvMjAz
NwoKbmV3IHRpbWUgaXMgMToxNjo1NiBvbiA4LzQvMTkwMgoKbmV3IHRpbWUgaXMgMToxNjo1NiBv
biA4LzQvMTkwMwoKbmV3IHRpbWUgaXMgMToxNjo1NiBvbiA4LzMvMTkwNAoKbmV3IHRpbWUgaXMg
MToxNjo1NiBvbiA4LzMvMTkwNQoKbmV3IHRpbWUgaXMgMToxNjo1NiBvbiA4LzMvMTkwNgoKbmV3
IHRpbWUgaXMgMToxNjo1NiBvbiA4LzMvMTkwNwoKbmV3IHRpbWUgaXMgMToxNjo1NiBvbiA4LzIv
MTkwOAoK
--0__=05256AC70062ADAB8f9e8a93df938690918c05256AC70062ADAB--
- Raw text -