ipfs-chromium
Loading...
Searching...
No Matches
endian.h
1#ifndef IPFS_ENDIAN_H_
2#define IPFS_ENDIAN_H_
3
4#if __has_include(<endian.h>)
5#include <endian.h>
6#endif
7#if __has_include(<machine/endian.h>)
8#include <machine/endian.h>
9#endif
10
11#ifdef htobe64
12// Good
13#elif __has_include(<absl/base/internal/endian.h>)
14#include <absl/base/internal/endian.h>
15#define htobe64 absl::ghtonll
16#elif __has_include(<boost/endian/conversion.hpp>)
17#include <boost/endian/conversion.hpp>
18#define htobe64 native_to_big
19#endif
20
21#endif // IPFS_ENDIAN_H_