diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2016-05-30 17:14:48 +0200 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2016-05-30 17:14:48 +0200 |
commit | 0f69bfebd8edf63fe43a6bbc0d9ddea3b62633fe (patch) | |
tree | 3a70699432c4d4d01272148bcaaec225ab1cfad6 /osc.lv2 | |
parent | ea2a418f97941a894698baff9e334bce6486fdb5 (diff) | |
download | moony.lv2-0f69bfebd8edf63fe43a6bbc0d9ddea3b62633fe.tar.xz |
mingw: define htonll/ntohll.
Diffstat (limited to 'osc.lv2')
-rw-r--r-- | osc.lv2/endian.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/osc.lv2/endian.h b/osc.lv2/endian.h index 99845d0..a7aad4a 100644 --- a/osc.lv2/endian.h +++ b/osc.lv2/endian.h @@ -74,6 +74,17 @@ # define htole32(x) (x) # define be32toh(x) ntohl(x) # define le32toh(x) (x) + +# ifndef htonll +static inline uint64_t htonll(uint64_t n) +{ + return (((uint64_t)htonl(n)) << 32) + htonl(n >> 32); +} +# endif + +# ifndef ntohll +# define ntohll htonll +# endif # define htobe64(x) htonll(x) # define htole64(x) (x) @@ -115,4 +126,4 @@ #endif -#endif
\ No newline at end of file +#endif |