mirror of https://github.com/CGAL/cgal
add a way to define a default endian
This commit is contained in:
parent
f46c9888e6
commit
66e3b216be
|
|
@ -362,7 +362,15 @@
|
||||||
# elif BOOST_ENDIAN_LITTLE_BYTE
|
# elif BOOST_ENDIAN_LITTLE_BYTE
|
||||||
# define CGAL_LITTLE_ENDIAN
|
# define CGAL_LITTLE_ENDIAN
|
||||||
# else
|
# else
|
||||||
# error Unknown endianness
|
# ifdef CGAL_DEFAULT_ENDIAN
|
||||||
|
# if CGAL_DEFAULT_ENDIAN == 0
|
||||||
|
# define CGAL_LITTLE_ENDIAN
|
||||||
|
# else
|
||||||
|
# define CGAL_BIG_ENDIAN
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# error Unknown endianness: Define CGAL_DEFAULT_ENDIAN to 0 for little endian and to 1 for big endian.
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#elif defined (__GLIBC__)
|
#elif defined (__GLIBC__)
|
||||||
# include <endian.h>
|
# include <endian.h>
|
||||||
|
|
@ -371,7 +379,15 @@
|
||||||
# elif (__BYTE_ORDER == __BIG_ENDIAN)
|
# elif (__BYTE_ORDER == __BIG_ENDIAN)
|
||||||
# define CGAL_BIG_ENDIAN
|
# define CGAL_BIG_ENDIAN
|
||||||
# else
|
# else
|
||||||
# error Unknown endianness
|
# ifdef CGAL_DEFAULT_ENDIAN
|
||||||
|
# if CGAL_DEFAULT_ENDIAN == 0
|
||||||
|
# define CGAL_LITTLE_ENDIAN
|
||||||
|
# else
|
||||||
|
# define CGAL_BIG_ENDIAN
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# error Unknown endianness: Define CGAL_DEFAULT_ENDIAN to 0 for little endian and to 1 for big endian.
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#elif defined(__sparc) || defined(__sparc__) \
|
#elif defined(__sparc) || defined(__sparc__) \
|
||||||
|| defined(_POWER) || defined(__powerpc__) \
|
|| defined(_POWER) || defined(__powerpc__) \
|
||||||
|
|
@ -386,7 +402,15 @@
|
||||||
|| defined(_M_ALPHA) || defined(_WIN64)
|
|| defined(_M_ALPHA) || defined(_WIN64)
|
||||||
# define CGAL_LITTLE_ENDIAN
|
# define CGAL_LITTLE_ENDIAN
|
||||||
#else
|
#else
|
||||||
# error Unknown endianness
|
# ifdef CGAL_DEFAULT_ENDIAN
|
||||||
|
# if CGAL_DEFAULT_ENDIAN == 0
|
||||||
|
# define CGAL_LITTLE_ENDIAN
|
||||||
|
# else
|
||||||
|
# define CGAL_BIG_ENDIAN
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# error Unknown endianness: Define CGAL_DEFAULT_ENDIAN to 0 for little endian and to 1 for big endian.
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue