Re: [exiscanusers] Re: [Exim] ANNOUNCE: exiscan-acl-4.24-13

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Oliver Eikemeier
Dátum:  
Címzett: Andreas Metzler
CC: exim-users
Tárgy: Re: [exiscanusers] Re: [Exim] ANNOUNCE: exiscan-acl-4.24-13
Andreas Metzler wrote:

> On Wed, Oct 22, 2003 at 04:30:55PM +0200, Tom Kistner wrote:
>
>>I was asking Philip if he handles endianess in
>>any way, and he doesn't, so there are no collisions at compile time.
>
> Actually there is a little bit of endian-dependent code in exim, using
> this as test
>
> int i = 0x01020304;
> uschar *ctest = (uschar *)(&i);
> printf("Checking md5: %s-endian\n", (ctest[0] == 0x04)? "little" : "big");
>
> so having this globally available might make sense.
>                cu andreas


No exim on a PDP-11? sniff...

uint32_t i;
uint8_t *ctest = (uint8_t *)&i;
ctest[0] = 0x04;
ctest[1] = 0x03;
ctest[2] = 0x02;
ctest[3] = 0x01;

i == 0x01020304 => little endian
i == 0x04030201 => big endian
i == 0x03040102 => pdp endian

;-)
    Oliver