Re: [Boost-bugs] [Boost C++ Libraries] #10505: Use gcc/clang built-in endianity macros (too)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10505: Use gcc/clang built-in endianity macros (too)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-07-15 17:18:00


#10505: Use gcc/clang built-in endianity macros (too)
---------------------------------+----------------------
  Reporter: Jan Hudec <bulb@…> | Owner: grafik
      Type: Bugs | Status: reopened
 Milestone: To Be Determined | Component: predef
   Version: Boost 1.56.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------+----------------------

Comment (by Jan Hudec <bulb@…>):

 Replying to [comment:7 grafik]:
> I still how your code above works. You are checking for
 `defined(__BYTE_ORDER__)`. But are actually checking for `__BYTE_ORDER`
 equality to the `__ORDER_*` macros. Is the whole thing supposed to be a
 third alternative in the GNU libc branch? As in `__BYTE_ORDER__` should
 get used if neither `__BYTE_ORDER` nor `_BYTE_ORDER` are defined?

 Yes, exactly, it's a third alternative. It is exactly analogous to the
 first two, but its advantage is that it is built into (sufficiently
 recent versions of) the gcc and clang compilers themselves, so it works
 even on systems that don't define the `_BYTE_ORDER` and `__BYTE_ORDER` or
 don't define them completely as is the case of Android.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10505#comment:8>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC