Skip to content
  • Ondřej Surý's avatar
    Make <isc/endian.h> detect GNU rather than Linux · 2e54b1be
    Ondřej Surý authored and Michał Kępień's avatar Michał Kępień committed
    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.
    2e54b1be