From db42762618ced2154529d7fda881feafd195b57c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 4 Jun 2014 10:42:38 -0500 Subject: [PATCH 01/18] Remove build-dir option to see if it fixes missing regression reports. --- jamroot.jam | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jamroot.jam b/jamroot.jam index 8c06f09..7de5834 100644 --- a/jamroot.jam +++ b/jamroot.jam @@ -1,10 +1,9 @@ -# Copyright Rene Rivera 2011 +# Copyright Rene Rivera 2011-2014 # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) project predef - : build-dir bin ; path-constant BOOST_PREDEF_ROOT : . ; From dc66ebd40789eba9b11af395c4ae2bfc253c68bb Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 4 Jun 2014 15:31:32 -0500 Subject: [PATCH 02/18] Delete jamroot.jam to see if it brings back test results. --- jamroot.jam | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 jamroot.jam diff --git a/jamroot.jam b/jamroot.jam deleted file mode 100644 index 7de5834..0000000 --- a/jamroot.jam +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright Rene Rivera 2011-2014 -# Distributed under the Boost Software License, Version 1.0. -# (See accompanying file LICENSE_1_0.txt or copy at -# http://www.boost.org/LICENSE_1_0.txt) - -project predef - ; - -path-constant BOOST_PREDEF_ROOT : . ; From 8523554ecbc99fa7bf9161320321f3ea0d15721f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 5 Jun 2014 00:06:55 -0500 Subject: [PATCH 03/18] Add build.jam at predef root to replace jamroot.jam that was interfeering with testing results. --- build.jam | 9 +++++++++ test/.gitignore | 1 + 2 files changed, 10 insertions(+) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..aac1558 --- /dev/null +++ b/build.jam @@ -0,0 +1,9 @@ +# Copyright Rene Rivera 2014 +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +project predef + ; + +path-constant BOOST_PREDEF_ROOT : . ; diff --git a/test/.gitignore b/test/.gitignore index d8feff7..69d0b50 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -1,2 +1,3 @@ /defs-clang.txt /defs-gcc.txt +/bin/ From 80ad59ac463059a7a3111f6bf44445f63ed8cec3 Mon Sep 17 00:00:00 2001 From: Caleb Epstein Date: Tue, 14 Jun 2005 22:19:20 +0000 Subject: [PATCH 04/18] Machine endianness detection taken from [SVN r29573] --- include/boost/detail/endian.hpp | 56 +++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 include/boost/detail/endian.hpp diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp new file mode 100644 index 0000000..9017e76 --- /dev/null +++ b/include/boost/detail/endian.hpp @@ -0,0 +1,56 @@ +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* + * Copyright notice reproduced from , from + * which this code was originally taken. + * + * Modified by Caleb Epstein to use with GNU libc and to + * defined the BOOST_ENDIAN macro. + */ + +#ifndef BOOST_DETAIL_ENDIAN_HPP +#define BOOST_DETAIL_ENDIAN_HPP + +// GNU libc offers the helpful header which defines +// __BYTE_ORDER + +#if defined (__GLIBC__) +# include +# 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(__sparc) || defined(__sparc__) \ + || defined(_POWER) || defined(__powerpc__) \ + || defined(__ppc__) || defined(__hppa) \ + || defined(_MIPSEB) || defined(_POWER) \ + || defined(__s390__) +# define BOOST_BIG_ENDIAN +# define BOOST_BYTE_ORDER 4321 +#elif defined(__i386__) || defined(__alpha__) \ + || defined(__ia64) || defined(__ia64__) +# define BOOST_LITTLE_ENDIAN +# define BOOST_BYTE_ORDER 1234 +#else +# error The file boost/detail/endian.hpp needs to be set up for your CPU type. +#endif + + +#endif From 6c612e69fce18906638f45a04b74becbd8afa33a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 19 Jul 2005 23:44:52 +0000 Subject: [PATCH 05/18] Add detection for macros used by VC: _M_IX86; little-endian. _M_IA64; little-endian, as this is the default on I64 and AMD64 is only little endian. _M_ALPHA; little-endian, as again it's the default and Windows doesn't run on big-endian Alpha anyway AFAIK. [SVN r30185] --- include/boost/detail/endian.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 9017e76..5f12fbe 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -45,7 +45,9 @@ # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 #elif defined(__i386__) || defined(__alpha__) \ - || defined(__ia64) || defined(__ia64__) + || defined(__ia64) || defined(__ia64__) \ + || defined(_M_IX86) || defined(_M_IA64) \ + || defined(_M_ALPHA) # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 #else From d2548563d21b3e4bf51ce03ca43273288bb65791 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 13 Oct 2006 12:40:40 +0000 Subject: [PATCH 06/18] Added 64-bit Intel processor support. [SVN r35587] --- include/boost/detail/endian.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 5f12fbe..a41f5f2 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -47,7 +47,11 @@ #elif defined(__i386__) || defined(__alpha__) \ || defined(__ia64) || defined(__ia64__) \ || defined(_M_IX86) || defined(_M_IA64) \ - || defined(_M_ALPHA) + || defined(_M_ALPHA) || defined(__amd64) \ + || defined(__amd64__) || defined(_M_AMD64) \ + || defined(__x86_64) || defined(__x86_64__) \ + || defined(_M_X64) + # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 #else From fa1dcace52b21259d80f4145e564af4feadfe64c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 13 Oct 2006 17:08:47 +0000 Subject: [PATCH 07/18] Fix for HP-UX on Itanium. [SVN r35591] --- include/boost/detail/endian.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index a41f5f2..3d85740 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -39,7 +39,7 @@ # define BOOST_BYTE_ORDER __BYTE_ORDER #elif defined(__sparc) || defined(__sparc__) \ || defined(_POWER) || defined(__powerpc__) \ - || defined(__ppc__) || defined(__hppa) \ + || defined(__ppc__) || defined(__hpux) \ || defined(_MIPSEB) || defined(_POWER) \ || defined(__s390__) # define BOOST_BIG_ENDIAN From d3249bd2f55a109833472dd4608029f238054b91 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 20 Oct 2006 10:08:21 +0000 Subject: [PATCH 08/18] Updated patch from Boris Gubenko. [SVN r35672] --- include/boost/detail/endian.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 3d85740..524435d 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -37,6 +37,12 @@ # error Unknown machine endianness detected. # endif # define BOOST_BYTE_ORDER __BYTE_ORDER +#elif defined(_BIG_ENDIAN) +# define BOOST_BIG_ENDIAN +# define BOOST_BYTE_ORDER 4321 +#elif defined(_LITTLE_ENDIAN) +# define BOOST_LITTLE_ENDIAN +# define BOOST_BYTE_ORDER 1234 #elif defined(__sparc) || defined(__sparc__) \ || defined(_POWER) || defined(__powerpc__) \ || defined(__ppc__) || defined(__hpux) \ From d5e07d5e221693db083727ce07605a20ec5e118b Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 1 Dec 2006 11:34:43 +0000 Subject: [PATCH 09/18] Merged L & C issue fixes from trunk to branch. [SVN r36225] --- include/boost/detail/endian.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 524435d..4cc81ad 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -1,3 +1,7 @@ +// (c) Copyright John Maddock 2001 +// Distributed under the Boost Software License, Version 1.0. (See accompany- +// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + /* * Copyright (c) 1997 * Silicon Graphics Computer Systems, Inc. From fbc2caf1fd5de005558ec477539270604475026c Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Fri, 1 Dec 2006 14:28:43 +0000 Subject: [PATCH 10/18] Merged a copyright addition from trunk to branch. [SVN r36231] --- include/boost/detail/endian.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 4cc81ad..01a7689 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -1,4 +1,5 @@ -// (c) Copyright John Maddock 2001 +// (c) Copyright Caleb Epstein 2005 +// (c) Copyright John Maddock 2006 // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) From e074593f96c6911ed4516313ee70b15d4f3c6465 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Sat, 2 Dec 2006 10:04:37 +0000 Subject: [PATCH 11/18] Corrected wrong order in copyright notices. [SVN r36240] --- include/boost/detail/endian.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 01a7689..6936dba 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -1,5 +1,5 @@ -// (c) Copyright Caleb Epstein 2005 -// (c) Copyright John Maddock 2006 +// Copyright 2005 Caleb Epstein +// Copyright 2006 John Maddock // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) From 9135890ac91b61a86829e98cc48de698e417501b Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Mon, 19 Jan 2009 18:56:42 +0000 Subject: [PATCH 12/18] Merge from trunk [SVN r50676] --- include/boost/detail/endian.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 6936dba..803d7e2 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -42,10 +42,10 @@ # error Unknown machine endianness detected. # endif # define BOOST_BYTE_ORDER __BYTE_ORDER -#elif defined(_BIG_ENDIAN) +#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 -#elif defined(_LITTLE_ENDIAN) +#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 #elif defined(__sparc) || defined(__sparc__) \ @@ -61,7 +61,7 @@ || defined(_M_ALPHA) || defined(__amd64) \ || defined(__amd64__) || defined(_M_AMD64) \ || defined(__x86_64) || defined(__x86_64__) \ - || defined(_M_X64) + || defined(_M_X64) || defined(__bfin__) # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 From d8f81aec33e52f1553c42cd647163b7a01bb6b04 Mon Sep 17 00:00:00 2001 From: "Troy D. Straszheim" Date: Wed, 21 Oct 2009 18:07:45 +0000 Subject: [PATCH 13/18] Merge to release, fix for fix in r35591: sometimes __hppa is on PA-RISC but __hpux isn't (e.g. on linux) Fixes ticket #3537 [SVN r57049] --- include/boost/detail/endian.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 803d7e2..36ddb7e 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -50,7 +50,7 @@ # define BOOST_BYTE_ORDER 1234 #elif defined(__sparc) || defined(__sparc__) \ || defined(_POWER) || defined(__powerpc__) \ - || defined(__ppc__) || defined(__hpux) \ + || defined(__ppc__) || defined(__hpux) || defined(__hppa) \ || defined(_MIPSEB) || defined(_POWER) \ || defined(__s390__) # define BOOST_BIG_ENDIAN From fdc7f914efdcd14e977ac5170bd1504932fb7d9b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 27 May 2010 14:12:42 +0000 Subject: [PATCH 14/18] Merge fix for #2762 from trunk. [SVN r62260] --- include/boost/detail/endian.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 36ddb7e..5f9b90e 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -1,5 +1,6 @@ // Copyright 2005 Caleb Epstein // Copyright 2006 John Maddock +// Copyright 2010 Rene Rivera // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -42,10 +43,12 @@ # error Unknown machine endianness detected. # endif # define BOOST_BYTE_ORDER __BYTE_ORDER -#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) +#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \ + defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 -#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) +#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \ + defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 #elif defined(__sparc) || defined(__sparc__) \ From 3e57d19b76d2f4d1ad1aba25fa7c4cd6d85745df Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 13 Jan 2011 11:28:34 +0000 Subject: [PATCH 15/18] Merge STLPort endian detection to release. [SVN r68091] --- include/boost/detail/endian.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 5f9b90e..98c870c 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -44,11 +44,13 @@ # endif # define BOOST_BYTE_ORDER __BYTE_ORDER #elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \ - defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) + defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) || \ + defined(_STLP_BIG_ENDIAN) && !defined(_STLP_LITTLE_ENDIAN) # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 #elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \ - defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) + defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) || \ + defined(_STLP_LITTLE_ENDIAN) && !defined(_STLP_BIG_ENDIAN) # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 #elif defined(__sparc) || defined(__sparc__) \ From afd0b62076c37637426f9869d742b9e4532daf8e Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 24 Feb 2013 19:07:59 +0000 Subject: [PATCH 16/18] Merge changes from Trunk. Fixes #6013. Fixes #7151. Fixes #7359. Fixes #7389. Fixes #7452. Fixes #7528. Fixes #7703. Fixes #7841. Fixes #7898. Fixes #7938. Fixes #8048. [SVN r83139] --- include/boost/detail/endian.hpp | 56 ++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 98c870c..3236808 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -28,10 +28,12 @@ #ifndef BOOST_DETAIL_ENDIAN_HPP #define BOOST_DETAIL_ENDIAN_HPP +// +// Special cases come first: +// +#if defined (__GLIBC__) // GNU libc offers the helpful header which defines // __BYTE_ORDER - -#if defined (__GLIBC__) # include # if (__BYTE_ORDER == __LITTLE_ENDIAN) # define BOOST_LITTLE_ENDIAN @@ -43,13 +45,56 @@ # error Unknown machine endianness detected. # endif # define BOOST_BYTE_ORDER __BYTE_ORDER + +#elif defined(__NetBSD__) || defined(__FreeBSD__) || \ + defined(__OpenBSD__) || (__DragonFly__) +// +// BSD has endian.h, see https://svn.boost.org/trac/boost/ticket/6013 +# if defined(__OpenBSD__) +# include +# else +# include +# 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( __ANDROID__ ) +// Adroid specific code, see: https://svn.boost.org/trac/boost/ticket/7528 +// Here we can use machine/_types.h, see: +// http://stackoverflow.com/questions/6212951/endianness-of-android-ndk +# include "machine/_types.h" +# ifdef __ARMEB__ +# define BOOST_BIG_ENDIAN +# define BOOST_BYTE_ORDER 4321 +# else +# define BOOST_LITTLE_ENDIAN +# define BOOST_BYTE_ORDER 1234 +# endif // __ARMEB__ + +#elif defined( _XBOX ) +// +// XBox is always big endian?? +// +# define BOOST_BIG_ENDIAN +# define BOOST_BYTE_ORDER 4321 + #elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \ defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) || \ + defined(__BIGENDIAN__) && !defined(__LITTLEENDIAN__) || \ defined(_STLP_BIG_ENDIAN) && !defined(_STLP_LITTLE_ENDIAN) # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 #elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \ defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) || \ + defined(__LITTLEENDIAN__) && !defined(__BIGENDIAN__) || \ defined(_STLP_LITTLE_ENDIAN) && !defined(_STLP_BIG_ENDIAN) # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 @@ -57,7 +102,7 @@ || defined(_POWER) || defined(__powerpc__) \ || defined(__ppc__) || defined(__hpux) || defined(__hppa) \ || defined(_MIPSEB) || defined(_POWER) \ - || defined(__s390__) + || defined(__s390__) || defined(__ARMEB__) # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 #elif defined(__i386__) || defined(__alpha__) \ @@ -66,7 +111,9 @@ || defined(_M_ALPHA) || defined(__amd64) \ || defined(__amd64__) || defined(_M_AMD64) \ || defined(__x86_64) || defined(__x86_64__) \ - || defined(_M_X64) || defined(__bfin__) + || defined(_M_X64) || defined(__bfin__) \ + || defined(__ARMEL__) \ + || (defined(_WIN32) && defined(__ARM__) && defined(_MSC_VER)) // ARM Windows CE don't define anything reasonably unique, but there are no big-endian Windows versions # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 @@ -76,3 +123,4 @@ #endif + From afb3726763da098f0309ee51a42dbdd3cbe8f76f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 9 Sep 2013 04:06:52 +0000 Subject: [PATCH 17/18] Merge Predef library to release. [SVN r85618] --- include/boost/detail/endian.hpp | 121 +------------------------------- 1 file changed, 3 insertions(+), 118 deletions(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 3236808..3e37db9 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -1,126 +1,11 @@ -// Copyright 2005 Caleb Epstein -// Copyright 2006 John Maddock -// Copyright 2010 Rene Rivera +// Copyright 2013 Redshift Software Inc // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -/* - * Copyright (c) 1997 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - */ - -/* - * Copyright notice reproduced from , from - * which this code was originally taken. - * - * Modified by Caleb Epstein to use with GNU libc and to - * defined the BOOST_ENDIAN macro. - */ - #ifndef BOOST_DETAIL_ENDIAN_HPP #define BOOST_DETAIL_ENDIAN_HPP -// -// Special cases come first: -// -#if defined (__GLIBC__) -// GNU libc offers the helpful header which defines -// __BYTE_ORDER -# include -# 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(__NetBSD__) || defined(__FreeBSD__) || \ - defined(__OpenBSD__) || (__DragonFly__) -// -// BSD has endian.h, see https://svn.boost.org/trac/boost/ticket/6013 -# if defined(__OpenBSD__) -# include -# else -# include -# 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( __ANDROID__ ) -// Adroid specific code, see: https://svn.boost.org/trac/boost/ticket/7528 -// Here we can use machine/_types.h, see: -// http://stackoverflow.com/questions/6212951/endianness-of-android-ndk -# include "machine/_types.h" -# ifdef __ARMEB__ -# define BOOST_BIG_ENDIAN -# define BOOST_BYTE_ORDER 4321 -# else -# define BOOST_LITTLE_ENDIAN -# define BOOST_BYTE_ORDER 1234 -# endif // __ARMEB__ - -#elif defined( _XBOX ) -// -// XBox is always big endian?? -// -# define BOOST_BIG_ENDIAN -# define BOOST_BYTE_ORDER 4321 - -#elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \ - defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) || \ - defined(__BIGENDIAN__) && !defined(__LITTLEENDIAN__) || \ - defined(_STLP_BIG_ENDIAN) && !defined(_STLP_LITTLE_ENDIAN) -# define BOOST_BIG_ENDIAN -# define BOOST_BYTE_ORDER 4321 -#elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \ - defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) || \ - defined(__LITTLEENDIAN__) && !defined(__BIGENDIAN__) || \ - defined(_STLP_LITTLE_ENDIAN) && !defined(_STLP_BIG_ENDIAN) -# define BOOST_LITTLE_ENDIAN -# define BOOST_BYTE_ORDER 1234 -#elif defined(__sparc) || defined(__sparc__) \ - || defined(_POWER) || defined(__powerpc__) \ - || defined(__ppc__) || defined(__hpux) || defined(__hppa) \ - || defined(_MIPSEB) || defined(_POWER) \ - || defined(__s390__) || defined(__ARMEB__) -# define BOOST_BIG_ENDIAN -# define BOOST_BYTE_ORDER 4321 -#elif defined(__i386__) || defined(__alpha__) \ - || defined(__ia64) || defined(__ia64__) \ - || defined(_M_IX86) || defined(_M_IA64) \ - || defined(_M_ALPHA) || defined(__amd64) \ - || defined(__amd64__) || defined(_M_AMD64) \ - || defined(__x86_64) || defined(__x86_64__) \ - || defined(_M_X64) || defined(__bfin__) \ - || defined(__ARMEL__) \ - || (defined(_WIN32) && defined(__ARM__) && defined(_MSC_VER)) // ARM Windows CE don't define anything reasonably unique, but there are no big-endian Windows versions - -# define BOOST_LITTLE_ENDIAN -# define BOOST_BYTE_ORDER 1234 -#else -# error The file boost/detail/endian.hpp needs to be set up for your CPU type. -#endif - +// Use the Predef library for the detection of endianess. +#include #endif - From 927dc0b46eadaf81d93e6d4b52e4eed44ee68706 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 5 Jun 2014 10:18:20 -0500 Subject: [PATCH 18/18] Reverting (c) to human author. --- include/boost/detail/endian.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/detail/endian.hpp b/include/boost/detail/endian.hpp index 3e37db9..f576c26 100644 --- a/include/boost/detail/endian.hpp +++ b/include/boost/detail/endian.hpp @@ -1,4 +1,4 @@ -// Copyright 2013 Redshift Software Inc +// Copyright 2013 Rene Rivera // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)