00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef BOOST_DETAIL_ENDIAN_HPP
00023 #define BOOST_DETAIL_ENDIAN_HPP
00024
00025
00026
00027
00028 #if defined (__GLIBC__)
00029 # include <endian.h>
00030 # if (__BYTE_ORDER == __LITTLE_ENDIAN)
00031 # define BOOST_LITTLE_ENDIAN
00032 # elif (__BYTE_ORDER == __BIG_ENDIAN)
00033 # define BOOST_BIG_ENDIAN
00034 # elif (__BYTE_ORDER == __PDP_ENDIAN)
00035 # define BOOST_PDP_ENDIAN
00036 # else
00037 # error Unknown machine endianness detected.
00038 # endif
00039 # define BOOST_BYTE_ORDER __BYTE_ORDER
00040 #elif defined(__sparc) || defined(__sparc__) \
00041 || defined(_POWER) || defined(__powerpc__) \
00042 || defined(__ppc__) || defined(__hppa) \
00043 || defined(_MIPSEB) || defined(_POWER) \
00044 || defined(__s390__)
00045 # define BOOST_BIG_ENDIAN
00046 # define BOOST_BYTE_ORDER 4321
00047 #elif defined(__i386__) || defined(__alpha__) \
00048 || defined(__ia64) || defined(__ia64__) \
00049 || defined(_M_IX86) || defined(_M_IA64) \
00050 || defined(_M_ALPHA)
00051 # define BOOST_LITTLE_ENDIAN
00052 # define BOOST_BYTE_ORDER 1234
00053 #else
00054 # error The file boost/detail/endian.hpp needs to be set up for your CPU type.
00055 #endif
00056
00057
00058 #endif