ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libecb/ecb.h
(Generate patch)

Comparing libecb/ecb.h (file contents):
Revision 1.110 by root, Sat Jun 30 21:43:58 2012 UTC vs.
Revision 1.111 by sf-exg, Wed Jul 25 09:24:57 2012 UTC

482ecb_inline unsigned char ecb_byteorder_helper (void) ecb_const; 482ecb_inline unsigned char ecb_byteorder_helper (void) ecb_const;
483ecb_inline unsigned char 483ecb_inline unsigned char
484ecb_byteorder_helper (void) 484ecb_byteorder_helper (void)
485{ 485{
486 /* the union code still generates code under pressure in gcc, */ 486 /* the union code still generates code under pressure in gcc, */
487 /* but less than using pointers, and always seem to */ 487 /* but less than using pointers, and always seems to */
488 /* successfully return a constant. */ 488 /* successfully return a constant. */
489 /* the reason why we have this horrible preprocessor mess */ 489 /* the reason why we have this horrible preprocessor mess */
490 /* is to avoid it in all cases, at least on common architectures */ 490 /* is to avoid it in all cases, at least on common architectures */
491 /* and yes, gcc defines __BYTE_ORDER__, g++ does not */ 491 /* or when using a recent enough gcc version (>= 4.6) */
492#if __i386 || __i386__ || _M_X86 || __amd64 || __amd64__ || _M_X64 492#if __i386 || __i386__ || _M_X86 || __amd64 || __amd64__ || _M_X64
493 return 0x44; 493 return 0x44;
494#elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ 494#elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
495 return 0x44; 495 return 0x44;
496#elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ 496#elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines