> This has been documented in some stage: *dont* define B_ENDIAN or
> L_ENDIAN on the 64-bit platforms..
Where? In either case here is an example proving opposite. From
crypto/evp/bio_ok.c:
> #ifndef L_ENDIAN
> #define swapem(x) \
> ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \
> (((unsigned long int)(x) & 0x0000ff00U) << 8) | \
> (((unsigned long int)(x) & 0x00ff0000U) >> 8) | \
> (((unsigned long int)(x) & 0xff000000U) >> 24)))
> #else
> #define swapem(x) (x)
> #endif
I.e. 64-bit platform has to be L_ENDIAN...
>
> > But in either case is it a good
> > idea to put a code in that depends on sizeof(long) being 4? Definitely
> > not!
I still think that whenever is this the case (code depends on
sizeof(anything)) it should be masked with e.g. #ifdef ILP32, #ifdef
LP64, #ifdef ILP64 (Cray:-), #idef LP32 (win16, ms-dos:-) or similar.
Andy.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]