[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: - do not include in platform
From: |
gnunet |
Subject: |
[gnunet] branch master updated: - do not include in platform |
Date: |
Mon, 05 Jul 2021 16:52:32 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new caf1cbff1 - do not include in platform
caf1cbff1 is described below
commit caf1cbff16919ffb27016f80f6691c91d771b44f
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Mon Jul 5 16:49:29 2021 +0200
- do not include in platform
---
src/include/gnunet_common.h | 19 +++++++++++++++++++
src/include/platform.h | 19 -------------------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 7477ca4c8..1126deaf4 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -143,6 +143,25 @@ enum GNUNET_GenericReturnValue
*/
#if __BYTE_ORDER == __LITTLE_ENDIAN
+#if defined(__linux__)
+#define BYTE_SWAP_16(x) __bswap_16 (x)
+#define BYTE_SWAP_32(x) __bswap_32 (x)
+#define BYTE_SWAP_64(x) __bswap_64 (x)
+#else
+#define BYTE_SWAP_16(x) ((((x) & 0x00ff) << 8) | (((x) & 0xff00) >> 8))
+
+#define BYTE_SWAP_32(x) \
+ ((((x) & 0x000000ffU) << 24) | (((x) & 0x0000ff00U) << 8) \
+ | (((x) & 0x00ff0000U) >> 8) | (((x) & 0xff000000U) >> 24))
+
+#define BYTE_SWAP_64(x) \
+ ((((x) & 0x00000000000000ffUL) << 56) | (((x) & 0x000000000000ff00UL) << 40)
\
+ | (((x) & 0x0000000000ff0000UL) << 24) | (((x) & 0x00000000ff000000UL) <<
8) \
+ | (((x) & 0x000000ff00000000UL) >> 8) | (((x) & 0x0000ff0000000000UL) >>
24) \
+ | (((x) & 0x00ff000000000000UL) >> 40) | (((x) & 0xff00000000000000UL) >> \
+ 56))
+#endif
+
#define GNUNET_htobe16(x) BYTE_SWAP_16 (x)
#define GNUNET_htole16(x) (x)
#define GNUNET_be16toh(x) BYTE_SWAP_16 (x)
diff --git a/src/include/platform.h b/src/include/platform.h
index da70893a7..e641b38eb 100644
--- a/src/include/platform.h
+++ b/src/include/platform.h
@@ -199,25 +199,6 @@
#undef HAVE_MREMAP
#endif
-#if defined(__linux__)
-#define BYTE_SWAP_16(x) __bswap_16 (x)
-#define BYTE_SWAP_32(x) __bswap_32 (x)
-#define BYTE_SWAP_64(x) __bswap_64 (x)
-#else
-#define BYTE_SWAP_16(x) ((((x) & 0x00ff) << 8) | (((x) & 0xff00) >> 8))
-
-#define BYTE_SWAP_32(x) \
- ((((x) & 0x000000ffU) << 24) | (((x) & 0x0000ff00U) << 8) \
- | (((x) & 0x00ff0000U) >> 8) | (((x) & 0xff000000U) >> 24))
-
-#define BYTE_SWAP_64(x) \
- ((((x) & 0x00000000000000ffUL) << 56) | (((x) & 0x000000000000ff00UL) << 40)
\
- | (((x) & 0x0000000000ff0000UL) << 24) | (((x) & 0x00000000ff000000UL) <<
8) \
- | (((x) & 0x000000ff00000000UL) >> 8) | (((x) & 0x0000ff0000000000UL) >>
24) \
- | (((x) & 0x00ff000000000000UL) >> 40) | (((x) & 0xff00000000000000UL) >> \
- 56))
-#endif
-
#if ! HAVE_ATOLL
long long
atoll (const char *nptr);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: - do not include in platform,
gnunet <=