]> git.ipfire.org Git - thirdparty/bind9.git/commit
Make <isc/endian.h> detect GNU rather than Linux
authorOndřej Surý <ondrej@sury.org>
Mon, 3 Jun 2019 12:13:23 +0000 (14:13 +0200)
committerOndřej Surý <ondrej@sury.org>
Mon, 22 Jul 2019 12:09:48 +0000 (08:09 -0400)
commit55a95f7cd7dfc015938b5e2387db1e4e7c9d11a9
tree1c4f8e59364df698b0da522e02a04645c333710c
parent7b74cd623102d76f03d5d96415c7289a2c5bcd39
Make <isc/endian.h> detect GNU rather than Linux

Instead of only supporting Linux, try making <isc/endian.h> support
other GNU platforms as well.  Since some compilers define __GNUC__ on
BSDs (e.g. Clang on FreeBSD), move the relevant section to the bottom of
the platform-specific part of <isc/endian.h>, so that it only gets
evaluated when more specific platform determination criteria are not
met.  Also include <byteswap.h> so that any byte-swapping macros which
may be defined in that file on older platforms are used in the fallback
definitions of the nonstandard hto[bl]e{16,32,64}() and
[bl]e{16,32,64}toh() conversion functions.

(cherry picked from commit a98c7408fc5c322a21548655d042919390edcf7b)
lib/isc/include/isc/endian.h