src/stdafx.h
branchcustombridgeheads
changeset 5648 1608018c5ff2
parent 5643 3778051e8095
child 5650 aefc131bf5ce
equal deleted inserted replaced
5647:cbde85c8c878 5648:1608018c5ff2
    54 # endif
    54 # endif
    55 #endif /* __MORPHOS__ */
    55 #endif /* __MORPHOS__ */
    56 
    56 
    57 #ifdef __APPLE__
    57 #ifdef __APPLE__
    58 # include "os/macosx/osx_stdafx.h"
    58 # include "os/macosx/osx_stdafx.h"
    59 // make endian swapping use Apple's macros to increase speed
    59 /* make endian swapping use Apple's macros to increase speed (since it will use hardware swapping if available)
    60 # define BSWAP32(x) Endian32_Swap(x)
    60  * Even though they should return uint16 and uint32, we get warnings if we don't cast those (why?) */
    61 # define BSWAP16(x) Endian16_Swap(x)
    61 # define BSWAP32(x) ((uint32)Endian32_Swap(x))
       
    62 # define BSWAP16(x) ((uint16)Endian16_Swap(x))
    62 #else
    63 #else
    63 # define BSWAP32(x) ((((x) >> 24) & 0xFF) | (((x) >> 8) & 0xFF00) | (((x) << 8) & 0xFF0000) | (((x) << 24) & 0xFF000000))
    64 # define BSWAP32(x) ((((x) >> 24) & 0xFF) | (((x) >> 8) & 0xFF00) | (((x) << 8) & 0xFF0000) | (((x) << 24) & 0xFF000000))
    64 # define BSWAP16(x) ((x) >> 8 | (x) << 8)
    65 # define BSWAP16(x) ((x) >> 8 | (x) << 8)
    65 #endif /* __APPLE__ */
    66 #endif /* __APPLE__ */
    66 
    67