Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef BOOST_DETAIL_ENDIAN_HPP
00028 #define BOOST_DETAIL_ENDIAN_HPP
00029
00030
00031
00032
00033 #if defined (__GLIBC__)
00034 # include <endian.h>
00035 # if (__BYTE_ORDER == __LITTLE_ENDIAN)
00036 # define BOOST_LITTLE_ENDIAN
00037 # elif (__BYTE_ORDER == __BIG_ENDIAN)
00038 # define BOOST_BIG_ENDIAN
00039 # elif (__BYTE_ORDER == __PDP_ENDIAN)
00040 # define BOOST_PDP_ENDIAN
00041 # else
00042 # error Unknown machine endianness detected.
00043 # endif
00044 # define BOOST_BYTE_ORDER __BYTE_ORDER
00045 #elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)
00046 # define BOOST_BIG_ENDIAN
00047 # define BOOST_BYTE_ORDER 4321
00048 #elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
00049 # define BOOST_LITTLE_ENDIAN
00050 # define BOOST_BYTE_ORDER 1234
00051 #elif defined(__sparc) || defined(__sparc__) \
00052 || defined(_POWER) || defined(__powerpc__) \
00053 || defined(__ppc__) || defined(__hpux) \
00054 || defined(_MIPSEB) || defined(_POWER) \
00055 || defined(__s390__)
00056 # define BOOST_BIG_ENDIAN
00057 # define BOOST_BYTE_ORDER 4321
00058 #elif defined(__i386__) || defined(__alpha__) \
00059 || defined(__ia64) || defined(__ia64__) \
00060 || defined(_M_IX86) || defined(_M_IA64) \
00061 || defined(_M_ALPHA) || defined(__amd64) \
00062 || defined(__amd64__) || defined(_M_AMD64) \
00063 || defined(__x86_64) || defined(__x86_64__) \
00064 || defined(_M_X64) || defined(__bfin__)
00065
00066 # define BOOST_LITTLE_ENDIAN
00067 # define BOOST_BYTE_ORDER 1234
00068 #else
00069 # error The file boost/detail/endian.hpp needs to be set up for your CPU type.
00070 #endif
00071
00072
00073 #endif