diff options
author | ZyX <kp-pav@yandex.ru> | 2015-08-15 17:41:28 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2015-10-08 22:00:45 +0300 |
commit | d1830e143342a1714fa66af727a2cc5c4084b6fe (patch) | |
tree | 20f554b1f3db259cb220bad0b89f05b1a4ac8fcb /src | |
parent | b249529676306760b5cd99a4707e6bf246f8b99b (diff) | |
download | rneovim-d1830e143342a1714fa66af727a2cc5c4084b6fe.tar.gz rneovim-d1830e143342a1714fa66af727a2cc5c4084b6fe.tar.bz2 rneovim-d1830e143342a1714fa66af727a2cc5c4084b6fe.zip |
config: Check order and endianess even when cross-compiling
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/shada.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/shada.c b/src/nvim/shada.c index 6de3d8b20e..1d4b486823 100644 --- a/src/nvim/shada.c +++ b/src/nvim/shada.c @@ -3141,6 +3141,9 @@ static inline uint64_t be64toh(uint64_t big_endian_64_bits) #ifdef ORDER_BIG_ENDIAN return big_endian_64_bits; #else + // It may appear that when !defined(ORDER_BIG_ENDIAN) actual order is big + // endian. This variant is suboptimal, but it works regardless of actual + // order. uint8_t *buf = (uint8_t *) &big_endian_64_bits; uint64_t ret = 0; for (size_t i = 8; i; i--) { |