/* Interface to endianness-neutrality functions.
- Copyright (C) 2019 Free Software Foundation, Inc.
+ Copyright (C) 2019-2020 Free Software Foundation, Inc.
This file is part of libctf.
#include <stdint.h>
#include "swap.h"
-#ifndef HAVE_ENDIAN_H
+#if !defined (HAVE_ENDIAN_H) || !defined (htole64)
#ifndef WORDS_BIGENDIAN
-# define htole64(x) bswap_identity_64 ((x))
-# define le64toh(x) bswap_identity_64 ((x))
+# define htole64(x) (x)
+# define le64toh(x) (x)
#else
# define htole64(x) bswap_64 ((x))
# define le64toh(x) bswap_64 ((x))