patch-include_CGAL_config_h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. $OpenBSD: patch-include_CGAL_config_h,v 1.1 2017/01/23 21:56:32 jca Exp $
  2. --- include/CGAL/config.h.orig Mon Jan 23 22:25:28 2017
  3. +++ include/CGAL/config.h Mon Jan 23 22:33:03 2017
  4. @@ -236,27 +236,14 @@
  5. // Big endian or little endian machine.
  6. // ====================================
  7. -#if defined (__GLIBC__)
  8. -# include <endian.h>
  9. -# if (__BYTE_ORDER == __LITTLE_ENDIAN)
  10. -# define CGAL_LITTLE_ENDIAN
  11. -# elif (__BYTE_ORDER == __BIG_ENDIAN)
  12. -# define CGAL_BIG_ENDIAN
  13. -# else
  14. -# error Unknown endianness
  15. -# endif
  16. -#elif defined(__sparc) || defined(__sparc__) \
  17. - || defined(_POWER) || defined(__powerpc__) \
  18. - || defined(__ppc__) || defined(__hppa) \
  19. - || defined(_MIPSEB) || defined(_POWER) \
  20. - || defined(__s390__)
  21. -# define CGAL_BIG_ENDIAN
  22. -#elif defined(__i386__) || defined(__alpha__) \
  23. - || defined(__x86_64) || defined(__x86_64__) \
  24. - || defined(__ia64) || defined(__ia64__) \
  25. - || defined(_M_IX86) || defined(_M_IA64) \
  26. - || defined(_M_ALPHA) || defined(_WIN64)
  27. +#include <endian.h>
  28. +#if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN) || !defined(BIG_ENDIAN)
  29. +# error Unknown endianness
  30. +#endif
  31. +#if (BYTE_ORDER == LITTLE_ENDIAN)
  32. # define CGAL_LITTLE_ENDIAN
  33. +#elif (BYTE_ORDER == BIG_ENDIAN)
  34. +# define CGAL_BIG_ENDIAN
  35. #else
  36. # error Unknown endianness
  37. #endif