Ignore:
Timestamp:
2005-11-07T10:29:04+13:00 (19 years ago)
Author:
kjdon
Message:

added check for endianness: AC_C_BIGENDIAN, which defines WORDS_BIGENDIAN to configure. Then netorder.h checks for WORDS_BIGENDIAN, rather than LITTLE_ENDIAN, _LITTLE_ENDIAN, LITTLE_ENDIAN etc, as these get defined on all platforms. This meant that linux collections would not work on teh mac because doubles were getting the wrong endianness

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/packages/mg/lib/netorder.h

    r3745 r10840  
    1111#endif
    1212
    13 #if defined (BIG_ENDIAN) || defined (_BIG_ENDIAN) || defined (__BIG_ENDIAN)
    14 # ifndef _BIG_ENDIAN
    15 #  define _BIG_ENDIAN
    16 # endif
    17 #endif
    1813
    19 #if defined (LITTLE_ENDIAN) || defined (_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN)
    20 # ifndef _LITTLE_ENDIAN
    21 #  define _LITTLE_ENDIAN
    22 # endif
    23 #endif
    24 
    25 #ifdef _LITTLE_ENDIAN
     14#ifndef WORDS_BIGENDIAN
    2615
    2716/* double */
     
    133122#define NTOHUS2(ns, hs)   ((hs) = ntohs((ns)))
    134123
    135 #else   /* _BIG_ENDIAN */
     124#else   /* WORDS_BIGENDIAN */
    136125
    137126/* double */
Note: See TracChangeset for help on using the changeset viewer.