From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05 autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a37:9e4b:: with SMTP id h72mr9255069qke.475.1632475975195; Fri, 24 Sep 2021 02:32:55 -0700 (PDT) X-Received: by 2002:a25:3086:: with SMTP id w128mr12038556ybw.139.1632475975030; Fri, 24 Sep 2021 02:32:55 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 24 Sep 2021 02:32:54 -0700 (PDT) In-Reply-To: <874kabm5mp.fsf@nosuchdomain.example.com> Injection-Info: google-groups.googlegroups.com; posting-host=136.163.208.2; posting-account=HFCrOQoAAABZD_f-UUbYHm3lJDIrh-UX NNTP-Posting-Host: 136.163.208.2 References: <8936f386-3fdb-43b3-b912-317906d59631n@googlegroups.com> <4431fad9-d297-4d68-8c0f-fa771c6710f6n@googlegroups.com> <874kabm5mp.fsf@nosuchdomain.example.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3c0272f8-4117-46a4-9051-5419d1edfdc6n@googlegroups.com> Subject: Re: C time_t 2038 problem s-os_lib.ads From: Joakim Strandberg Injection-Date: Fri, 24 Sep 2021 09:32:55 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62833 List-Id: > In C and C++, int is required to be at least 16 bits (POSIX requires=20 > 32), long is at least 32 bits, and long long is at least 64 bits. On=20 > most 64-bit Linux-based systems, int is 32 bits, and long and long long= =20 > are both 64 bits. On 64-bit MS Windows, int and long are both 32 bits,=20 > and long long is 64 bits. time_t is 64 bits on almost all 64-bit=20 > systems. I've never seen a 128-bit time_t; 64 bits with 1-second=20 > resolution is good for several hundred billion years.=20 Thanks for the summary of different types of integers on different platform= s Keith. When I wrote above I had simply done a quick Google search and fou= nd https://www.tutorialspoint.com/what-is-long-long-in-c-cplusplus where it= said "On Linux environment the long takes 64-bit (8-bytes) of space, and t= he long long takes 128-bits (16-bytes) of space." I have never seen 128-bit= integers either but have seen on the development log on AdaCore's website = that support for 128-bit integers have been added to the Interfaces package= (Interfaces.Integer_128 and Interfaces.Unsigned_128). I believe they are p= art of the new Ada2022 standard. Best regards, Joakim