14 #ifndef GIL_CONFIG_HPP
15 #define GIL_CONFIG_HPP
25 #include <boost/config.hpp>
26 #include <boost/config/pragma_message.hpp>
28 #if defined(BOOST_GIL_DOXYGEN_ONLY)
29 #define BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS
39 #if defined(BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS)
40 #if defined(sun) || defined(__sun) || \ // SunOS
41 defined(__osf__) || defined(__osf) || \
42 defined(_hpux) || defined(hpux) || \
43 defined(__arm__) || defined(__ARM_ARCH) || \
45 #error Unaligned access strictly disabled for some UNIX platforms or ARM architecture
46 #elif defined(__i386__) || defined(__x86_64__) || defined(__vax__)
54 BOOST_PRAGMA_MESSAGE(
"CAUTION: Unaligned access tolerated on little-endian may cause undefined behaviour")
56 #error Unaligned access disabled for unknown platforms and architectures
58 #endif // defined(BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS)