nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/binary: redirect 32 bits endianess functions on Android
[nit.git]
/
lib
/
binary
/
binary.nit
diff --git
a/lib/binary/binary.nit
b/lib/binary/binary.nit
index
59ec88d
..
10d9017
100644
(file)
--- a/
lib/binary/binary.nit
+++ b/
lib/binary/binary.nit
@@
-45,10
+45,13
@@
in "C" `{
#include <endian.h>
// Android compatibility
#include <endian.h>
// Android compatibility
+ #ifndef be32toh
+ #define be32toh(val) betoh32(val)
+ #define le32toh(val) letoh32(val)
+ #endif
+
#ifndef be64toh
#define be64toh(val) betoh64(val)
#ifndef be64toh
#define be64toh(val) betoh64(val)
- #endif
- #ifndef le64toh
#define le64toh(val) letoh64(val)
#endif
`}
#define le64toh(val) letoh64(val)
#endif
`}