Re: [exim] Test code (Anyone using platform without 64-bit i…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Christian Recktenwald
Dátum:  
Címzett: exim-users
CC: Christian Recktenwald
Tárgy: Re: [exim] Test code (Anyone using platform without 64-bit integers?)
On Mon, Dec 02, 2013 at 06:00:26PM -0500, Phil Pennock wrote:
> You should be able to compile and run this, and see "4294967297" printed
> twice, which is (2^32 + 1):
>
> ----------------------------8< cut here >8------------------------------
> #include <stdint.h>
> #include <stdio.h>
>
> int
> main(int argc, char *argv[]) {
>     int64_t s64;
>     uint64_t u64;

>
>     s64 = 1LL + (1LL << 32);
>     u64 = 1LL + (1LL << 32);

>
>     printf("signed: %lld\nunsigned: %llu\n", s64, u64);
> }
> ----------------------------8< cut here >8------------------------------


Test succeeds on:
- Pentium III (Katmai, Coppermine)
- Celeron (Mendocino) (like Pentium II)
- ATOM N330
- Geode(TM) Integrated Processor by AMD PCS (ALX 800)
- ARMv6 (v6l) (from RaspberryPi B)

(Not sure if the CPU does the trick or gcc/glibc are)

HTH, Chris

-- 
Christian Recktenwald      
exim-users-dist@???