diff options
author | riz <riz@pkgsrc.org> | 2013-01-24 22:54:49 +0000 |
---|---|---|
committer | riz <riz@pkgsrc.org> | 2013-01-24 22:54:49 +0000 |
commit | 2a871b2cb3b1db6fd286892b133029770487582e (patch) | |
tree | 5cb779f7eb46bae593a32c3c8cfe2b99327ad509 /meta-pkgs/boost/patches | |
parent | 81a6913871cbfeaccdf42cb33d01db51bc818cea (diff) | |
download | pkgsrc-2a871b2cb3b1db6fd286892b133029770487582e.tar.gz |
Use <sys/endian.h> on BSD systems to determine endianness. Fixes a problem
on NetBSD/arm where boost could not determine the endianness.
(patch has been submitted upstream)
Diffstat (limited to 'meta-pkgs/boost/patches')
-rw-r--r-- | meta-pkgs/boost/patches/patch-boost_detail_endian.hpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/meta-pkgs/boost/patches/patch-boost_detail_endian.hpp b/meta-pkgs/boost/patches/patch-boost_detail_endian.hpp new file mode 100644 index 00000000000..ee40cdcc98f --- /dev/null +++ b/meta-pkgs/boost/patches/patch-boost_detail_endian.hpp @@ -0,0 +1,28 @@ +$NetBSD: patch-boost_detail_endian.hpp,v 1.1 2013/01/24 22:54:49 riz Exp $ + +--- boost/detail/endian.hpp.orig 2011-03-29 14:58:48.000000000 -0700 ++++ boost/detail/endian.hpp 2013-01-24 14:24:28.000000000 -0800 +@@ -43,6 +43,23 @@ + # error Unknown machine endianness detected. + # endif + # define BOOST_BYTE_ORDER __BYTE_ORDER ++#elif defined(__NetBSD__) || defined(__FreeBSD__) || \ ++ defined(__OpenBSD__) || (__DragonFly__) ++# if defined(__OpenBSD__) ++# include <machine/endian.h> ++# else ++# include <sys/endian.h> ++# endif ++# if (_BYTE_ORDER == _LITTLE_ENDIAN) ++# define BOOST_LITTLE_ENDIAN ++# elif (_BYTE_ORDER == _BIG_ENDIAN) ++# define BOOST_BIG_ENDIAN ++# elif (_BYTE_ORDER == _PDP_ENDIAN) ++# define BOOST_PDP_ENDIAN ++# else ++# error Unknown machine endianness detected. ++# endif ++# define BOOST_BYTE_ORDER __BYTE_ORDER + #elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \ + defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) || \ + defined(_STLP_BIG_ENDIAN) && !defined(_STLP_LITTLE_ENDIAN) |