Opened 10 years ago

Last modified 10 years ago

#7528 closed Bugs

Compilation failure on Android and Xbox 360 — at Version 1

Reported by: Domagoj Šarić Owned by: John Maddock
Milestone: To Be Determined Component: config
Version: Boost 1.52.0 Severity: Problem
Keywords: Cc:

Description (last modified by Domagoj Šarić)

boost/detail/endian.hpp fails to autodetect endianess for Android and Xbox so LITTLE_ENDIAN or BIG_ENDIAN (respectively) has to be manually defined before anything includes that header. Alternatively, a more elaborate approach can be used:

    #if defined( __ANDROID__ )
        // http://stackoverflow.com/questions/6212951/endianness-of-android-ndk
        #include "machine/_types.h"
        #ifdef __ARMEB__
            #define __BIG_ENDIAN__
        #else
            #define __LITTLE_ENDIAN__
        #endif // __ARMEB__
    #elif defined( _XBOX ) && !defined( __BIG_ENDIAN__ )
        #define __BIG_ENDIAN__
    #endif // platform

Change History (1)

comment:1 by Domagoj Šarić, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.